Skip to content

Commit 03f420e

Browse files
committed
can.cpp: ups, inverted logic
This fixes bug introduces in c33d036
1 parent a1744d5 commit 03f420e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

firmware/can.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,21 @@ void CanRxThread(void*)
164164
HeaterAllow GetHeaterAllowed()
165165
{
166166
if (!canStatusMsgTimer.hasElapsedMs(CAN_STATUS_MSG_TIMEOUT_MS))
167+
{
167168
return heaterAllow;
169+
}
168170

169171
return HeaterAllow::Unknown;
170172
}
171173

172174
float GetRemoteBatteryVoltage()
173175
{
174176
if (!canStatusMsgTimer.hasElapsedMs(CAN_STATUS_MSG_TIMEOUT_MS))
175-
return 0;
177+
{
178+
return remoteBatteryVoltage;
179+
}
176180

177-
return remoteBatteryVoltage;
181+
return 0;
178182
}
179183

180184
void InitCan()

0 commit comments

Comments
 (0)