X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao_flight.c;h=c0f5683047b4d5e3e37dd6d28d14bb9de71295e2;hp=3e747d0668f02399c0d3ec15850d38e36dead71a;hb=3a3bfd471a868d546d83cdc431b53c8f5208edb9;hpb=69616104813fc5ba89fb3128d04fb9328961c59c diff --git a/ao_flight.c b/ao_flight.c index 3e747d06..c0f56830 100644 --- a/ao_flight.c +++ b/ao_flight.c @@ -170,7 +170,7 @@ ao_flight(void) * so subtract instead of add. */ ticks = ao_flight_tick - ao_flight_prev_tick; - ao_vel_change = (((ao_raw_accel + ao_raw_accel_prev) >> 1) - ao_ground_accel); + ao_vel_change = (((ao_raw_accel >> 1) + (ao_raw_accel_prev >> 1)) - ao_ground_accel); ao_raw_accel_prev = ao_raw_accel; /* one is a common interval */ @@ -227,7 +227,6 @@ ao_flight(void) /* Turn on telemetry system */ - ao_rdf_set(1); ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD); ao_flight_state = ao_flight_launchpad; @@ -278,9 +277,6 @@ ao_flight(void) /* Increase telemetry rate */ ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT); - /* disable RDF beacon */ - ao_rdf_set(0); - ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); break; } @@ -360,9 +356,6 @@ ao_flight(void) /* slow down the ADC sample rate */ ao_timer_set_adc_interval(10); - /* Enable RDF beacon */ - ao_rdf_set(1); - /* * Start recording min/max accel and pres for a while * to figure out when the rocket has landed