X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_ms5607.c;h=1ebba3e9c6f99ccfb0fd7a7bbebd42b1e7da2c58;hb=b00a155bef319984ec2cf11898355edf94348a4a;hp=162141115c01c5f7e7f2abbab541bc9b5622b486;hpb=ee7a54b3215ffa1eb38f16a151c0740b14b60857;p=fw%2Faltos diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c index 16214111..1ebba3e9 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_ERROR(AO_DATA_MS5607); +#else ao_panic(AO_PANIC_SELF_TEST_MS5607); +#endif + } #if __BYTE_ORDER == __LITTLE_ENDIAN /* Byte swap */ @@ -259,7 +265,6 @@ ao_ms5607_dump(void) struct ao_ms5607_value value; #if !HAS_MS5607_TASK - ao_ms5607_info(); ao_ms5607_sample(&ao_ms5607_current); #endif ao_ms5607_convert(&ao_ms5607_current, &value);