diff options
Diffstat (limited to 'src/drivers/ao_ms5607.c')
-rw-r--r-- | src/drivers/ao_ms5607.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c index 495fbe02..febe0111 100644 --- a/src/drivers/ao_ms5607.c +++ b/src/drivers/ao_ms5607.c @@ -112,8 +112,14 @@ ao_ms5607_prom_read(struct ao_ms5607_prom *prom) r++; } - if (!ao_ms5607_prom_valid((uint8_t *) prom)) + + if (!ao_ms5607_prom_valid((uint8_t *) prom)) { +#if HAS_SENSOR_ERRORS + ao_sensor_errors = 1; +#else ao_panic(AO_PANIC_SELF_TEST_MS5607); +#endif + } #if __BYTE_ORDER == __LITTLE_ENDIAN /* Byte swap */ |