I knew this was stupid: Revert "changing mission dependend object IDs to FSFW_ENUM"

This reverts commit 2800484f6b.
This commit is contained in:
2022-08-25 14:43:27 +02:00
parent 2800484f6b
commit fe8036361d
24 changed files with 780 additions and 787 deletions

View File

@ -33,11 +33,11 @@ class AcsController : public ExtendedControllerBase {
// MGMs
acsctrl::MgmData mgmData;
MGMLIS3MDL::MgmPrimaryDataset mgm0Lis3Set = MGMLIS3MDL::MgmPrimaryDataset(commonObjects::MGM_0_LIS3_HANDLER);
RM3100::Rm3100PrimaryDataset mgm1Rm3100Set = RM3100::Rm3100PrimaryDataset(commonObjects::MGM_1_RM3100_HANDLER);
MGMLIS3MDL::MgmPrimaryDataset mgm2Lis3Set = MGMLIS3MDL::MgmPrimaryDataset(commonObjects::MGM_2_LIS3_HANDLER);
RM3100::Rm3100PrimaryDataset mgm3Rm3100Set = RM3100::Rm3100PrimaryDataset(commonObjects::MGM_3_RM3100_HANDLER);
IMTQ::CalibratedMtmMeasurementSet imtqMgmSet = IMTQ::CalibratedMtmMeasurementSet(commonObjects::IMTQ_HANDLER);
MGMLIS3MDL::MgmPrimaryDataset mgm0Lis3Set = MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_0_LIS3_HANDLER);
RM3100::Rm3100PrimaryDataset mgm1Rm3100Set = RM3100::Rm3100PrimaryDataset(objects::MGM_1_RM3100_HANDLER);
MGMLIS3MDL::MgmPrimaryDataset mgm2Lis3Set = MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_2_LIS3_HANDLER);
RM3100::Rm3100PrimaryDataset mgm3Rm3100Set = RM3100::Rm3100PrimaryDataset(objects::MGM_3_RM3100_HANDLER);
IMTQ::CalibratedMtmMeasurementSet imtqMgmSet = IMTQ::CalibratedMtmMeasurementSet(objects::IMTQ_HANDLER);
PoolEntry<float> mgm0PoolVec = PoolEntry<float>(3);
PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3);

View File

@ -19,39 +19,39 @@ ThermalController::ThermalController(object_id_t objectId, object_id_t parentId)
sensorTemperatures(this),
susTemperatures(this),
deviceTemperatures(this),
max31865Set0(commonObjects::RTD_0_IC3_PLOC_HEATSPREADER,
max31865Set0(objects::RTD_0_IC3_PLOC_HEATSPREADER,
EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set1(commonObjects::RTD_1_IC4_PLOC_MISSIONBOARD,
max31865Set1(objects::RTD_1_IC4_PLOC_MISSIONBOARD,
EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set2(commonObjects::RTD_2_IC5_4K_CAMERA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set3(commonObjects::RTD_3_IC6_DAC_HEATSPREADER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set4(commonObjects::RTD_4_IC7_STARTRACKER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set5(commonObjects::RTD_5_IC8_RW1_MX_MY, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set6(commonObjects::RTD_6_IC9_DRO, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set7(commonObjects::RTD_7_IC10_SCEX, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set8(commonObjects::RTD_8_IC11_X8, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set9(commonObjects::RTD_9_IC12_HPA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set10(commonObjects::RTD_10_IC13_PL_TX, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set11(commonObjects::RTD_11_IC14_MPA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set12(commonObjects::RTD_12_IC15_ACU, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set13(commonObjects::RTD_13_IC16_PLPCDU_HEATSPREADER,
max31865Set2(objects::RTD_2_IC5_4K_CAMERA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set3(objects::RTD_3_IC6_DAC_HEATSPREADER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set4(objects::RTD_4_IC7_STARTRACKER, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set5(objects::RTD_5_IC8_RW1_MX_MY, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set6(objects::RTD_6_IC9_DRO, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set7(objects::RTD_7_IC10_SCEX, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set8(objects::RTD_8_IC11_X8, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set9(objects::RTD_9_IC12_HPA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set10(objects::RTD_10_IC13_PL_TX, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set11(objects::RTD_11_IC14_MPA, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set12(objects::RTD_12_IC15_ACU, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set13(objects::RTD_13_IC16_PLPCDU_HEATSPREADER,
EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set14(commonObjects::RTD_14_IC17_TCS_BOARD, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set15(commonObjects::RTD_15_IC18_IMTQ, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
tmp1075Set1(commonObjects::TMP1075_HANDLER_1),
tmp1075Set2(commonObjects::TMP1075_HANDLER_2),
susSet0(commonObjects::SUS_0_N_LOC_XFYFZM_PT_XF),
susSet1(commonObjects::SUS_1_N_LOC_XBYFZM_PT_XB),
susSet2(commonObjects::SUS_2_N_LOC_XFYBZB_PT_YB),
susSet3(commonObjects::SUS_3_N_LOC_XFYBZF_PT_YF),
susSet4(commonObjects::SUS_4_N_LOC_XMYFZF_PT_ZF),
susSet5(commonObjects::SUS_5_N_LOC_XFYMZB_PT_ZB),
susSet6(commonObjects::SUS_6_R_LOC_XFYBZM_PT_XF),
susSet7(commonObjects::SUS_7_R_LOC_XBYBZM_PT_XB),
susSet8(commonObjects::SUS_8_R_LOC_XBYBZB_PT_YB),
susSet9(commonObjects::SUS_9_R_LOC_XBYBZB_PT_YF),
susSet10(commonObjects::SUS_10_N_LOC_XMYBZF_PT_ZF),
susSet11(commonObjects::SUS_11_R_LOC_XBYMZB_PT_ZB) {}
max31865Set14(objects::RTD_14_IC17_TCS_BOARD, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
max31865Set15(objects::RTD_15_IC18_IMTQ, EiveMax31855::RtdCommands::EXCHANGE_SET_ID),
tmp1075Set1(objects::TMP1075_HANDLER_1),
tmp1075Set2(objects::TMP1075_HANDLER_2),
susSet0(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
susSet1(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
susSet2(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
susSet3(objects::SUS_3_N_LOC_XFYBZF_PT_YF),
susSet4(objects::SUS_4_N_LOC_XMYFZF_PT_ZF),
susSet5(objects::SUS_5_N_LOC_XFYMZB_PT_ZB),
susSet6(objects::SUS_6_R_LOC_XFYBZM_PT_XF),
susSet7(objects::SUS_7_R_LOC_XBYBZM_PT_XB),
susSet8(objects::SUS_8_R_LOC_XBYBZB_PT_YB),
susSet9(objects::SUS_9_R_LOC_XBYBZB_PT_YF),
susSet10(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
susSet11(objects::SUS_11_R_LOC_XBYMZB_PT_ZB) {}
ReturnValue_t ThermalController::initialize() {
auto result = ExtendedControllerBase::initialize();
@ -505,7 +505,7 @@ void ThermalController::copySus() {
}
void ThermalController::copyDevices() {
lp_var_t<float> tempQ7s = lp_var_t<float>(commonObjects::CORE_CONTROLLER, core::PoolIds::TEMPERATURE);
lp_var_t<float> tempQ7s = lp_var_t<float>(objects::CORE_CONTROLLER, core::PoolIds::TEMPERATURE);
ReturnValue_t result = tempQ7s.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read Q7S temperature" << std::endl;
@ -520,7 +520,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> battTemp1 =
lp_var_t<int16_t>(commonObjects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_1);
lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_1);
result = battTemp1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 1" << std::endl;
@ -535,7 +535,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> battTemp2 =
lp_var_t<int16_t>(commonObjects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_2);
lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_2);
result = battTemp2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 2" << std::endl;
@ -550,7 +550,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> battTemp3 =
lp_var_t<int16_t>(commonObjects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_3);
lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_3);
result = battTemp3.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 3" << std::endl;
@ -565,7 +565,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> battTemp4 =
lp_var_t<int16_t>(commonObjects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_4);
lp_var_t<int16_t>(objects::BPX_BATT_HANDLER, BpxBattery::BATT_TEMP_4);
result = battTemp4.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read battery temperature 4" << std::endl;
@ -579,7 +579,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int32_t> tempRw1 = lp_var_t<int32_t>(commonObjects::RW1, RwDefinitions::TEMPERATURE_C);
lp_var_t<int32_t> tempRw1 = lp_var_t<int32_t>(objects::RW1, RwDefinitions::TEMPERATURE_C);
result = tempRw1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read reaction wheel 1 temperature" << std::endl;
@ -593,7 +593,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int32_t> tempRw2 = lp_var_t<int32_t>(commonObjects::RW2, RwDefinitions::TEMPERATURE_C);
lp_var_t<int32_t> tempRw2 = lp_var_t<int32_t>(objects::RW2, RwDefinitions::TEMPERATURE_C);
result = tempRw2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read reaction wheel 2 temperature" << std::endl;
@ -607,7 +607,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int32_t> tempRw3 = lp_var_t<int32_t>(commonObjects::RW3, RwDefinitions::TEMPERATURE_C);
lp_var_t<int32_t> tempRw3 = lp_var_t<int32_t>(objects::RW3, RwDefinitions::TEMPERATURE_C);
result = tempRw3.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read reaction wheel 3 temperature" << std::endl;
@ -621,7 +621,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int32_t> tempRw4 = lp_var_t<int32_t>(commonObjects::RW4, RwDefinitions::TEMPERATURE_C);
lp_var_t<int32_t> tempRw4 = lp_var_t<int32_t>(objects::RW4, RwDefinitions::TEMPERATURE_C);
result = tempRw4.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read reaction wheel 4 temperature" << std::endl;
@ -636,7 +636,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempStartracker =
lp_var_t<float>(commonObjects::STAR_TRACKER, startracker::MCU_TEMPERATURE);
lp_var_t<float>(objects::STAR_TRACKER, startracker::MCU_TEMPERATURE);
result = tempStartracker.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read startracker temperature" << std::endl;
@ -651,7 +651,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempSyrlinksPowerAmplifier =
lp_var_t<float>(commonObjects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_POWER_AMPLIFIER);
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_POWER_AMPLIFIER);
result = tempSyrlinksPowerAmplifier.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read syrlinks power amplifier temperature"
@ -667,7 +667,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempSyrlinksBasebandBoard =
lp_var_t<float>(commonObjects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
lp_var_t<float>(objects::SYRLINKS_HK_HANDLER, syrlinks::TEMP_BASEBAND_BOARD);
result = tempSyrlinksBasebandBoard.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read syrlinks baseband board temperature"
@ -682,7 +682,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<int16_t> tempMgt = lp_var_t<int16_t>(commonObjects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
lp_var_t<int16_t> tempMgt = lp_var_t<int16_t>(objects::IMTQ_HANDLER, IMTQ::MCU_TEMPERATURE);
result = tempMgt.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read MGT temperature" << std::endl;
@ -697,7 +697,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_vec_t<float, 3> tempAcu =
lp_vec_t<float, 3>(commonObjects::ACU_HANDLER, P60System::pool::ACU_TEMPERATURES);
lp_vec_t<float, 3>(objects::ACU_HANDLER, P60System::pool::ACU_TEMPERATURES);
result = tempAcu.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read ACU temperatures" << std::endl;
@ -714,7 +714,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempPdu1 =
lp_var_t<float>(commonObjects::PDU1_HANDLER, P60System::pool::PDU_TEMPERATURE);
lp_var_t<float>(objects::PDU1_HANDLER, P60System::pool::PDU_TEMPERATURE);
result = tempPdu1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read PDU1 temperature" << std::endl;
@ -729,7 +729,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempPdu2 =
lp_var_t<float>(commonObjects::PDU2_HANDLER, P60System::pool::PDU_TEMPERATURE);
lp_var_t<float>(objects::PDU2_HANDLER, P60System::pool::PDU_TEMPERATURE);
result = tempPdu2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read PDU2 temperature" << std::endl;
@ -744,7 +744,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> temp1P60dock =
lp_var_t<float>(commonObjects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_1);
lp_var_t<float>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_1);
result = temp1P60dock.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read P60 dock temperature 1" << std::endl;
@ -759,7 +759,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> temp2P60dock =
lp_var_t<float>(commonObjects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_2);
lp_var_t<float>(objects::P60DOCK_HANDLER, P60System::pool::P60DOCK_TEMPERATURE_2);
result = temp2P60dock.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read P60 dock temperature 2" << std::endl;
@ -773,7 +773,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempGyro0 = lp_var_t<float>(commonObjects::GYRO_0_ADIS_HANDLER, ADIS1650X::TEMPERATURE);
lp_var_t<float> tempGyro0 = lp_var_t<float>(objects::GYRO_0_ADIS_HANDLER, ADIS1650X::TEMPERATURE);
result = tempGyro0.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read gyro 0 temperature" << std::endl;
@ -787,7 +787,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempGyro1 = lp_var_t<float>(commonObjects::GYRO_1_L3G_HANDLER, L3GD20H::TEMPERATURE);
lp_var_t<float> tempGyro1 = lp_var_t<float>(objects::GYRO_1_L3G_HANDLER, L3GD20H::TEMPERATURE);
result = tempGyro1.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read gyro 1 temperature" << std::endl;
@ -801,7 +801,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempGyro2 = lp_var_t<float>(commonObjects::GYRO_2_ADIS_HANDLER, ADIS1650X::TEMPERATURE);
lp_var_t<float> tempGyro2 = lp_var_t<float>(objects::GYRO_2_ADIS_HANDLER, ADIS1650X::TEMPERATURE);
result = tempGyro2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read gyro 2 temperature" << std::endl;
@ -815,7 +815,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempGyro3 = lp_var_t<float>(commonObjects::GYRO_3_L3G_HANDLER, L3GD20H::TEMPERATURE);
lp_var_t<float> tempGyro3 = lp_var_t<float>(objects::GYRO_3_L3G_HANDLER, L3GD20H::TEMPERATURE);
result = tempGyro3.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read gyro 3 temperature" << std::endl;
@ -830,7 +830,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempMgm0 =
lp_var_t<float>(commonObjects::MGM_0_LIS3_HANDLER, MGMLIS3MDL::TEMPERATURE_CELCIUS);
lp_var_t<float>(objects::MGM_0_LIS3_HANDLER, MGMLIS3MDL::TEMPERATURE_CELCIUS);
result = tempMgm0.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read MGM 0 temperature" << std::endl;
@ -845,7 +845,7 @@ void ThermalController::copyDevices() {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempMgm2 =
lp_var_t<float>(commonObjects::MGM_2_LIS3_HANDLER, MGMLIS3MDL::TEMPERATURE_CELCIUS);
lp_var_t<float>(objects::MGM_2_LIS3_HANDLER, MGMLIS3MDL::TEMPERATURE_CELCIUS);
result = tempMgm2.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read MGM 2 temperature" << std::endl;
@ -859,7 +859,7 @@ void ThermalController::copyDevices() {
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to commit" << std::endl;
}
lp_var_t<float> tempAdcPayloadPcdu = lp_var_t<float>(commonObjects::PLPCDU_HANDLER, plpcdu::TEMP);
lp_var_t<float> tempAdcPayloadPcdu = lp_var_t<float>(objects::PLPCDU_HANDLER, plpcdu::TEMP);
result = tempAdcPayloadPcdu.read();
if (result != RETURN_OK) {
sif::warning << "ThermalController: Failed to read payload PCDU ADC temperature" << std::endl;