File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
src/drivers/ui/YardForceCoverUI Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,14 @@ void YardForceCoverUIDriver::ThreadFunc() {
6161 bool timeout = chEvtWaitAnyTimeout (EVT_PACKET_RECEIVED, TIME_S2I (1 )) == 0 ;
6262 if (timeout) {
6363 RequestFWVersion ();
64+
65+ msg_set_leds msg{};
66+ msg.type = Set_LEDs;
67+ static double value = 0 .0f ;
68+ setBars7 (msg, value);
69+ value += 0 .1f ;
70+ sendUIMessage (&msg, sizeof (msg));
71+
6472 continue ;
6573 }
6674 chSysLock ();
@@ -97,7 +105,7 @@ void YardForceCoverUIDriver::ProcessPacket() {
97105
98106 if (crc != readcrc) return ;
99107
100- if (buffer[0 ] == Get_Version && size == sizeof (struct msg_get_version )) {
108+ /* if (buffer[0] == Get_Version && size == sizeof(struct msg_get_version)) {
101109 struct msg_get_version *msg = (struct msg_get_version *)buffer;
102110 board_found = true;
103111 } else if (buffer[0] == Get_Button && size == sizeof(struct msg_event_button)) {
@@ -113,7 +121,7 @@ void YardForceCoverUIDriver::ProcessPacket() {
113121 struct msg_event_subscribe *msg = (struct msg_event_subscribe *)buffer;
114122 ui_topic_bitmask = msg->topic_bitmask;
115123 ui_interval = msg->interval;
116- }
124+ }*/
117125}
118126void YardForceCoverUIDriver::sendUIMessage (void *msg, size_t size) {
119127 // packages need to be at least 1 byte of type, 1 byte of data and 2 bytes of CRC
Original file line number Diff line number Diff line change 1414#include " hal.h"
1515#include " ui_board.h"
1616
17- class YardForceCoverUIDriver : public xbot ::driver::input::InputDriver {
17+ class YardForceCoverUIDriver {
1818 private:
1919 // Extend the config struct by a pointer to this instance, so that we can access it in callbacks.
2020 struct UARTConfigEx : UARTConfig {
You can’t perform that action at this time.
0 commit comments