- state.set_ground_pressure(AltosConvert.barometer_to_pressure(ground_pres));
- state.set_pressure(AltosConvert.barometer_to_pressure(pres));
- state.set_temperature(AltosConvert.thermometer_to_temperature(temp));
- state.set_battery_voltage(AltosConvert.cc_battery_to_voltage(v_batt));
- if (type == packet_type_TM_sensor || type == packet_type_Tm_sensor) {
- state.set_apogee_voltage(AltosConvert.cc_ignitor_to_voltage(sense_d));
- state.set_main_voltage(AltosConvert.cc_ignitor_to_voltage(sense_m));
+ state.set_ground_pressure(AltosConvert.barometer_to_pressure(ground_pres()));
+ state.set_pressure(AltosConvert.barometer_to_pressure(pres()));
+ state.set_temperature(AltosConvert.thermometer_to_temperature(temp()));
+ state.set_battery_voltage(AltosConvert.cc_battery_to_voltage(v_batt()));
+ if (type() == packet_type_TM_sensor || type() == packet_type_Tm_sensor) {
+ state.set_apogee_voltage(AltosConvert.cc_ignitor_to_voltage(sense_d()));
+ state.set_main_voltage(AltosConvert.cc_ignitor_to_voltage(sense_m()));