File tree Expand file tree Collapse file tree 2 files changed +21
-18
lines changed
Expand file tree Collapse file tree 2 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ extern "C"
1515#include " data.h"
1616#include " state_machine.h"
1717#include " hv_iox.h"
18- #include < braking.h>
1918}
2019
2120
@@ -133,23 +132,6 @@ void *TCPLoop(void *arg)
133132 data->flags ->emergencyBrake = 1 ;
134133 }
135134
136- if (!strncmp (buffer, " primBrakeOff" , MAX_COMMAND_SIZE))
137- {
138- brakePrimaryRelease ();
139- }
140- if (!strncmp (buffer, " primBrakeOn" , MAX_COMMAND_SIZE))
141- {
142- brakePrimary ();
143- }
144- if (!strncmp (buffer, " secBrakeOff" , MAX_COMMAND_SIZE))
145- {
146- brakeSecondaryRelease ();
147- }
148- if (!strncmp (buffer, " secBrakeOn" , MAX_COMMAND_SIZE))
149- {
150- brakeSecondary ();
151- }
152-
153135 if (!strncmp (buffer, " hvEnable" , MAX_COMMAND_SIZE))
154136 {
155137 setMCUHVEnabled (true );
Original file line number Diff line number Diff line change 1111#include " data.h"
1212#include " connStat.h"
1313
14+ extern " C" {
15+ #include < braking.h>
16+ }
17+
1418pthread_t LVTCPThread;
1519
1620
@@ -90,6 +94,23 @@ void *LVTCPLoop(void *arg){
9094 data->flags ->shouldBrake = true ;
9195 }
9296
97+ if (!strncmp (buffer, " primBrakeOff" , MAX_COMMAND_SIZE))
98+ {
99+ brakePrimaryRelease ();
100+ }
101+ if (!strncmp (buffer, " primBrakeOn" , MAX_COMMAND_SIZE))
102+ {
103+ brakePrimary ();
104+ }
105+ if (!strncmp (buffer, " secBrakeOff" , MAX_COMMAND_SIZE))
106+ {
107+ brakeSecondaryRelease ();
108+ }
109+ if (!strncmp (buffer, " secBrakeOn" , MAX_COMMAND_SIZE))
110+ {
111+ brakeSecondary ();
112+ }
113+
93114 // HEARTBEAT
94115 if (!strncmp (buffer, " ping" , MAX_COMMAND_SIZE)){
95116 // Send acknowledge packet back
You can’t perform that action at this time.
0 commit comments