get_int(line, "Ignite mode:", ignite_mode);
get_int(line, "Pad orientation:", pad_orientation);
get_int(line, "Radio setting:", radio_setting);
- get_int(line, "Frequency:", radio_frequency);
+ if (get_int(line, "Frequency:", radio_frequency))
+ if (radio_frequency.get() < 0)
+ radio_frequency.set(434550);
get_int(line, "Radio enable:", radio_enable);
get_int(line, "Storage size:", storage_size);
get_int(line, "Storage erase unit:", storage_erase_unit);
try { apogee_delay = get_int(line, "Apogee delay:"); } catch (Exception e) {}
try { radio_channel = get_int(line, "Radio channel:"); } catch (Exception e) {}
try { radio_setting = get_int(line, "Radio setting:"); } catch (Exception e) {}
- try { radio_frequency = get_int(line, "Frequency:"); } catch (Exception e) {}
+ try {
+ radio_frequency = get_int(line, "Frequency:");
+ if (radio_frequency < 0)
+ radio_frequency = 434550;
+ } catch (Exception e) {}
try {
if (line.startsWith("Accel cal")) {
String[] bits = line.split("\\s+");
}
public void set_ignite_mode(int new_ignite_mode) {
+ if (new_ignite_mode >= ignite_mode_values.length)
+ new_ignite_mode = 0;
if (new_ignite_mode < 0) {
ignite_mode_value.setEnabled(false);
new_ignite_mode = 0;
public void set_pad_orientation(int new_pad_orientation) {
+ if (new_pad_orientation >= pad_orientation_values.length)
+ new_pad_orientation = 0;
if (new_pad_orientation < 0) {
pad_orientation_value.setEnabled(false);
new_pad_orientation = 0;