diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.cpp b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.cpp index 341081d429..730d8764fe 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.cpp @@ -966,7 +966,7 @@ void ApolloRTCCMFD::menuSetMPTInitPage() GC->mptInitError = 0; marker = 0; - markermax = 7; + markermax = 5; } void ApolloRTCCMFD::menuSetDescPlanTablePage() @@ -3748,32 +3748,35 @@ void ApolloRTCCMFD::menuTransferPoweredDescentToMPT() G->TransferPoweredDescentToMPT(); } +void ApolloRTCCMFD::menuCycleMPTTable() +{ + if (GC->rtcc->med_m49.Table == RTCC_MPT_CSM) + { + GC->rtcc->med_m49.Table = GC->rtcc->med_m50.Table = GC->rtcc->med_m51.Table = GC->rtcc->med_m55.Table = RTCC_MPT_LM; + } + else + { + GC->rtcc->med_m49.Table = GC->rtcc->med_m50.Table = GC->rtcc->med_m51.Table = GC->rtcc->med_m55.Table = RTCC_MPT_CSM; + } +} + +void ApolloRTCCMFD::menuCycleMPTMED() +{ + if (G->mptinitmode < 3) + { + G->mptinitmode++; + } + else + { + G->mptinitmode = 0; + } +} + void ApolloRTCCMFD::menuSetMPTInitInput() { switch (marker) { - case 0: - //MED - if (G->mptinitmode < 3) - { - G->mptinitmode++; - } - else - { - G->mptinitmode = 0; - } - break; - case 1: //MPT - if (GC->rtcc->med_m49.Table == RTCC_MPT_CSM) - { - GC->rtcc->med_m49.Table = GC->rtcc->med_m50.Table = GC->rtcc->med_m51.Table = GC->rtcc->med_m55.Table = RTCC_MPT_LM; - } - else - { - GC->rtcc->med_m49.Table = GC->rtcc->med_m50.Table = GC->rtcc->med_m51.Table = GC->rtcc->med_m55.Table = RTCC_MPT_CSM; - } - break; - case 2: //Second option on MED + case 0: //Second option on MED switch (G->mptinitmode) { case 0: //M49: SPS Fuel Remaining @@ -3793,7 +3796,7 @@ void ApolloRTCCMFD::menuSetMPTInitInput() break; } break; - case 3: //Third option on MED + case 1: //Third option on MED switch (G->mptinitmode) { case 0: //M49: CSM RCS Fuel Remaining @@ -3810,7 +3813,7 @@ void ApolloRTCCMFD::menuSetMPTInitInput() break; } break; - case 4: //Fourth option on MED + case 2: //Fourth option on MED switch (G->mptinitmode) { case 0: //M49: S-IVB Fuel Remaining @@ -3827,7 +3830,7 @@ void ApolloRTCCMFD::menuSetMPTInitInput() break; } break; - case 5: //Fifth option on MED + case 3: //Fifth option on MED switch (G->mptinitmode) { case 0: //M49: LM APS Fuel Remaining @@ -3841,7 +3844,7 @@ void ApolloRTCCMFD::menuSetMPTInitInput() break; } break; - case 6: //Sixth option on MED + case 4: //Sixth option on MED switch (G->mptinitmode) { case 0: //M49: LM RCS Fuel Remaining @@ -3855,7 +3858,7 @@ void ApolloRTCCMFD::menuSetMPTInitInput() break; } break; - case 7: //Seventh option on MED + case 5: //Seventh option on MED switch (G->mptinitmode) { case 0: //M49: LM DPS Fuel Remaining diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.h b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.h index 8a9958b955..9879e5ccc7 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.h +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD.h @@ -554,6 +554,8 @@ class ApolloRTCCMFD: public MFD2 { void menuTransferPoweredAscentToMPT(); void menuTransferPoweredDescentToMPT(); void CheckoutMonitorCalc(); + void menuCycleMPTTable(); + void menuCycleMPTMED(); void menuSetMPTInitInput(); void set_MPTInitM55Config(char *cfg); void menuMPTUpdate(); diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp index f4fb57c7ad..87f694b869 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApolloRTCCMFD_Display.cpp @@ -5317,21 +5317,21 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp) skp->SetTextAlign(oapi::Sketchpad::LEFT); - skp->Text(1 * W / 16, (marker + 4) * H / 16, "*", 1); + skp->Text(1 * W / 16, (marker + 6) * H / 16, "*", 1); skp->Text(10 * W / 16, 5 * H / 16, "MPT:", 4); if (G->mptinitmode == 0) { - skp->Text(2 * W / 16, 4 * H / 16, "MED M49: Fuel Remaining", 23); + skp->Text(2 * W / 16, 4 * H / 14, "MED M49: Fuel Remaining", 23); if (GC->rtcc->med_m49.Table == RTCC_MPT_LM) { - skp->Text(2 * W / 16, 5 * H / 16, "Table: LM", 9); + skp->Text(2 * W / 16, 2 * H / 14, "Table: LM", 9); } else { - skp->Text(2 * W / 16, 5 * H / 16, "Table: CSM", 10); + skp->Text(2 * W / 16, 2 * H / 14, "Table: CSM", 10); } if (GC->rtcc->med_m49.SPSFuelRemaining >= 0) @@ -5411,15 +5411,15 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp) } else if (G->mptinitmode == 1) { - skp->Text(2 * W / 16, 4 * H / 16, "MED M50: Weights", 16); + skp->Text(2 * W / 16, 4 * H / 14, "MED M50: Weights", 16); if (GC->rtcc->med_m50.Table == RTCC_MPT_LM) { - skp->Text(2 * W / 16, 5 * H / 16, "Table: LM", 9); + skp->Text(2 * W / 16, 2 * H / 14, "Table: LM", 9); } else { - skp->Text(2 * W / 16, 5 * H / 16, "Table: CSM", 10); + skp->Text(2 * W / 16, 2 * H / 14, "Table: CSM", 10); } if (GC->rtcc->med_m50.CSMWT >= 0) @@ -5481,15 +5481,15 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp) } else if (G->mptinitmode == 2) { - skp->Text(2 * W / 16, 4 * H / 16, "MED M51: Areas", 14); + skp->Text(2 * W / 16, 4 * H / 14, "MED M51: Areas", 14); if (GC->rtcc->med_m51.Table == RTCC_MPT_LM) { - skp->Text(2 * W / 16, 5 * H / 16, "Table: LM", 9); + skp->Text(2 * W / 16, 2 * H / 14, "Table: LM", 9); } else { - skp->Text(2 * W / 16, 5 * H / 16, "Table: CSM", 10); + skp->Text(2 * W / 16, 2 * H / 14, "Table: CSM", 10); } sprintf(Buffer, "CSM %.2f sq ft", GC->rtcc->med_m51.CSMArea / 0.3048 / 0.3048); @@ -5521,15 +5521,15 @@ bool ApolloRTCCMFD::Update(oapi::Sketchpad *skp) } else { - skp->Text(2 * W / 16, 4 * H / 16, "MED M55: Configuration", 22); + skp->Text(2 * W / 16, 4 * H / 14, "MED M55: Configuration", 22); if (GC->rtcc->med_m55.Table == RTCC_MPT_LM) { - skp->Text(2 * W / 16, 5 * H / 16, "Table: LM", 9); + skp->Text(2 * W / 16, 2 * H / 14, "Table: LM", 9); } else { - skp->Text(2 * W / 16, 5 * H / 16, "Table: CSM", 10); + skp->Text(2 * W / 16, 2 * H / 14, "Table: CSM", 10); } if (GC->rtcc->med_m55.ConfigCode == "") diff --git a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp index a884e9e11d..24f9593afd 100644 --- a/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp +++ b/Orbitersdk/samples/ProjectApollo/src_rtccmfd/ApollomfdButtons.cpp @@ -2011,16 +2011,16 @@ ApolloRTCCMFDButtons::ApolloRTCCMFDButtons() static const MFDBUTTONMENU mnu59[] = { - { "Set input", 0, 'S' }, + { "Choose Table", 0, 'T' }, + { "Choose MED", 0, 'E' }, + { "Update MPT", 0, 'M' }, { "Previous Item", 0, 'P' }, { "Next Item", 0, 'N' }, - { "", 0, ' ' }, - { "", 0, ' ' }, - { "", 0, ' ' }, + { "Set input", 0, 'S' }, { "Select vehicle", 0, 'D' }, { "Auto update of parameters", 0, 'U' }, - { "Update MPT", 0, 'M' }, + { "", 0, ' ' }, { "", 0, ' ' }, { "Vector Panel Summary", 0, 'P' }, { "Back to menu", 0, 'B' }, @@ -2028,16 +2028,16 @@ ApolloRTCCMFDButtons::ApolloRTCCMFDButtons() RegisterPage(mnu59, sizeof(mnu59) / sizeof(MFDBUTTONMENU)); - RegisterFunction("SET", OAPI_KEY_S, &ApolloRTCCMFD::menuSetMPTInitInput); + RegisterFunction("TAB", OAPI_KEY_A, &ApolloRTCCMFD::menuCycleMPTTable); + RegisterFunction("MED", OAPI_KEY_E, &ApolloRTCCMFD::menuCycleMPTMED); + RegisterFunction("UPD", OAPI_KEY_M, &ApolloRTCCMFD::menuMPTUpdate); RegisterFunction("<<", OAPI_KEY_P, &ApolloRTCCMFD::menuCycleMarkerDown); RegisterFunction(">>", OAPI_KEY_N, &ApolloRTCCMFD::menuCycleMarkerUp); - RegisterFunction("", OAPI_KEY_A, &ApolloRTCCMFD::menuVoid); - RegisterFunction("", OAPI_KEY_C, &ApolloRTCCMFD::menuVoid); - RegisterFunction("", OAPI_KEY_E, &ApolloRTCCMFD::menuVoid); + RegisterFunction("SET", OAPI_KEY_S, &ApolloRTCCMFD::menuSetMPTInitInput); RegisterFunction("TGT", OAPI_KEY_D, &ApolloRTCCMFD::menuMPTInitM50M55Vehicle); RegisterFunction("AUT", OAPI_KEY_U, &ApolloRTCCMFD::menuMPTInitAutoUpdate); - RegisterFunction("UPD", OAPI_KEY_M, &ApolloRTCCMFD::menuMPTUpdate); + RegisterFunction("", OAPI_KEY_C, &ApolloRTCCMFD::menuVoid); RegisterFunction("", OAPI_KEY_N, &ApolloRTCCMFD::menuVoid); RegisterFunction("VPS", OAPI_KEY_P, &ApolloRTCCMFD::menuVectorPanelSummaryPage); RegisterFunction("BCK", OAPI_KEY_B, &ApolloRTCCMFD::menuSetMPTPage);