Skip to content

Commit 1e48c4f

Browse files
committed
Repaired APPS/ETC libarary and updated CAN IDs
1 parent 07f7797 commit 1e48c4f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

APPSETC/.mbed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
ROOT=.
22
TARGET=NUCLEO_L432KC
33
TARGET_CODE=0770
4-
TARGET_SERIAL=0668FF534871754867253623

APPSETC/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ int main()
224224

225225
//TODO read ts rdy signal
226226
switch (id) {
227-
case 0x182:
227+
case 0x183:
228228
if (data[3] & 0x4) {
229229
TS_Ready = true;
230230
} else {
@@ -249,14 +249,14 @@ int main()
249249
powerRdy = Motor_On;
250250
motorReverse = false;
251251
motorForward = true;
252-
torqueDemand = 100 * pedalTravel; // Dunno if it should be between 0 and 1 or 0 and 100
253-
maxSpeed = MAXSPEED;
252+
torqueDemand = -100 * pedalTravel; // Dunno if it should be between 0 and 1 or 0 and 100
253+
maxSpeed = -MAXSPEED;
254254
} else {
255255
powerRdy = false;
256256
motorReverse = false;
257257
motorForward = true;
258258
torqueDemand = 0; // Dunno if it should be between 0 and 1 or 0 and 100
259-
maxSpeed = MAXSPEED;
259+
maxSpeed = -MAXSPEED;
260260
printStatusMessage();
261261
}
262262

0 commit comments

Comments
 (0)