Revision d607fcef devices/DiWheelDrive/DiWheelDrive.cpp
devices/DiWheelDrive/DiWheelDrive.cpp | ||
---|---|---|
2 | 2 |
#include "hal.h" |
3 | 3 |
#include "qei.h" |
4 | 4 |
#include "DiWheelDrive.h" |
5 |
#include <chprintf.h> |
|
5 | 6 |
|
6 | 7 |
|
7 | 8 |
#include <global.hpp> |
... | ... | |
118 | 119 |
return RDY_OK; |
119 | 120 |
} |
120 | 121 |
break; |
121 |
case CAN::SET_LINE_FOLLOW_STRATEGY: |
|
122 |
case CAN::SET_LINE_FOLLOW_MSG: |
|
123 |
chprintf((BaseSequentialStream*) &SD1, "Received Strategy!\n"); |
|
122 | 124 |
if (frame->DLC == 1) { |
123 | 125 |
global.lfStrategy = frame->data8[0]; |
126 |
global.msgReceived = true; |
|
124 | 127 |
return RDY_OK; |
125 | 128 |
} |
126 | 129 |
break; |
... | ... | |
246 | 249 |
frame.DLC = 6; |
247 | 250 |
this->transmitMessage(&frame); |
248 | 251 |
|
252 |
|
|
253 |
|
|
249 | 254 |
// Send the board ID (board ID of DiWheelDrive = Robot ID) |
250 | 255 |
if (this->bcCounter % 10 == 0) { |
251 | 256 |
frame.SID = 0; |
Also available in: Unified diff