Skip to content

Commit a8587c0

Browse files
committed
make lvpdb only respect fresh dash state
1 parent 08fe3c6 commit a8587c0

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

LVPDB/Core/User/Src/FEB_Main.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,14 @@ void FEB_Main_Loop(void)
376376
FEB_Variable_Conversion();
377377
}
378378

379-
DASH_State_t dash_state = FEB_CAN_DASH_GetLastState();
379+
if (FEB_CAN_DASH_IsDataFresh(250))
380+
{
381+
DASH_State_t dash_state = FEB_CAN_DASH_GetLastState();
380382

381-
// Device handles (in order: LV, SH, LT, BM_L, SM, AF1_AF2, CP_RF)
382-
FEB_TPS_Enable(tps_handles[5], dash_state.switch1); // AF1_AF2
383-
FEB_TPS_Enable(tps_handles[6], dash_state.switch2); // CP_RF
383+
// Device handles (in order: LV, SH, LT, BM_L, SM, AF1_AF2, CP_RF)
384+
FEB_TPS_Enable(tps_handles[5], dash_state.switch1); // AF1_AF2
385+
FEB_TPS_Enable(tps_handles[6], dash_state.switch2); // CP_RF
386+
}
384387

385388
// FEB_TPS_Enable(tps_handles[3], true); // BM_L
386389

LVPDB/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.9
1+
1.5.10

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.12
1+
1.5.13

0 commit comments

Comments
 (0)