Repository for import to local machine
Dependencies: DMBasicGUI DMSupport
Diff: main.cpp
- Revision:
- 6:dba3fbdfd5da
- Parent:
- 5:aceac1035d71
- Child:
- 7:f0e645cf73a2
--- a/main.cpp Mon Jul 24 15:57:36 2017 +0000 +++ b/main.cpp Thu Jul 27 16:17:56 2017 +0000 @@ -39,7 +39,7 @@ #include "USBHostGCUtilities.h" -#define BUILD_DATE "24 July 2017" // Copied to easyGUI variable "GuiVar_buildDate", displayed on both Settings pages (normal and Running). +#define BUILD_DATE "27 July 2017" // Copied to easyGUI variable "GuiVar_buildDate", displayed on both Settings pages (normal and Running). // *** MUST update for each 'delivered' build, MUST correspond with date on 'delivered' binary file *** // This should be updated first thing every morning, and immediately after every 'delivery' // (to e.g. "dd mmm yyyy #2"), so that it is ready for the next one. @@ -755,9 +755,8 @@ break; case GuiStruct_InjectorPage1_3: + case GuiStruct_InjectorMethodPage_Def: case GuiStruct_InjectorTempProfilePage_25: - case GuiStruct_InjectorGasStatusPage_30: - case GuiStruct_InjectorConsumablesPage_20: // Injector status rectangle no longer used //singleGCComponentPageStatusColorAreas.DisplayGCComponentStatus(INJECTOR); qspiBitmaps.DisplayInjectorComponentBitmap(); @@ -778,6 +777,7 @@ break; case GuiStruct_GasProfilePage_15: + case GuiStruct_GasMethodPage_Def: case GuiStruct_GasInformationPage_6: #ifdef WANT_STATUS_RECTANGLE_ON_GAS_CALIB_PAGES case GuiStruct_GasCalibrationPage_Def: @@ -976,8 +976,26 @@ (structureIndex == GuiStruct_ColumnMethodPage_Def) || (structureIndex == GuiStruct_ColumnTempProfilePage_60)) { SetupDoorActuatorCommandUserInterface(usbDevice, usbHostGC, false); - } + } + if(structureIndex == GuiStruct_ColumnMethodPage_Def) { + if(getGCStatusLoop != NULL) { + getGCStatusLoop->ShowColumnMethodPageScrollButtonsIfNecessary(); + } + } + + if(structureIndex == GuiStruct_InjectorMethodPage_Def) { + if(getGCStatusLoop != NULL) { + getGCStatusLoop->ShowInjectorMethodPageScrollButtonsIfNecessary(); + } + } + + if(structureIndex == GuiStruct_GasMethodPage_Def) { + if(getGCStatusLoop != NULL) { + getGCStatusLoop->ShowGasMethodPageScrollButtonsIfNecessary(); + } + } + if(structureIndex == GuiStruct_RunningPage1_7) { if(getGCStatusLoop != NULL) { getGCStatusLoop->UpdateAndDisplayRunningPage1ProgressBar(false); @@ -1626,7 +1644,7 @@ } -static void RemoveUnitsFromEasyGUIStringIfFound(char* destination, GuiConst_TEXT* easyGUIString, char* units) +static void RemoveUnitsFromEasyGUIStringIfFound(char* destination, GuiConst_TEXT* easyGUIString, const char* units) { strcpy(destination, easyGUIString); @@ -1860,10 +1878,9 @@ NumericKeypadPageHandler* numericKeypadPageHandler = NumericKeypadPageHandler::GetInstance(usbDevice, usbHostGC); if(numericKeypadPageHandler != NULL) { - // Remove units ("deg C")from the initial value to be displayed in the keypad + // Remove units from the initial value to be displayed in the keypad char temp[50]; - RemoveUnitsFromEasyGUIStringIfFound(temp, GuiVar_columnMaxTemp2, " deg C"); // Remove space before units as well as the units themselves - + RemoveUnitsFromEasyGUIStringIfFound(temp, GuiVar_columnMaxTemp2, GetGCStatusLoop::GetDegCUnitsWithSpace()); int easyGUICallingPage = GuiStruct_ColumnPage1_2; if (touchAreaIndex == COLUMN_PAGE2_EDIT_COLUMN_MAX_TEMP) { easyGUICallingPage = GuiStruct_ColumnPage2_9; @@ -1874,7 +1891,7 @@ numericKeypadPageHandler->SetEasyGUICallingPage(easyGUICallingPage); numericKeypadPageHandler->SetEditVariableRange(0, 500); numericKeypadPageHandler->SetEditVariableName("Col. Max Temp"); - numericKeypadPageHandler->SetEditVariableUnits("deg C"); + numericKeypadPageHandler->SetEditVariableUnits(GetGCStatusLoop::GetDegCUnitsWithoutSpace()); numericKeypadPageHandler->SetApplyFunctionPtr(&SetColumnMaxTempFromEasyGuiVariable); numericKeypadPageHandler->DisplayEasyGUIPage(); } @@ -2097,6 +2114,22 @@ } #endif // SERVICE_INTERVALS_ACTIVE } // Service interval + + if(!dealtWithTouch) { + if(touchAreaIndex == COLUMN_METHOD_SCROLL_UP) { + getGCStatusLoop->ScrollColumnMethodRampsUpIfPossible(); + dealtWithTouch = true; + } else if(touchAreaIndex == COLUMN_METHOD_SCROLL_DOWN) { + getGCStatusLoop->ScrollColumnMethodRampsDownIfPossible(); + dealtWithTouch = true; + } else if(touchAreaIndex == INJECTOR_METHOD_SCROLL_UP) { + getGCStatusLoop->ScrollInjectorMethodRampsUpIfPossible(); + dealtWithTouch = true; + } else if(touchAreaIndex == INJECTOR_METHOD_SCROLL_DOWN) { + getGCStatusLoop->ScrollInjectorMethodRampsDownIfPossible(); + dealtWithTouch = true; + } + } } }