From: Keith Packard Date: Sun, 7 Oct 2012 00:21:55 +0000 (-0700) Subject: altos/drivers: Use data ring values for MS5607 presentation X-Git-Tag: 1.1.9.1^2~9 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=41add569413bf3ec564195963277c81f2d2da798 altos/drivers: Use data ring values for MS5607 presentation Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_ms5607.c b/src/drivers/ao_ms5607.c index 76931b4b..3295baac 100644 --- a/src/drivers/ao_ms5607.c +++ b/src/drivers/ao_ms5607.c @@ -239,14 +239,13 @@ ao_ms5607_info(void) static void ao_ms5607_dump(void) { - struct ao_ms5607_sample sample; + struct ao_data data; struct ao_ms5607_value value; - ao_ms5607_setup(); - ao_ms5607_sample(&sample); - ao_ms5607_convert(&sample, &value); - printf ("Pressure: %8u %8d\n", sample.pres, value.pres); - printf ("Temperature: %8u %8d\n", sample.temp, value.temp); + ao_data_get(&data); + ao_ms5607_convert(&data.ms5607_raw, &value); + printf ("Pressure: %8u %8d\n", data.ms5607_raw.pres, value.pres); + printf ("Temperature: %8u %8d\n", data.ms5607_raw.temp, value.temp); printf ("Altitude: %ld\n", ao_pa_to_altitude(value.pres)); }