- public void update_state(AltosState state) {
- state.set_serial(serial);
- if (state.state() == AltosLib.ao_flight_invalid)
- state.set_state(AltosLib.ao_flight_startup);
- state.set_tick(tick);
- state.set_rssi(rssi, status);
- state.set_received_time(received_time);
+ public void provide_data(AltosDataListener listener) {
+ listener.set_serial(serial());
+ if (listener.state() == AltosLib.ao_flight_invalid)
+ listener.set_state(AltosLib.ao_flight_startup);
+ if (frequency != AltosLib.MISSING)
+ listener.set_frequency(frequency);
+ listener.set_tick(tick());
+ listener.set_rssi(rssi(), status());
+ listener.set_received_time(received_time);