diff options
| author | Keith Packard <keithp@keithp.com> | 2010-01-10 16:31:50 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-01-10 16:35:58 -0800 |
| commit | 9856b7c4397afcecc8f541af9a83824e817b3612 (patch) | |
| tree | 71d2d68717c29cd96addd22d1734bbb5040a4b56 /ao-tools/ao-view/aoview_state.c | |
| parent | 0c2533be15858774ef9381aa8c8344356fd5b971 (diff) | |
Switch to using internal cc1111 temperature sensor
v0.2 has no temperature sensor, and several of the v0.1 boards didn't
get a temperature sensor loaded. Use the internal temperature sensor
on the cc1111 in all cases instead.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/ao-view/aoview_state.c')
| -rw-r--r-- | ao-tools/ao-view/aoview_state.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ao-tools/ao-view/aoview_state.c b/ao-tools/ao-view/aoview_state.c index 838899a7..505bcddc 100644 --- a/ao-tools/ao-view/aoview_state.c +++ b/ao-tools/ao-view/aoview_state.c @@ -127,10 +127,10 @@ aoview_state_derive(struct cc_telem *data, struct aostate *state) accel_counts_per_mss = ((data->accel_minus_g - data->accel_plus_g) / 2.0) / 9.80665; state->acceleration = (data->ground_accel - data->flight_accel) / accel_counts_per_mss; state->speed = data->flight_vel / (accel_counts_per_mss * 100.0); - state->temperature = ((data->temp / 32767.0 * 3.3) - 0.5) / 0.01; - state->drogue_sense = data->drogue / 32767.0 * 15.0; - state->main_sense = data->main / 32767.0 * 15.0; - state->battery = data->batt / 32767.0 * 5.0; + state->temperature = cc_thermometer_to_temperature(data->temp); + state->drogue_sense = cc_ignitor_to_voltage(data->drogue); + state->main_sense = cc_ignitor_to_voltage(data->main); + state->battery = cc_battery_to_voltage(data->batt); if (!strcmp(data->state, "pad")) { if (data->gps.gps_locked && data->gps.nsat >= 4) { state->npad++; |
