- state.set_battery_voltage(AltosConvert.easy_mini_voltage(sensor_emini.batt));
- state.set_apogee_voltage(AltosConvert.easy_mini_voltage(sensor_emini.apogee));
- state.set_main_voltage(AltosConvert.easy_mini_voltage(sensor_emini.main));
-
+ switch (version) {
+ case 1:
+ listener.set_battery_voltage(AltosConvert.easy_mini_1_voltage(sensor_emini.batt, cal_data.serial));
+ listener.set_apogee_voltage(AltosConvert.easy_mini_1_voltage(sensor_emini.apogee, cal_data.serial));
+ listener.set_main_voltage(AltosConvert.easy_mini_1_voltage(sensor_emini.main, cal_data.serial));
+ break;
+ case 2:
+ listener.set_battery_voltage(AltosConvert.easy_mini_2_voltage(sensor_emini.batt));
+ listener.set_apogee_voltage(AltosConvert.easy_mini_2_voltage(sensor_emini.apogee));
+ listener.set_main_voltage(AltosConvert.easy_mini_2_voltage(sensor_emini.main));
+ break;
+ }
+