altos/drivers: Use data ring values for MS5607 presentation
authorKeith Packard <keithp@keithp.com>
Sun, 7 Oct 2012 00:21:55 +0000 (17:21 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 7 Oct 2012 00:21:55 +0000 (17:21 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_ms5607.c

index 76931b4b07a15b263fd06d607079efc5d9c849a7..3295baac0348935256260bfc9e0781cb81b2335c 100644 (file)
@@ -239,14 +239,13 @@ ao_ms5607_info(void)
 static void
 ao_ms5607_dump(void)
 {
 static void
 ao_ms5607_dump(void)
 {
-       struct ao_ms5607_sample sample;
+       struct ao_data  data;
        struct ao_ms5607_value value;
 
        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));
 }
 
        printf ("Altitude: %ld\n", ao_pa_to_altitude(value.pres));
 }