Skip to content

Commit 35428bf

Browse files
committed
Remove unneeded commented code
1 parent c4032ce commit 35428bf

File tree

6 files changed

+8
-27
lines changed

6 files changed

+8
-27
lines changed

embedded/app/main/badgerloop_HV.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ int init() {
4545
initHVIox(true);
4646

4747
SetupMotor();
48+
4849
/* initMotor(); */
49-
/* initPressureSensors();*/
50+
/* initPressureSensors();*/
51+
5052
/* Allocate needed memory for state machine and create graph */
5153
buildStateMachine();
5254

@@ -58,6 +60,7 @@ int init() {
5860
struct sigaction sig;
5961
sig.sa_sigaction = emergQuitter;
6062
sigaction(SIGINT, &sig, NULL);
63+
6164
/* Start 'black box' data saving */
6265
SetupDataDump();
6366

@@ -106,7 +109,7 @@ int main() {
106109
} else {
107110
i += 1;
108111
}
109-
// fprintf(stderr, "%d,%d,%d\n", data->rms->actualTorque, data->rms->motorSpeed, getuSTimestamp());
112+
// fprintf(stderr, "%d,%d,%d\n", data->rms->actualTorque, data->rms->motorSpeed, getuSTimestamp());
110113
usleep(10000);
111114

112115
// Control loop

embedded/app/main/badgerloop_LV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern "C"
1313
#include "nav.h"
1414
#include "braking.h"
1515
extern void csvFormatShow();
16-
#include "connStat.h"
16+
#include "connStat.h"
1717
#include "proc_iox.h"
1818
#include "imu.h"
1919
#include <data.h>

embedded/app/src/states.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
pow(35181.0 * (x), 3) - \
3535
pow(303240.0 * (x), 2) - (1000000.0 * (x)))
3636

37-
#define MAX_RETRO 1
37+
#define MAX_RETRO 3
3838
#define MAX_PACKET_LOSS 500
3939
/* Imports/Externs */
4040
extern int internalCount;
@@ -149,7 +149,7 @@ stateTransition_t * propulsionAction() {
149149
rErrs += 1;
150150
} rErrs = 0;
151151

152-
if (getuSTimestamp() - data->timers->startTime > 7000000/*MAX_RUN_TIME*/){
152+
if (getuSTimestamp() - data->timers->startTime > 3000000/*MAX_RUN_TIME*/){
153153
fprintf(stderr, "Prop timeout\n");
154154
return stateMachine.currState->next;
155155
}

embedded/data/include/data.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ typedef struct motion_t {
142142
*
143143
*/
144144
typedef struct bms_t {
145-
// float packCurrent;
146145
int64_t packCurrent;
147146
float packVoltage;
148147
int imdStatus;

embedded/peripherals/src/bms.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ int bmsParseMsg(uint32_t id, uint8_t *msg) {
4141
switch(id) {
4242
case 0x6B0:
4343
bms->packCurrent = (msg[1] | msg[0] << 8)/10;
44-
//printf("0x6B0 Pack Current 1\ 0: %f\n", bms->packCurrent);
45-
//int64_t tryTwo = (((int16_t) msg[1]) |((int16_t) msg[0]) << 8)/10;
46-
//printf("0x6B0 Pack Current hepl: %lld\n", tryTwo);
47-
4844
bms->packVoltage = (msg[3] | msg[2] << 8)/10;
4945
bms->Soc = msg[4]/2;
5046
bms->relayStatus = msg[6] | msg[5] << 8;
@@ -121,19 +117,6 @@ int bmsParseMsg(uint32_t id, uint8_t *msg) {
121117
#endif
122118
break;
123119
case 0x150:
124-
// printf("");
125-
// float twoTrye = (msg[0] | (msg[1] << 8))/10;
126-
// printf("0x150 Pack Current 0/1: %f\n", twoTrye);
127-
128-
// float twoTry2 = (msg[1] | (msg[0] << 8))/10;
129-
// printf("0x150 Pack Current 1/ 0: %f\n", twoTry2);
130-
131-
132-
/* bms->avgTemp = msg[0];*/
133-
// bms->packCurrent /= 10;
134-
/* bms->cellMinVoltage = ((msg[3] << 8) | msg[4]) / 10000.0;*/
135-
/* bms->packVoltage = msg[2] | (msg[3] << 8);*/
136-
/* bms->packVoltage /= 10;*/
137120
bms->packAh = msg[4] | (msg[5] << 8);
138121
bms->highTemp = msg[6];
139122
bms->lowTemp = msg[7];

middleware/src/LVTelemetry_Loop.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ void *LVTelemetryLoop(void *arg)
8080
Value pos;
8181
//pos.SetFloat(getPosX());
8282
pos.SetFloat(0);
83-
84-
85-
// printf("%f %f %f\n", getAccelX(), getAccelY(), getAccelZ());
86-
8783

8884
// RETRO
8985
Value retro;

0 commit comments

Comments
 (0)