Revision c76baf23 devices/DiWheelDrive/DiWheelDrive.cpp
| devices/DiWheelDrive/DiWheelDrive.cpp | ||
|---|---|---|
| 97 | 97 |
return RDY_OK; |
| 98 | 98 |
} |
| 99 | 99 |
break; |
| 100 |
|
|
| 100 |
case CAN::SET_LINE_FOLLOW_SPEED: |
|
| 101 |
if (frame->DLC == 8) {
|
|
| 102 |
uint8_t speedForward = frame->data8[0]; |
|
| 103 |
uint8_t speedSoftLeft0 = frame->data8[1]; |
|
| 104 |
uint8_t speedSoftLeft1 = frame->data8[2]; |
|
| 105 |
uint8_t speedHardLeft0 = frame->data8[3]; |
|
| 106 |
uint8_t speedHardLeft1 = frame->data8[4]; |
|
| 107 |
global.rpmForward[0] = speedForward; |
|
| 108 |
global.rpmForward[1] = speedForward; |
|
| 109 |
global.rpmSoftLeft[0] = speedSoftLeft0; |
|
| 110 |
global.rpmSoftLeft[1] = speedSoftLeft1; |
|
| 111 |
global.rpmHardLeft[0] = speedHardLeft0; |
|
| 112 |
global.rpmHardLeft[1] = speedHardLeft1; |
|
| 113 |
global.rpmSoftRight[0] = global.rpmSoftLeft[1]; |
|
| 114 |
global.rpmSoftRight[1] = global.rpmSoftLeft[0]; |
|
| 115 |
global.rpmHardRight[0] = global.rpmHardLeft[1]; |
|
| 116 |
global.rpmHardRight[1] = global.rpmHardLeft[0]; |
|
| 117 |
return RDY_OK; |
|
| 118 |
} |
|
| 101 | 119 |
case CAN::SET_KINEMATIC_CONST_ID: |
| 102 | 120 |
if (frame->DLC == 8) {
|
| 103 | 121 |
/* // Set (but do not store) Ed |
Also available in: Unified diff