- if (state != AltosLib.ao_flight_invalid) {
- this.state = state;
- ascent = (AltosLib.ao_flight_boost <= state &&
- state <= AltosLib.ao_flight_coast);
- boost = (AltosLib.ao_flight_boost == state);
- }
- }
-
- public int state() {
- return state;
- }
-
- public void set_log_format(int log_format) {
- this.log_format = log_format;
- switch (log_format) {
- case AltosLib.AO_LOG_FORMAT_TELEGPS:
- this.state = AltosLib.ao_flight_stateless;
- break;
- }
- }
-
- public void set_log_space(int log_space) {
- this.log_space = log_space;
- }
-
- public void set_flight_params(int apogee_delay, int main_deploy) {
- this.apogee_delay = apogee_delay;
- this.main_deploy = main_deploy;
- }
-
- public void set_config(int major, int minor, int flight_log_max) {
- config_major = major;
- config_minor = minor;
- this.flight_log_max = flight_log_max;
- }
-
- public void set_callsign(String callsign) {
- this.callsign = callsign;
- }
-
- public void set_firmware_version(String version) {
- firmware_version = version;
- }
-
- public int compare_version(String other_version) {
- if (firmware_version == null)
- return AltosLib.MISSING;
- return AltosLib.compare_version(firmware_version, other_version);
- }
-
- private void re_init() {
- int rs = receiver_serial;
- init();
- receiver_serial = rs;
- }
-
-// public void set_flight(int flight) {
-//
-// /* When the flight changes, reset the state */
-// if (flight != AltosLib.MISSING) {
-// if (this.flight != AltosLib.MISSING &&
-// this.flight != flight) {
-// re_init();
-// }
-// this.flight = flight;
-// }
-// }
-//
-// public void set_serial(int serial) {
-// /* When the serial changes, reset the state */
-// if (serial != AltosLib.MISSING) {
-// if (this.serial != AltosLib.MISSING &&
-// this.serial != serial) {
-// re_init();
-// }
-// this.serial = serial;
-// }
-// }
-//
-// public void set_receiver_serial(int serial) {
-// if (serial != AltosLib.MISSING)
-// receiver_serial = serial;
-// }
-
- public boolean altitude_32() {
- return altitude_32 == 1;
- }
-
- public void set_altitude_32(int altitude_32) {
- if (altitude_32 != AltosLib.MISSING)
- this.altitude_32 = altitude_32;