- public void update_state(AltosState state) {
- state.set_tick(tick);
- state.set_state(this.state);
- state.set_flight(flight);
- state.set_serial(serial);
- state.set_rssi(rssi, status);
-
- state.set_pressure(AltosConvert.barometer_to_pressure(pres));
- state.set_accel_g(accel_plus_g, accel_minus_g);
- state.set_accel(accel);
+ public void provide_data(AltosDataListener listener, AltosCalData cal_data) {
+ cal_data.set_tick(tick);
+ listener.set_time(cal_data.time());
+ listener.set_state(this.state);
+ cal_data.set_state(this.state);
+ cal_data.set_flight(flight);
+ cal_data.set_serial(serial);
+ listener.set_rssi(rssi, status);
+
+ listener.set_pressure(AltosConvert.barometer_to_pressure(pres));
+ cal_data.set_accel_plus_minus(accel_plus_g, accel_minus_g);
+ listener.set_acceleration(cal_data.acceleration(accel));