Skip to content

Commit d3ec9cd

Browse files
committed
swoc reset flag
1 parent efc9a6b commit d3ec9cd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Apps/Src/ReadTritium.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#define MOTOR_ERROR_MASK 0x01FF
2626
#define MOTOR_LIMIT_MASK 0x7F
2727

28+
#define RESET_ON_SWOC true
29+
2830
uint16_t Motor_FaultBitmap = 0x0000;
2931
float Motor_RPM = 0;
3032
static float Motor_Velocity = 0;
@@ -247,7 +249,7 @@ void assertTritiumError(controls_error_e m_err) {
247249

248250
case C_ERR_RTR_SOFTWARE_OC:
249251
// Try to restart the motor a few times and then fail out
250-
if (++motor_fault_cnt > 1) {
252+
if (++motor_fault_cnt > 1 || !RESET_ON_SWOC) {
251253
throwTaskError(m_err, !EVAC_NEEDED, NULL, OPT_LOCK_SCHED, OPT_NONRECOV, CAN_NONE_BPS);
252254
} else {
253255
resetMotorController();

0 commit comments

Comments
 (0)