Skip to content

Commit f6ffe05

Browse files
committed
Fixed temp sensing on CAN
1 parent d277335 commit f6ffe05

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bms/src/Main.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void canCurrentLimTX();
3636

3737

3838

39-
EventQueue queue(32*EVENTS_EVENT_SIZE); // creates an eventqueue which is thread and ISR safe. EVENTS_EVENT_SIZE is the size of the buffer allocated
39+
EventQueue queue(32*EVENTS_EVENT_SIZE);// creates an eventqueue which is thread and ISR safe. EVENTS_EVENT_SIZE is the size of the buffer allocated
4040

4141

4242

@@ -100,7 +100,6 @@ int main() {
100100
BMSThread bmsThread(ltcBus, 1, bmsMailbox, mainToBMSMailbox);
101101
bmsThreadThread.start(callback(&BMSThread::startThread, &bmsThread));
102102

103-
std::array<int8_t, BMS_BANK_COUNT * BMS_BANK_TEMP_COUNT> allTemps;
104103
osThreadSetPriority(osThreadGetId(), osPriorityHigh7);
105104
Timer t;
106105
t.start();
@@ -197,7 +196,7 @@ int main() {
197196
// divided by 300 because that's the nominal current reading of the sensor (ie baseline)
198197
// multiplied by 10 and cast to a uint16 for 1 decimal place
199198
tsCurrent = ((uint16_t)((current_sense_pin-current_vref_pin)/125.0))*10;
200-
199+
201200
queue.dispatch_once();
202201
ThisThread::sleep_for(50 - (t.read_ms()%50));
203202
}

0 commit comments

Comments
 (0)