Repository for import to local machine
Dependencies: DMBasicGUI DMSupport
GetGCStatusLoop.h@6:dba3fbdfd5da, 2017-07-27 (annotated)
- Committer:
- jmitc91516
- Date:
- Thu Jul 27 16:17:56 2017 +0000
- Revision:
- 6:dba3fbdfd5da
- Parent:
- 5:aceac1035d71
Close of play 27 July 2017
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmitc91516 | 0:47c880c1463d | 1 | #ifndef GETGCSTATUSLOOP_H |
jmitc91516 | 0:47c880c1463d | 2 | #define GETGCSTATUSLOOP_H |
jmitc91516 | 0:47c880c1463d | 3 | |
jmitc91516 | 0:47c880c1463d | 4 | #include "USBHostGC.h" |
jmitc91516 | 0:47c880c1463d | 5 | #include "GuiLib.h" |
jmitc91516 | 0:47c880c1463d | 6 | |
jmitc91516 | 0:47c880c1463d | 7 | #include "GCComponentStatusEnums.h" |
jmitc91516 | 0:47c880c1463d | 8 | #include "GCComponentStatusColorArea.h" |
jmitc91516 | 1:a5258871b33d | 9 | #include "GCComponentTypeEnums.h" |
jmitc91516 | 1:a5258871b33d | 10 | #include "GCIgnitionStateEnum.h" |
jmitc91516 | 1:a5258871b33d | 11 | |
jmitc91516 | 1:a5258871b33d | 12 | #include "GCStateAndFaultCodes.h" |
jmitc91516 | 1:a5258871b33d | 13 | #include "TouchPanelPageSelector.h" |
jmitc91516 | 1:a5258871b33d | 14 | #include "EasyGUITouchAreaIndices.h" |
jmitc91516 | 1:a5258871b33d | 15 | #include "SimplifiedTouchListener.h" |
jmitc91516 | 1:a5258871b33d | 16 | #include "EthernetHandler.h" |
jmitc91516 | 1:a5258871b33d | 17 | #include "ProgressBar.h" |
jmitc91516 | 1:a5258871b33d | 18 | #include "QSPIBitmap.h" |
jmitc91516 | 6:dba3fbdfd5da | 19 | #include "MethodRampData.h" |
jmitc91516 | 1:a5258871b33d | 20 | |
jmitc91516 | 1:a5258871b33d | 21 | #include "EthernetInterface.h" |
jmitc91516 | 1:a5258871b33d | 22 | |
jmitc91516 | 1:a5258871b33d | 23 | #include "GuiLibGraph.h" |
jmitc91516 | 0:47c880c1463d | 24 | |
jmitc91516 | 0:47c880c1463d | 25 | |
jmitc91516 | 1:a5258871b33d | 26 | /* |
jmitc91516 | 1:a5258871b33d | 27 | Together with functions in main.cpp - especially TouchCallback - this class does most of the work |
jmitc91516 | 1:a5258871b33d | 28 | of interfacing with and controlling the GC. After the appropriate setting up and initialisation, |
jmitc91516 | 1:a5258871b33d | 29 | the main() function calls this class's member function MainLoopWithEthernet - which never returns. |
jmitc91516 | 1:a5258871b33d | 30 | |
jmitc91516 | 1:a5258871b33d | 31 | Note that GetGCStatusLoop is a singleton - we do not need or want there to be more than one instance of it |
jmitc91516 | 1:a5258871b33d | 32 | (there is only one GC, and only one LPC4088). On creation, the instance is passed pointers to the USBHostGC instance |
jmitc91516 | 1:a5258871b33d | 33 | and the USB device corresponding to the GC. |
jmitc91516 | 1:a5258871b33d | 34 | */ |
jmitc91516 | 0:47c880c1463d | 35 | class GetGCStatusLoop { |
jmitc91516 | 0:47c880c1463d | 36 | public: |
jmitc91516 | 0:47c880c1463d | 37 | /** |
jmitc91516 | 0:47c880c1463d | 38 | * Static method to create (if necessary) and retrieve the single GetGCStatusLoop instance |
jmitc91516 | 0:47c880c1463d | 39 | */ |
jmitc91516 | 0:47c880c1463d | 40 | static GetGCStatusLoop * GetInstance(USBDeviceConnected* newUsbDevice, USBHostGC* newUsbHostGC); |
jmitc91516 | 0:47c880c1463d | 41 | |
jmitc91516 | 1:a5258871b33d | 42 | /* |
jmitc91516 | 1:a5258871b33d | 43 | * Static method to return the current instance, if it exists. If not, this function |
jmitc91516 | 1:a5258871b33d | 44 | * will return NULL - it will *not* create a new instance |
jmitc91516 | 1:a5258871b33d | 45 | */ |
jmitc91516 | 1:a5258871b33d | 46 | static GetGCStatusLoop * GetInstance(void); |
jmitc91516 | 1:a5258871b33d | 47 | |
jmitc91516 | 0:47c880c1463d | 48 | GuiConst_INT16U GetCurrentPage(void); |
jmitc91516 | 0:47c880c1463d | 49 | void SetCurrentPage(GuiConst_INT16U newCurrentPage); |
jmitc91516 | 0:47c880c1463d | 50 | |
jmitc91516 | 0:47c880c1463d | 51 | void SetHomePageGCComponentStatusColorAreas(HomePageGCComponentStatusColorAreas* newColorAreas); |
jmitc91516 | 0:47c880c1463d | 52 | |
jmitc91516 | 0:47c880c1463d | 53 | void SetSingleGCComponentPageStatusColorAreas(SingleGCComponentPageStatusColorAreas* newColorAreas); |
jmitc91516 | 0:47c880c1463d | 54 | |
jmitc91516 | 1:a5258871b33d | 55 | void UpdateHomePageGCComponentStatusColorAreas(void); |
jmitc91516 | 1:a5258871b33d | 56 | |
jmitc91516 | 1:a5258871b33d | 57 | void UpdateSingleGCComponentPageStatusColorArea(GCComponent component); |
jmitc91516 | 1:a5258871b33d | 58 | |
jmitc91516 | 1:a5258871b33d | 59 | void UpdateAllGCComponentStatusColorAreas(void); |
jmitc91516 | 1:a5258871b33d | 60 | |
jmitc91516 | 0:47c880c1463d | 61 | void SetupAllEasyGUIVariables(void); |
jmitc91516 | 0:47c880c1463d | 62 | |
jmitc91516 | 0:47c880c1463d | 63 | void ExitedGCStandbyMode(void); |
jmitc91516 | 1:a5258871b33d | 64 | |
jmitc91516 | 1:a5258871b33d | 65 | void UpdateGCMethodRunningProfiles(void); |
jmitc91516 | 0:47c880c1463d | 66 | |
jmitc91516 | 1:a5258871b33d | 67 | // Need to call this from DisplayEasyGuiStructure function in main.cpp |
jmitc91516 | 1:a5258871b33d | 68 | void DisplayInjectorTempProfilePageGraph(void); |
jmitc91516 | 1:a5258871b33d | 69 | |
jmitc91516 | 1:a5258871b33d | 70 | // Need to call this from DisplayEasyGuiStructure function in main.cpp |
jmitc91516 | 1:a5258871b33d | 71 | void DisplayGasFlowProfilePageGraph(void); |
jmitc91516 | 1:a5258871b33d | 72 | |
jmitc91516 | 1:a5258871b33d | 73 | // Need to call this from DisplayEasyGuiStructure function in main.cpp |
jmitc91516 | 1:a5258871b33d | 74 | void DisplayColumnTempProfilePageGraph(ColumnType columnType); |
jmitc91516 | 1:a5258871b33d | 75 | |
jmitc91516 | 1:a5258871b33d | 76 | void ForceUpdateOfGasCalibrationPage(void); |
jmitc91516 | 1:a5258871b33d | 77 | |
jmitc91516 | 1:a5258871b33d | 78 | void ForceUpdateOfColumnDHAutoCalibrationPage(void); |
jmitc91516 | 1:a5258871b33d | 79 | void ForceUpdateOfColumnDHManualCalibrationPage(void); |
jmitc91516 | 1:a5258871b33d | 80 | void ForceUpdateOfColumnDHSensorCalibrationPage(void); |
jmitc91516 | 1:a5258871b33d | 81 | void ForceUpdateOfColumnDHPSUDACPage(void); |
jmitc91516 | 1:a5258871b33d | 82 | |
jmitc91516 | 1:a5258871b33d | 83 | void ForceUpdateOfGasBackPressureDACPage(void); |
jmitc91516 | 1:a5258871b33d | 84 | void ForceUpdateOfGasChannelDACAndADCPage(void); |
jmitc91516 | 1:a5258871b33d | 85 | |
jmitc91516 | 1:a5258871b33d | 86 | void SetGCIsRunning(void); |
jmitc91516 | 1:a5258871b33d | 87 | void ClearGCIsRunning(void); |
jmitc91516 | 1:a5258871b33d | 88 | bool GetGCIsRunningFlag(void); |
jmitc91516 | 1:a5258871b33d | 89 | |
jmitc91516 | 1:a5258871b33d | 90 | bool UpdateMethodRunTimeEasyGUIVariables(bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 91 | void UpdateAndDisplayRunningPage1ProgressBar(bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 92 | void SetRunningPage1ProgressBarToZero(void); |
jmitc91516 | 1:a5258871b33d | 93 | |
jmitc91516 | 1:a5258871b33d | 94 | void UpdateColumnStatusEasyGUIVariable(void); |
jmitc91516 | 1:a5258871b33d | 95 | void UpdateInjectorStatusEasyGUIVariable(void); |
jmitc91516 | 1:a5258871b33d | 96 | |
jmitc91516 | 1:a5258871b33d | 97 | static void TimerCallback(void const * argument); |
jmitc91516 | 1:a5258871b33d | 98 | |
jmitc91516 | 1:a5258871b33d | 99 | void ForceRestart(void); |
jmitc91516 | 1:a5258871b33d | 100 | |
jmitc91516 | 1:a5258871b33d | 101 | void RedisplayColumnCalibrationPage(void); |
jmitc91516 | 1:a5258871b33d | 102 | |
jmitc91516 | 1:a5258871b33d | 103 | void RedisplayColumnPage(void); |
jmitc91516 | 1:a5258871b33d | 104 | |
jmitc91516 | 1:a5258871b33d | 105 | static void DisplayColumnLockAndReleaseButtons(void); |
jmitc91516 | 1:a5258871b33d | 106 | |
jmitc91516 | 1:a5258871b33d | 107 | void SetQSPIBitmaps(QSPIBitmaps* ptrToQSPIBitmaps); |
jmitc91516 | 1:a5258871b33d | 108 | |
jmitc91516 | 1:a5258871b33d | 109 | void SetupTemperatureWhileRunningEasyGUIVariables(void); |
jmitc91516 | 1:a5258871b33d | 110 | |
jmitc91516 | 1:a5258871b33d | 111 | void SetupGCNotReadyStateEasyGUIVariable(void); |
jmitc91516 | 1:a5258871b33d | 112 | |
jmitc91516 | 6:dba3fbdfd5da | 113 | void ShowColumnMethodPageScrollButtonsIfNecessary(void); |
jmitc91516 | 6:dba3fbdfd5da | 114 | void ScrollColumnMethodRampsUpIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 115 | void ScrollColumnMethodRampsDownIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 116 | |
jmitc91516 | 6:dba3fbdfd5da | 117 | void ShowInjectorMethodPageScrollButtonsIfNecessary(void); |
jmitc91516 | 6:dba3fbdfd5da | 118 | void ScrollInjectorMethodRampsUpIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 119 | void ScrollInjectorMethodRampsDownIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 120 | |
jmitc91516 | 6:dba3fbdfd5da | 121 | void ShowGasMethodPageScrollButtonsIfNecessary(void); |
jmitc91516 | 6:dba3fbdfd5da | 122 | void ScrollGasMethodRampsUpIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 123 | void ScrollGasMethodRampsDownIfPossible(void); |
jmitc91516 | 6:dba3fbdfd5da | 124 | |
jmitc91516 | 6:dba3fbdfd5da | 125 | static const char *GetDegCUnitsWithSpace(void); |
jmitc91516 | 6:dba3fbdfd5da | 126 | static const char *GetDegCUnitsWithoutSpace(void); |
jmitc91516 | 6:dba3fbdfd5da | 127 | |
jmitc91516 | 6:dba3fbdfd5da | 128 | |
jmitc91516 | 1:a5258871b33d | 129 | /* ** This never returns ** */ |
jmitc91516 | 1:a5258871b33d | 130 | void MainLoopWithEthernet(DMBoard* board); |
jmitc91516 | 0:47c880c1463d | 131 | |
jmitc91516 | 0:47c880c1463d | 132 | private: |
jmitc91516 | 0:47c880c1463d | 133 | static GetGCStatusLoop * theGetGCStatusLoop; |
jmitc91516 | 0:47c880c1463d | 134 | |
jmitc91516 | 0:47c880c1463d | 135 | // singleton class -> constructor is private |
jmitc91516 | 0:47c880c1463d | 136 | GetGCStatusLoop(USBDeviceConnected* newUsbDevice, USBHostGC* newUsbHostGC); |
jmitc91516 | 0:47c880c1463d | 137 | ~GetGCStatusLoop(); |
jmitc91516 | 0:47c880c1463d | 138 | |
jmitc91516 | 0:47c880c1463d | 139 | USBDeviceConnected* usbDevice; |
jmitc91516 | 0:47c880c1463d | 140 | USBHostGC* usbHostGC; |
jmitc91516 | 0:47c880c1463d | 141 | |
jmitc91516 | 0:47c880c1463d | 142 | GuiConst_INT16U currentPage; // This is the easyGUI 'Structure' value (see GuiStruct.h) |
jmitc91516 | 0:47c880c1463d | 143 | |
jmitc91516 | 1:a5258871b33d | 144 | ProgressBar* runningPage1ProgressBar; |
jmitc91516 | 1:a5258871b33d | 145 | |
jmitc91516 | 1:a5258871b33d | 146 | GuiLibGraph* runningColumnPageGraph; // Graph index 0 |
jmitc91516 | 1:a5258871b33d | 147 | GuiLibGraphDataSet* runningColumnPageGraphCompleteProfileDataSet; // Line representing the complete temperature profile from start to finish |
jmitc91516 | 1:a5258871b33d | 148 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 149 | // The data set numbers correspond with those set for the graph in easyGUI (as do the colours). |
jmitc91516 | 1:a5258871b33d | 150 | GuiLibGraphDataSet* runningColumnPageGraphDataSet0; // Line representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 151 | GuiLibGraphDataSet* runningColumnPageGraphDataSet1; // Bars representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 152 | GuiLibGraphDataSet* runningColumnPageGraphDataSet2; // Line representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 153 | GuiLibGraphDataSet* runningColumnPageGraphDataSet3; // Bars representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 154 | GuiLibGraphDataSet* runningColumnPageGraphDataSet4; // Dot representing the temperature 'now' (red) |
jmitc91516 | 1:a5258871b33d | 155 | float previousColumnMethodRunTime; |
jmitc91516 | 1:a5258871b33d | 156 | bool columnMethodFinished; |
jmitc91516 | 1:a5258871b33d | 157 | |
jmitc91516 | 1:a5258871b33d | 158 | GuiLibGraph* runningGasPageGraph; // Graph index 1 |
jmitc91516 | 1:a5258871b33d | 159 | GuiLibGraphDataSet* runningGasPageGraphCompleteProfileDataSet; // Line representing the complete flow profile from start to finish |
jmitc91516 | 1:a5258871b33d | 160 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 161 | // The data set numbers correspond with those set for the graph in easyGUI. |
jmitc91516 | 1:a5258871b33d | 162 | GuiLibGraphDataSet* runningGasPageGraphDataSet0; // Line representing the flow profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 163 | GuiLibGraphDataSet* runningGasPageGraphDataSet1; // Bars representing the flow profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 164 | GuiLibGraphDataSet* runningGasPageGraphDataSet2; // Line representing the flow profile from start to 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 165 | GuiLibGraphDataSet* runningGasPageGraphDataSet3; // Bars representing the flow profile from start to 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 166 | GuiLibGraphDataSet* runningGasPageGraphDataSet4; // Dot representing the temperature 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 167 | float previousGasMethodRunTime; |
jmitc91516 | 1:a5258871b33d | 168 | bool gasMethodFinished; |
jmitc91516 | 1:a5258871b33d | 169 | |
jmitc91516 | 1:a5258871b33d | 170 | GuiLibGraph* injectorTempProfilePageGraph; // Graph index 2 |
jmitc91516 | 1:a5258871b33d | 171 | GuiLibGraphDataSet* injectorTempProfilePageGraphCompleteProfileDataSet; // Line representing the complete temperature profile from start to finish |
jmitc91516 | 1:a5258871b33d | 172 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 173 | // The data set numbers correspond with those set for the graph in easyGUI (as do the colours). |
jmitc91516 | 1:a5258871b33d | 174 | GuiLibGraphDataSet* injectorTempProfilePageGraphDataSet0; // Line representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 175 | GuiLibGraphDataSet* injectorTempProfilePageGraphDataSet1; // Bars representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 176 | GuiLibGraphDataSet* injectorTempProfilePageGraphDataSet2; // Line representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 177 | GuiLibGraphDataSet* injectorTempProfilePageGraphDataSet3; // Bars representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 178 | GuiLibGraphDataSet* injectorTempProfilePageGraphDataSet4; // Dot representing the temperature 'now' (red) |
jmitc91516 | 1:a5258871b33d | 179 | |
jmitc91516 | 1:a5258871b33d | 180 | GuiLibGraph* gasFlowProfilePageGraph; // Graph index 3 |
jmitc91516 | 1:a5258871b33d | 181 | GuiLibGraphDataSet* gasFlowProfilePageGraphCompleteProfileDataSet; // Line representing the complete flow profile from start to finish |
jmitc91516 | 1:a5258871b33d | 182 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 183 | // The data set numbers correspond with those set for the graph in easyGUI. |
jmitc91516 | 1:a5258871b33d | 184 | GuiLibGraphDataSet* gasFlowProfilePageGraphDataSet0; // Line representing the flow profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 185 | GuiLibGraphDataSet* gasFlowProfilePageGraphDataSet1; // Bars representing the flow profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 186 | GuiLibGraphDataSet* gasFlowProfilePageGraphDataSet2; // Line representing the flow profile from start to 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 187 | GuiLibGraphDataSet* gasFlowProfilePageGraphDataSet3; // Bars representing the flow profile from start to 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 188 | GuiLibGraphDataSet* gasFlowProfilePageGraphDataSet4; // Dot representing the temperature 'now' (blue) |
jmitc91516 | 1:a5258871b33d | 189 | |
jmitc91516 | 1:a5258871b33d | 190 | GuiLibGraph* columnTempProfilePageGraph; // Graph index 4 |
jmitc91516 | 1:a5258871b33d | 191 | GuiLibGraphDataSet* columnTempProfilePageGraphCompleteProfileDataSet; // Line representing the complete temperature profile from start to finish |
jmitc91516 | 1:a5258871b33d | 192 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 193 | // The data set numbers correspond with those set for the graph in easyGUI (as do the colours). |
jmitc91516 | 1:a5258871b33d | 194 | GuiLibGraphDataSet* columnTempProfilePageGraphDataSet0; // Line representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 195 | GuiLibGraphDataSet* columnTempProfilePageGraphDataSet1; // Bars representing the temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 196 | GuiLibGraphDataSet* columnTempProfilePageGraphDataSet2; // Line representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 197 | GuiLibGraphDataSet* columnTempProfilePageGraphDataSet3; // Bars representing the temperature profile from start to 'now' (red) |
jmitc91516 | 1:a5258871b33d | 198 | GuiLibGraphDataSet* columnTempProfilePageGraphDataSet4; // Dot representing the temperature 'now' (red) |
jmitc91516 | 1:a5258871b33d | 199 | |
jmitc91516 | 1:a5258871b33d | 200 | GuiLibGraph* runningInjectorPageGraph; // Graph index 6 |
jmitc91516 | 1:a5258871b33d | 201 | GuiLibGraphDataSet* runningInjectorPageGraphCompleteProfileDataSet; // Line representing the complete injector temperature profile from start to finish |
jmitc91516 | 1:a5258871b33d | 202 | // We do not display the above data set in the graph - we use it to generate the data sets below. |
jmitc91516 | 1:a5258871b33d | 203 | // The data set numbers correspond with those set for the graph in easyGUI. |
jmitc91516 | 1:a5258871b33d | 204 | GuiLibGraphDataSet* runningInjectorPageGraphDataSet0; // Line representing the injector temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 205 | GuiLibGraphDataSet* runningInjectorPageGraphDataSet1; // Bars representing the injector temperature profile from 'now' to finish (green) |
jmitc91516 | 1:a5258871b33d | 206 | GuiLibGraphDataSet* runningInjectorPageGraphDataSet2; // Line representing the injector temperature profile from start to 'now' (yellow) |
jmitc91516 | 1:a5258871b33d | 207 | GuiLibGraphDataSet* runningInjectorPageGraphDataSet3; // Bars representing the injector temperature profile from start to 'now' (yellow) |
jmitc91516 | 1:a5258871b33d | 208 | GuiLibGraphDataSet* runningInjectorPageGraphDataSet4; // Dot representing the temperature 'now' (yellow) |
jmitc91516 | 1:a5258871b33d | 209 | float previousInjectorMethodRunTime; |
jmitc91516 | 1:a5258871b33d | 210 | bool injectorMethodFinished; |
jmitc91516 | 1:a5258871b33d | 211 | |
jmitc91516 | 1:a5258871b33d | 212 | void RedrawSingleEasyGUIVariableOnComponentPage(GuiConst_INT16S X, GuiConst_INT16S Y, void *varPtr, GuiConst_INT8U alignment, GCComponent gcComponent); |
jmitc91516 | 1:a5258871b33d | 213 | void RedrawSingleEasyGUIVariableOnHomePage(GuiConst_INT16S X, GuiConst_INT16S Y, void *varPtr, GuiConst_INT8U alignment); |
jmitc91516 | 1:a5258871b33d | 214 | |
jmitc91516 | 1:a5258871b33d | 215 | void DrawColumnTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 216 | void DrawInjectorTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 217 | void DrawDetectorTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 218 | void DrawColumnTargetTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 219 | void DrawInjectorTargetTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 220 | void DrawDetectorTargetTemperatureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 221 | void DrawGasPressureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 222 | void DrawGasTargetPressureVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 223 | void DrawGCRealTimeClockVariableOnHomePage(void); |
jmitc91516 | 1:a5258871b33d | 224 | |
jmitc91516 | 1:a5258871b33d | 225 | void DrawDetectorTemperatureVariableOnDetectorPage(void); |
jmitc91516 | 1:a5258871b33d | 226 | void DrawDetectorTargetTemperatureVariableOnDetectorPage(void); |
jmitc91516 | 1:a5258871b33d | 227 | |
jmitc91516 | 1:a5258871b33d | 228 | void UpdateGasTargetPressuresOnHomePage(char *buffer); |
jmitc91516 | 1:a5258871b33d | 229 | |
jmitc91516 | 0:47c880c1463d | 230 | void DisplayHomePageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 231 | void DisplayColumnPageData(bool mustUpdateDisplay, ColumnType columnType, int pageNumber); |
jmitc91516 | 1:a5258871b33d | 232 | void DisplayColumnInformationPageData(bool mustUpdateDisplay, ColumnType columnType, int pageNumber); |
jmitc91516 | 5:aceac1035d71 | 233 | void DisplayColumnMethodPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 234 | void DisplayColumnTempProfilePageData(bool mustUpdateDisplay, ColumnType columnType, int pageNumber); |
jmitc91516 | 1:a5258871b33d | 235 | void DisplayColumnDHAutoCalibrationPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 236 | void DisplayColumnDHManualCalibrationPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 237 | void DisplayColumnDHSensorCalibrationPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 238 | void DisplayColumnDHPSUDACPageData(bool mustUpdateDisplay); |
jmitc91516 | 0:47c880c1463d | 239 | void DisplayInjectorPageData(bool mustUpdateDisplay); |
jmitc91516 | 6:dba3fbdfd5da | 240 | void DisplayInjectorMethodPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 241 | void DisplayInjectorTempProfilePageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 242 | void DisplayDetectorPageData(bool mustUpdateDisplay, DetectorType detectorType, int pageNumber); |
jmitc91516 | 1:a5258871b33d | 243 | void DisplayGasInformationPageData(bool mustUpdateDisplay); |
jmitc91516 | 6:dba3fbdfd5da | 244 | void DisplayGasMethodPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 245 | void DisplayGasFlowProfilePageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 246 | void DisplayGasCalibrationPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 247 | void DisplayGasBackPressureDACPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 248 | void DisplayGasChannelDACAndADCPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 249 | |
jmitc91516 | 1:a5258871b33d | 250 | void DisplaySimplePageData(int pageNumber, bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 251 | void DisplayColumnOvenNudgeAndDampPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 252 | void DisplayColumnDHNudgeAndDampPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 253 | void DisplayInjectorNudgeAndDampPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 254 | void DisplayDetectorNudgeAndDampPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 255 | void DisplayAuxiliaryNudgeAndDampPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 256 | void DisplayFanPowerPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 257 | void DisplayDebugCommandsPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 258 | |
jmitc91516 | 1:a5258871b33d | 259 | void DisplayRunningPageData(bool mustUpdateDisplay, bool runHasCompleted); |
jmitc91516 | 0:47c880c1463d | 260 | void DisplaySettingsPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 261 | void DisplayRunningColumnPageData(bool mustUpdateDisplay, bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 262 | void DisplayRunningDetectorPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 263 | void DisplayRunningGasPageData(bool mustUpdateDisplay, bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 264 | void DisplayRunningInjectorPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 265 | void DisplayRunningInjectorProfilePageData(bool mustUpdateDisplay, bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 266 | |
jmitc91516 | 1:a5258871b33d | 267 | void DisplayServicingRequiredPage(void); |
jmitc91516 | 1:a5258871b33d | 268 | void DisplayServicingPage(void); |
jmitc91516 | 1:a5258871b33d | 269 | |
jmitc91516 | 1:a5258871b33d | 270 | void SetupServicingPageEasyGUIVariables(void); |
jmitc91516 | 0:47c880c1463d | 271 | |
jmitc91516 | 0:47c880c1463d | 272 | void DisplayCurrentPageData(bool mustUpdateDisplay); |
jmitc91516 | 1:a5258871b33d | 273 | |
jmitc91516 | 1:a5258871b33d | 274 | void DisplayEthernetConnectionPage(void); |
jmitc91516 | 1:a5258871b33d | 275 | |
jmitc91516 | 1:a5258871b33d | 276 | void DisplayFailedToFindBitmapsPage(void); |
jmitc91516 | 0:47c880c1463d | 277 | |
jmitc91516 | 1:a5258871b33d | 278 | void DisplayDownloadingMethodPage(void); |
jmitc91516 | 1:a5258871b33d | 279 | void UndisplayDownloadingMethodPage(void); |
jmitc91516 | 1:a5258871b33d | 280 | |
jmitc91516 | 1:a5258871b33d | 281 | void CreateGuiLibGraphsAndDataSets(void); |
jmitc91516 | 1:a5258871b33d | 282 | |
jmitc91516 | 1:a5258871b33d | 283 | void SetupColumnAndInjectorAndGasProfileData(void); |
jmitc91516 | 1:a5258871b33d | 284 | |
jmitc91516 | 1:a5258871b33d | 285 | void SetupColumnTempProfilePageGraphDataFromGC(void); |
jmitc91516 | 1:a5258871b33d | 286 | void SetupInjectorTempProfilePageGraphDataFromGC(void); |
jmitc91516 | 1:a5258871b33d | 287 | void SetupGasFlowProfilePageGraphDataFromGC(void); |
jmitc91516 | 1:a5258871b33d | 288 | |
jmitc91516 | 1:a5258871b33d | 289 | void SetupColumnTempProfilePageXAxisLabel(TimeUnit timeUnit); |
jmitc91516 | 1:a5258871b33d | 290 | void SetupInjectorTempProfilePageXAxisLabel(TimeUnit timeUnit); |
jmitc91516 | 1:a5258871b33d | 291 | void SetupGasFlowProfilePageXAxisLabel(TimeUnit timeUnit); |
jmitc91516 | 1:a5258871b33d | 292 | |
jmitc91516 | 1:a5258871b33d | 293 | void SetupRunningColumnPageGraphCompleteProfileDataSetFromGC(void); |
jmitc91516 | 1:a5258871b33d | 294 | bool SetupRunningColumnPageGraphPartialDataSetsToMatchCurrentRunTime(bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 295 | |
jmitc91516 | 1:a5258871b33d | 296 | void SetupRunningGasPageGraphCompleteProfileDataSetFromGC(void); |
jmitc91516 | 1:a5258871b33d | 297 | bool SetupRunningGasPageGraphPartialDataSetsToMatchCurrentRunTime(bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 298 | |
jmitc91516 | 1:a5258871b33d | 299 | void SetupRunningInjectorPageGraphCompleteProfileDataSetFromGC(void); |
jmitc91516 | 1:a5258871b33d | 300 | bool SetupRunningInjectorPageGraphPartialDataSetsToMatchCurrentRunTime(bool runHasCompleted); |
jmitc91516 | 1:a5258871b33d | 301 | |
jmitc91516 | 1:a5258871b33d | 302 | void GetComponentTemperature(char *cmd, char *temp, bool wantPrefix, bool wantDegSuffix, bool oneTenthDegree = true); |
jmitc91516 | 1:a5258871b33d | 303 | void GetComponentTemperature(char *cmd, float *temp, bool oneTenthDegree = true); |
jmitc91516 | 1:a5258871b33d | 304 | |
jmitc91516 | 1:a5258871b33d | 305 | void GetColumnTemperature(char *temp, bool wantPrefix, bool wantSuffix); |
jmitc91516 | 1:a5258871b33d | 306 | void GetColumnTemperature(char *temp, bool wantPrefix); |
jmitc91516 | 0:47c880c1463d | 307 | void GetColumnTemperature(float *temp); |
jmitc91516 | 1:a5258871b33d | 308 | |
jmitc91516 | 1:a5258871b33d | 309 | void GetDirectlyHeatedColumnTemperature(char *temp, bool wantPrefix); |
jmitc91516 | 1:a5258871b33d | 310 | void GetDirectlyHeatedColumnTemperature(float *temp); |
jmitc91516 | 1:a5258871b33d | 311 | |
jmitc91516 | 6:dba3fbdfd5da | 312 | void GetColumnTargetTemperature(char *temp, const char *format); |
jmitc91516 | 1:a5258871b33d | 313 | |
jmitc91516 | 0:47c880c1463d | 314 | void GetDetectorTemperature(char *temp); |
jmitc91516 | 0:47c880c1463d | 315 | void GetDetectorTemperature(float *temp); |
jmitc91516 | 6:dba3fbdfd5da | 316 | void GetDetectorTargetTemperature(char *temp, const char *format); |
jmitc91516 | 1:a5258871b33d | 317 | |
jmitc91516 | 1:a5258871b33d | 318 | void GetInjectorTemperature(char *temp, bool wantPrefix); |
jmitc91516 | 0:47c880c1463d | 319 | void GetInjectorTemperature(float *temp); |
jmitc91516 | 6:dba3fbdfd5da | 320 | void GetInjectorTargetTemperature(char *temp, const char *format); |
jmitc91516 | 1:a5258871b33d | 321 | |
jmitc91516 | 1:a5258871b33d | 322 | void GetPressure(char *cmd, char *press, bool wantPrefix, bool wantUnits); |
jmitc91516 | 1:a5258871b33d | 323 | |
jmitc91516 | 1:a5258871b33d | 324 | void GetGasPressure(char *press, bool wantPrefix, bool wantUnits); |
jmitc91516 | 0:47c880c1463d | 325 | void GetGasPressure(float *press); |
jmitc91516 | 1:a5258871b33d | 326 | void GetGasPulsedPressure(char *pulsedPress); |
jmitc91516 | 1:a5258871b33d | 327 | void GetCurrentGasPressure(char *press, bool wantPrefix, bool wantUnits); |
jmitc91516 | 1:a5258871b33d | 328 | |
jmitc91516 | 1:a5258871b33d | 329 | bool GetGasControlMode(char *mode, bool wantFullPrefix, bool wantAnyPrefix); |
jmitc91516 | 1:a5258871b33d | 330 | void GetCarrierGasType(char *type); |
jmitc91516 | 1:a5258871b33d | 331 | void GetGasFilterDateChanged(char *date); |
jmitc91516 | 1:a5258871b33d | 332 | |
jmitc91516 | 1:a5258871b33d | 333 | void GetColumnMaxTemperature(char *maxTemp, bool wantFullPrefix, bool wantAnyPrefix, bool wantUnits = false); |
jmitc91516 | 0:47c880c1463d | 334 | void GetColumnMaxTemperature(float *temp); |
jmitc91516 | 1:a5258871b33d | 335 | void GetColumnType(char *type); |
jmitc91516 | 1:a5258871b33d | 336 | ColumnType GetColumnType(void); |
jmitc91516 | 1:a5258871b33d | 337 | |
jmitc91516 | 1:a5258871b33d | 338 | void GetInjectionMode(char *mode); |
jmitc91516 | 1:a5258871b33d | 339 | void GetInjectorType(char *mode, bool wantPrefix); |
jmitc91516 | 1:a5258871b33d | 340 | void GetInjectorSplitTime(char *splitTime); |
jmitc91516 | 1:a5258871b33d | 341 | void GetInjectionCountSinceLinerChanged(char *injCount); |
jmitc91516 | 1:a5258871b33d | 342 | void GetInjectionCountSinceSeptaChanged(char *injCount); |
jmitc91516 | 1:a5258871b33d | 343 | void GetInjectionCountSinceOringChanged(char *injCount); |
jmitc91516 | 1:a5258871b33d | 344 | |
jmitc91516 | 1:a5258871b33d | 345 | void GetInjectionCountSinceColumnInstalled(char *injCount); |
jmitc91516 | 1:a5258871b33d | 346 | void GetColumnLength(char *columnLengthBuffer); |
jmitc91516 | 1:a5258871b33d | 347 | void GetColumnInnerDiameter(char *columnIDBuffer); |
jmitc91516 | 1:a5258871b33d | 348 | void GetColumnOuterDiameter(char *columnODBuffer); |
jmitc91516 | 1:a5258871b33d | 349 | |
jmitc91516 | 1:a5258871b33d | 350 | void GetTotalFlow(char *totalFlow); |
jmitc91516 | 1:a5258871b33d | 351 | void GetTotalFlow(float *totalFlow); |
jmitc91516 | 1:a5258871b33d | 352 | void GetColumnFlow(char *columnFlow); |
jmitc91516 | 1:a5258871b33d | 353 | void GetColumnFlow(float *columnFlow); |
jmitc91516 | 1:a5258871b33d | 354 | |
jmitc91516 | 1:a5258871b33d | 355 | void GetSplitFlow(float *splitFlow); |
jmitc91516 | 1:a5258871b33d | 356 | void GetSplitFlow(char *splitFlow); |
jmitc91516 | 1:a5258871b33d | 357 | void GetSplitRatio(float *splitRatio); |
jmitc91516 | 1:a5258871b33d | 358 | void GetSplitRatio(char *splitRatio); |
jmitc91516 | 1:a5258871b33d | 359 | |
jmitc91516 | 1:a5258871b33d | 360 | void GetDetectorTypeOld(char *type, bool wantFullPrefix); |
jmitc91516 | 1:a5258871b33d | 361 | void GetDetectorType(char *type, bool wantFullPrefix, bool wantPrefix); |
jmitc91516 | 1:a5258871b33d | 362 | void GetDetectorRange(char *range); |
jmitc91516 | 1:a5258871b33d | 363 | void GetDetectorIgnitionState(char *state); |
jmitc91516 | 1:a5258871b33d | 364 | IgnitionState GetDetectorIgnitionState(void); |
jmitc91516 | 1:a5258871b33d | 365 | |
jmitc91516 | 1:a5258871b33d | 366 | void GetTCDDetectorFilamentPolarity(char *polarity); |
jmitc91516 | 1:a5258871b33d | 367 | void GetTCDDetectorFilamentTemperature(char *temp); |
jmitc91516 | 1:a5258871b33d | 368 | void GetTCDDetectorRange(char *range); |
jmitc91516 | 1:a5258871b33d | 369 | |
jmitc91516 | 1:a5258871b33d | 370 | void GetECDDetectorCurrent(char *current); |
jmitc91516 | 1:a5258871b33d | 371 | |
jmitc91516 | 1:a5258871b33d | 372 | void GetFPDDetectorRange(char *range); |
jmitc91516 | 1:a5258871b33d | 373 | void GetFPDDetectorSensitivity(char *sensitivity); |
jmitc91516 | 1:a5258871b33d | 374 | |
jmitc91516 | 1:a5258871b33d | 375 | void GetFlowRate(char *cmd, char *rate); |
jmitc91516 | 1:a5258871b33d | 376 | void GetFuelFlowRate(char *rate); |
jmitc91516 | 1:a5258871b33d | 377 | void GetAirFlowRate(char *rate); |
jmitc91516 | 1:a5258871b33d | 378 | |
jmitc91516 | 1:a5258871b33d | 379 | bool ExecuteCommandWithDACKResponse(char *cmd); |
jmitc91516 | 1:a5258871b33d | 380 | |
jmitc91516 | 1:a5258871b33d | 381 | void GetGCSoftwareVersion(char *version); |
jmitc91516 | 1:a5258871b33d | 382 | void GetActuatorSoftwareVersion(char *version); |
jmitc91516 | 0:47c880c1463d | 383 | void GetRunTime(char *time); |
jmitc91516 | 1:a5258871b33d | 384 | void GetRunTime(float *time); |
jmitc91516 | 1:a5258871b33d | 385 | void GetSerialNumber(char *serialNumber); |
jmitc91516 | 1:a5258871b33d | 386 | void GetGCRealTimeClockTime(char *clockTime); |
jmitc91516 | 1:a5258871b33d | 387 | |
jmitc91516 | 5:aceac1035d71 | 388 | void GetInitialHoldTime(char *time); |
jmitc91516 | 5:aceac1035d71 | 389 | |
jmitc91516 | 1:a5258871b33d | 390 | float GetColumnMethodTimeRemaining(void); |
jmitc91516 | 0:47c880c1463d | 391 | |
jmitc91516 | 0:47c880c1463d | 392 | bool pageJustChanged; |
jmitc91516 | 0:47c880c1463d | 393 | bool displayingData; |
jmitc91516 | 1:a5258871b33d | 394 | bool needToUpdateProfileGraphs; |
jmitc91516 | 1:a5258871b33d | 395 | |
jmitc91516 | 1:a5258871b33d | 396 | bool IsSendMethodCommand(char *gcCommand); |
jmitc91516 | 1:a5258871b33d | 397 | |
jmitc91516 | 1:a5258871b33d | 398 | bool sendingMethod; |
jmitc91516 | 0:47c880c1463d | 399 | |
jmitc91516 | 0:47c880c1463d | 400 | bool gcInStandbyMode; |
jmitc91516 | 0:47c880c1463d | 401 | |
jmitc91516 | 0:47c880c1463d | 402 | bool GCIsInStandbyMode(void); |
jmitc91516 | 0:47c880c1463d | 403 | void DisplayStandbyModePage(void); |
jmitc91516 | 1:a5258871b33d | 404 | bool ExitGCStandbyMode(void); |
jmitc91516 | 1:a5258871b33d | 405 | |
jmitc91516 | 1:a5258871b33d | 406 | bool ClearGCErrors(void); |
jmitc91516 | 1:a5258871b33d | 407 | |
jmitc91516 | 1:a5258871b33d | 408 | bool AbortGCRun(void); |
jmitc91516 | 0:47c880c1463d | 409 | |
jmitc91516 | 0:47c880c1463d | 410 | HomePageGCComponentStatusColorAreas* homePageGCComponentStatusColorAreas; |
jmitc91516 | 0:47c880c1463d | 411 | SingleGCComponentPageStatusColorAreas* singleGCComponentPageStatusColorAreas; |
jmitc91516 | 0:47c880c1463d | 412 | |
jmitc91516 | 0:47c880c1463d | 413 | void SetGCDeviceReport(char *cmd, char *response); |
jmitc91516 | 0:47c880c1463d | 414 | |
jmitc91516 | 0:47c880c1463d | 415 | int GetGCStatusOrFaultCode(char *cmd); |
jmitc91516 | 0:47c880c1463d | 416 | int GetGCStatus(void); |
jmitc91516 | 0:47c880c1463d | 417 | int GetGCFaultCode(void); |
jmitc91516 | 0:47c880c1463d | 418 | void GetGCStateAsInfoString(int gcStateCode, int gcFaultCode, char *statusString); |
jmitc91516 | 1:a5258871b33d | 419 | bool GCHasFaulted(int gcStatus, char* statusString); |
jmitc91516 | 1:a5258871b33d | 420 | bool GCHasFaulted(void); |
jmitc91516 | 1:a5258871b33d | 421 | void DisplayGCInFaultStatePage(bool clearDisplay); |
jmitc91516 | 1:a5258871b33d | 422 | void DisplayRunCompletePage(void); |
jmitc91516 | 1:a5258871b33d | 423 | void DisplayRunAbortedPage(void); |
jmitc91516 | 0:47c880c1463d | 424 | |
jmitc91516 | 0:47c880c1463d | 425 | bool IsHeatOn(void); |
jmitc91516 | 0:47c880c1463d | 426 | |
jmitc91516 | 0:47c880c1463d | 427 | int GetInstrumentStatus(void); |
jmitc91516 | 1:a5258871b33d | 428 | bool GCIsRunning(void); |
jmitc91516 | 1:a5258871b33d | 429 | bool realGCIsRunning; |
jmitc91516 | 1:a5258871b33d | 430 | bool GCIsStabilising(void); |
jmitc91516 | 1:a5258871b33d | 431 | |
jmitc91516 | 1:a5258871b33d | 432 | GCComponentStatus GetComponentStatus(GCComponent component); |
jmitc91516 | 1:a5258871b33d | 433 | void GetComponentStatusString(GCComponent component, char *buff); |
jmitc91516 | 1:a5258871b33d | 434 | |
jmitc91516 | 1:a5258871b33d | 435 | bool HomePageGCComponentStatusesHaveChanged(void); |
jmitc91516 | 0:47c880c1463d | 436 | |
jmitc91516 | 1:a5258871b33d | 437 | bool SinglePageGCComponentStatusHasChanged(GCComponent component); |
jmitc91516 | 1:a5258871b33d | 438 | bool SinglePageGCComponentStatusHasChanged(GCComponent component, GCComponentStatus lastStatusDisplayed); |
jmitc91516 | 1:a5258871b33d | 439 | |
jmitc91516 | 1:a5258871b33d | 440 | GCComponentStatus lastColumnStatusDisplayedOnHomePage; |
jmitc91516 | 1:a5258871b33d | 441 | GCComponentStatus lastInjectorStatusDisplayedOnHomePage; |
jmitc91516 | 1:a5258871b33d | 442 | GCComponentStatus lastDetectorStatusDisplayedOnHomePage; |
jmitc91516 | 1:a5258871b33d | 443 | GCComponentStatus lastGasStatusDisplayedOnHomePage; |
jmitc91516 | 1:a5258871b33d | 444 | |
jmitc91516 | 1:a5258871b33d | 445 | GCComponentStatus lastColumnStatusDisplayedOnColumnPage; |
jmitc91516 | 1:a5258871b33d | 446 | GCComponentStatus lastInjectorStatusDisplayedOnInjectorPage; |
jmitc91516 | 1:a5258871b33d | 447 | GCComponentStatus lastDetectorStatusDisplayedOnDetectorPage; |
jmitc91516 | 1:a5258871b33d | 448 | GCComponentStatus lastGasStatusDisplayedOnGasInformationPage; |
jmitc91516 | 0:47c880c1463d | 449 | |
jmitc91516 | 1:a5258871b33d | 450 | bool SuccessfulRunCommand(char* gcCommand, char* gcResponse); |
jmitc91516 | 1:a5258871b33d | 451 | bool SuccessfulAbortCommand(char* gcCommand, char* gcResponse); |
jmitc91516 | 1:a5258871b33d | 452 | |
jmitc91516 | 1:a5258871b33d | 453 | void ShortEthernetThreadWait(Thread* ethernetThread, int debugValue); |
jmitc91516 | 1:a5258871b33d | 454 | void ShortTouchThreadWait(SimplifiedTouchListener* stl, int debugValue); |
jmitc91516 | 1:a5258871b33d | 455 | void ShortThreadWait(SimplifiedTouchListener* stl, Thread* ethernetThread, int debugValue); |
jmitc91516 | 0:47c880c1463d | 456 | |
jmitc91516 | 1:a5258871b33d | 457 | void PollGC(SimplifiedTouchListener* stl, Thread* ethernetThread); |
jmitc91516 | 1:a5258871b33d | 458 | |
jmitc91516 | 1:a5258871b33d | 459 | void HandleEthernetMessage(Thread* ethernetThread, int debugValue); |
jmitc91516 | 1:a5258871b33d | 460 | bool handlingEthernetMessage; |
jmitc91516 | 1:a5258871b33d | 461 | |
jmitc91516 | 1:a5258871b33d | 462 | void HandleTouchEvent(short touchX, short touchY, short touchZ, int debugValue); |
jmitc91516 | 1:a5258871b33d | 463 | bool handlingTouchEvent; |
jmitc91516 | 1:a5258871b33d | 464 | |
jmitc91516 | 1:a5258871b33d | 465 | bool PageIncludesComponentStatus(int pageNumber); |
jmitc91516 | 1:a5258871b33d | 466 | |
jmitc91516 | 1:a5258871b33d | 467 | void HandleUserInterfaceAndEthernet(SimplifiedTouchListener* stl, Thread* ethernetThread); |
jmitc91516 | 1:a5258871b33d | 468 | |
jmitc91516 | 1:a5258871b33d | 469 | GCStateAndFaultCodes gcStateAndFaultCodes; |
jmitc91516 | 1:a5258871b33d | 470 | |
jmitc91516 | 1:a5258871b33d | 471 | bool gotAtLeastOneTimeout; |
jmitc91516 | 0:47c880c1463d | 472 | |
jmitc91516 | 1:a5258871b33d | 473 | bool runWasAborted; |
jmitc91516 | 1:a5258871b33d | 474 | |
jmitc91516 | 1:a5258871b33d | 475 | int ethernetPort; |
jmitc91516 | 1:a5258871b33d | 476 | char ethernetIP[20]; |
jmitc91516 | 1:a5258871b33d | 477 | char ethernetMask[20]; |
jmitc91516 | 1:a5258871b33d | 478 | char ethernetGateway[20]; |
jmitc91516 | 1:a5258871b33d | 479 | bool useDHCPForEthernet; |
jmitc91516 | 1:a5258871b33d | 480 | |
jmitc91516 | 1:a5258871b33d | 481 | bool restartRequired; |
jmitc91516 | 1:a5258871b33d | 482 | |
jmitc91516 | 1:a5258871b33d | 483 | GCStateSimplified lastSimplifiedGCState; |
jmitc91516 | 1:a5258871b33d | 484 | |
jmitc91516 | 1:a5258871b33d | 485 | Timer gcResponseTimer; |
jmitc91516 | 1:a5258871b33d | 486 | Timer touchTimer; |
jmitc91516 | 1:a5258871b33d | 487 | |
jmitc91516 | 1:a5258871b33d | 488 | QSPIBitmaps* qspiBitmaps; |
jmitc91516 | 5:aceac1035d71 | 489 | |
jmitc91516 | 1:a5258871b33d | 490 | ColumnType runningColumnType; |
jmitc91516 | 1:a5258871b33d | 491 | |
jmitc91516 | 6:dba3fbdfd5da | 492 | // Same for all three easyGUI pages displaying method data - column, method and gas |
jmitc91516 | 6:dba3fbdfd5da | 493 | void ShowMethodPageScrollButtons(bool needToScrollRampData); |
jmitc91516 | 6:dba3fbdfd5da | 494 | void ShowMethodPageScrollButtonsIfNecessary(MethodRampData *methodRampData); |
jmitc91516 | 6:dba3fbdfd5da | 495 | |
jmitc91516 | 6:dba3fbdfd5da | 496 | ColumnMethodRampData* columnMethodRampData; |
jmitc91516 | 5:aceac1035d71 | 497 | void UpdateColumnMethodPageData(void); |
jmitc91516 | 6:dba3fbdfd5da | 498 | unsigned int columnMethodPageScrollIndex; // It would never be valid for this to be less than zero |
jmitc91516 | 6:dba3fbdfd5da | 499 | unsigned int previousColumnMethodPageScrollIndex; |
jmitc91516 | 6:dba3fbdfd5da | 500 | |
jmitc91516 | 6:dba3fbdfd5da | 501 | InjectorMethodRampData* injectorMethodRampData; |
jmitc91516 | 6:dba3fbdfd5da | 502 | void UpdateInjectorMethodPageData(void); |
jmitc91516 | 6:dba3fbdfd5da | 503 | unsigned int injectorMethodPageScrollIndex; // It would never be valid for this to be less than zero |
jmitc91516 | 6:dba3fbdfd5da | 504 | unsigned int previousInjectorMethodPageScrollIndex; |
jmitc91516 | 6:dba3fbdfd5da | 505 | |
jmitc91516 | 6:dba3fbdfd5da | 506 | GasMethodRampData* gasMethodRampData; |
jmitc91516 | 6:dba3fbdfd5da | 507 | void UpdateGasMethodPageData(void); |
jmitc91516 | 6:dba3fbdfd5da | 508 | unsigned int gasMethodPageScrollIndex; // It would never be valid for this to be less than zero |
jmitc91516 | 6:dba3fbdfd5da | 509 | unsigned int previousGasMethodPageScrollIndex; |
jmitc91516 | 5:aceac1035d71 | 510 | |
jmitc91516 | 1:a5258871b33d | 511 | // RTosTimer stuff |
jmitc91516 | 1:a5258871b33d | 512 | RtosTimer* rtosTimer; |
jmitc91516 | 1:a5258871b33d | 513 | int lastTouchEventTickCount; |
jmitc91516 | 1:a5258871b33d | 514 | short lastTouchEventX; |
jmitc91516 | 1:a5258871b33d | 515 | short lastTouchEventY; |
jmitc91516 | 1:a5258871b33d | 516 | static osThreadId timerCallbackThreadToSignal; |
jmitc91516 | 1:a5258871b33d | 517 | static const int waitTimeMs; |
jmitc91516 | 1:a5258871b33d | 518 | static const int shortWaitTimeMs; |
jmitc91516 | 1:a5258871b33d | 519 | static int timerTickCount; |
jmitc91516 | 1:a5258871b33d | 520 | static const uint32_t timerIntervalMilliSec; |
jmitc91516 | 1:a5258871b33d | 521 | static const uint32_t minTimerTicksBetweenTouchEvents; |
jmitc91516 | 1:a5258871b33d | 522 | |
jmitc91516 | 1:a5258871b33d | 523 | static const float graphBarIntervalMinutes; |
jmitc91516 | 1:a5258871b33d | 524 | static const float graphBarIntervalSeconds; |
jmitc91516 | 1:a5258871b33d | 525 | |
jmitc91516 | 1:a5258871b33d | 526 | static const float methodTimeUnitsThreshold; |
jmitc91516 | 1:a5258871b33d | 527 | |
jmitc91516 | 1:a5258871b33d | 528 | static const int defaultEthernetPort; |
jmitc91516 | 1:a5258871b33d | 529 | static const char* defaultEthernetIP; |
jmitc91516 | 1:a5258871b33d | 530 | static const char* defaultEthernetMask; |
jmitc91516 | 1:a5258871b33d | 531 | static const char* defaultEthernetGateway; |
jmitc91516 | 1:a5258871b33d | 532 | |
jmitc91516 | 1:a5258871b33d | 533 | static const char* startDHColumnCalibration; |
jmitc91516 | 1:a5258871b33d | 534 | static const char* exitDHColumnCalibration; |
jmitc91516 | 6:dba3fbdfd5da | 535 | |
jmitc91516 | 6:dba3fbdfd5da | 536 | static const char degSymbol; |
jmitc91516 | 6:dba3fbdfd5da | 537 | static const char stringFormatdegCUnits[6]; |
jmitc91516 | 6:dba3fbdfd5da | 538 | |
jmitc91516 | 1:a5258871b33d | 539 | static void DisplayText(char *text, short X, short Y, GuiConst_INT8U alignment, GuiConst_INT16U fontNo, GuiConst_INTCOLOR foreColor); |
jmitc91516 | 0:47c880c1463d | 540 | }; |
jmitc91516 | 0:47c880c1463d | 541 | |
jmitc91516 | 0:47c880c1463d | 542 | #endif // GETGCSTATUSLOOP_H |