diff options
author | Keith Packard <keithp@keithp.com> | 2012-06-17 19:04:22 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-06-17 19:04:22 -0700 |
commit | 629f43e7c7abbff33e14b168a08a4b6a9c88b937 (patch) | |
tree | 0a0e22f2efe7568aad64b4f854baad173403c67d /src/core/ao_telemetry.c | |
parent | 9b24f413da0b6d989b32e8654a91c8deee4c81dd (diff) |
altos: Add telemetry to megametrum
Now that the radio works
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_telemetry.c')
-rw-r--r-- | src/core/ao_telemetry.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index 6e8fc02f..5857c44d 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -35,6 +35,10 @@ static __pdata uint16_t ao_rdf_time; #define AO_RDF_INTERVAL_TICKS AO_SEC_TO_TICKS(5) #define AO_RDF_LENGTH_MS 500 +#if defined(MEGAMETRUM) +#define AO_TELEMETRY_SENSOR AO_TELEMETRY_SENSOR_MEGAMETRUM +#endif + #if defined(TELEMETRUM_V_0_1) || defined(TELEMETRUM_V_0_2) || defined(TELEMETRUM_V_1_0) || defined(TELEMETRUM_V_1_1) || defined(TELEBALLOON_V_1_1) || defined(TELEMETRUM_V_1_2) #define AO_TELEMETRY_SENSOR AO_TELEMETRY_SENSOR_TELEMETRUM #endif @@ -53,7 +57,7 @@ static __xdata union ao_telemetry_all telemetry; static void ao_send_sensor(void) { - __xdata struct ao_data *packet = &ao_data_ring[ao_data_ring_prev(ao_sample_data)]; + __xdata struct ao_data *packet = (__xdata struct ao_data *) &ao_data_ring[ao_data_ring_prev(ao_sample_data)]; telemetry.generic.tick = packet->tick; telemetry.generic.type = AO_TELEMETRY_SENSOR; @@ -64,7 +68,7 @@ ao_send_sensor(void) #else telemetry.sensor.accel = 0; #endif - telemetry.sensor.pres = packet->adc.pres; + telemetry.sensor.pres = ao_data_pres(packet); telemetry.sensor.temp = packet->adc.temp; telemetry.sensor.v_batt = packet->adc.v_batt; #if HAS_IGNITE |