mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-11 03:29:17 +01:00
LP-444 Do not touch i2c alarm in case it is uninitialised. This will keep the gcs field grey when I2C is not in use.
This commit is contained in:
parent
e603f9f3fe
commit
1207968362
@ -698,6 +698,7 @@ static void updateSystemAlarms()
|
||||
}
|
||||
|
||||
#ifdef PIOS_INCLUDE_I2C
|
||||
if (AlarmsGet(SYSTEMALARMS_ALARM_I2C) != SYSTEMALARMS_ALARM_UNINITIALISED) {
|
||||
static const SystemAlarmsAlarmOptions i2c_alarm_by_error[] = {
|
||||
[PIOS_I2C_BAD_EVENT_COUNTER] = SYSTEMALARMS_ALARM_ERROR,
|
||||
[PIOS_I2C_FSM_FAULT_COUNT] = SYSTEMALARMS_ALARM_ERROR,
|
||||
@ -715,7 +716,7 @@ static void updateSystemAlarms()
|
||||
}
|
||||
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_I2C, i2c_alarm);
|
||||
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_I2C */
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user