Updates:
- Re-located repairprocessrow information in dedicated object - added error conditions to repair row and added condition handling to repair process git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@260 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "repairProcess.h"
|
||||
#include "repairProcesses.h"
|
||||
|
||||
#include "CathodeMCP.h"
|
||||
#include "Display.h"
|
||||
#include "Error.h"
|
||||
#include "hsb-mrts.h"
|
||||
@@ -64,7 +65,7 @@
|
||||
// File-scope variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
static const char cursorValue = 0x7E;
|
||||
static const char cursorValue[2] = {0x7E, '\0'};
|
||||
|
||||
|
||||
// TEMPORARY PRESET STORAGE
|
||||
@@ -99,12 +100,16 @@ static void repairMenu_scrollIndexHandlerReset (struct RepairMenu* self);
|
||||
static void repairMenu_scrollUpIndexHandler(struct RepairMenu* self);
|
||||
static void repairMenu_scrollDownIndexHandler(struct RepairMenu* self);
|
||||
|
||||
static void repairMenu_selectCathodeRepair(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_selectMCPRepair(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_selectPreset(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_solenoidLock(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_solenoidUnlock(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_startRepairProcess(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_stopRepairProcess(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_abortRepairProcessAndGotoMainMenu(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_pauseRepairProcess(struct RepairMenu* self, int cursorIndex);
|
||||
static void repairMenu_continueRepairProcess(struct RepairMenu* self, int cursorIndex);
|
||||
|
||||
static ErrorStatus repairMenu_createMenu(struct RepairMenu* self);
|
||||
static ErrorStatus repairMenu_createMenuPage (struct MenuPage* self, bool hasCursor, int maxNumberOfRows);
|
||||
@@ -210,6 +215,13 @@ void repairMenu_interlockFailed(struct RepairMenu* self, T_INTERLOCK_ID interloc
|
||||
}
|
||||
|
||||
|
||||
void repairMenu_processFailed(struct RepairMenu* self)
|
||||
{
|
||||
repairMenu_changeState(self, ERROR_STATE);
|
||||
snprintf(self->errorMessage, sizeof(self->errorMessage) / sizeof(self->errorMessage[0]), "PROCESS FAILED");
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_task(void* parameters)
|
||||
{
|
||||
struct RepairMenu* self = (struct RepairMenu*)parameters;
|
||||
@@ -220,8 +232,8 @@ static void repairMenu_task(void* parameters)
|
||||
repairMenu_printMenu(self);
|
||||
// Add cursor if necessary
|
||||
repairMenu_printCursor(self);
|
||||
int tempScreenCounter;
|
||||
T_MenuState tempMenuState;
|
||||
int tempScreenCounter = 0;
|
||||
T_MenuState tempMenuState = MAINMENU;
|
||||
|
||||
while(self->runTask)
|
||||
{
|
||||
@@ -273,6 +285,7 @@ static void repairMenu_task(void* parameters)
|
||||
}
|
||||
else if (self->menuState == REPAIR_PAUSE)
|
||||
{
|
||||
|
||||
repairMenu_printPause(self);
|
||||
}
|
||||
else if (self->menuState == FINISH_CONTROL)
|
||||
@@ -296,14 +309,13 @@ static void repairMenu_task(void* parameters)
|
||||
repairMenu_printMenu(self);
|
||||
// Add cursor if necessary
|
||||
repairMenu_printCursor(self);
|
||||
LOGGER_WARNING(mainLog, "menu index is %d", self->menuState);
|
||||
}
|
||||
}
|
||||
vTaskDelay(50);
|
||||
}
|
||||
|
||||
LOGGER_INFO(mainLog, "Deleting RepairMenu task");
|
||||
vTaskDelete(self->taskHandle);
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -311,12 +323,13 @@ static void repairMenu_changeState(struct RepairMenu* self, T_MenuState newState
|
||||
{
|
||||
Display_clearScreen(self->display);
|
||||
self->menuState = newState;
|
||||
LOGGER_WARNING(mainLog, "New menu index is %d", self->menuState);
|
||||
}
|
||||
|
||||
static void repairMenu_printError(struct RepairMenu* self)
|
||||
{
|
||||
Display_write(self->display, "!!ERROR!!", strlen("!!ERROR!!"), 2, 6);
|
||||
Display_write(self->display, self->errorMessage, strlen(self->errorMessage), 3, 1 + ((self->display->displayDevice->parameters.numberOfColumns - strlen(self->errorMessage)) / 2));
|
||||
Display_write(self->display, "!!ERROR!!", 2, 6);
|
||||
Display_write(self->display, self->errorMessage, 3, 1 + ((self->display->displayDevice->parameters.numberOfColumns - strlen(self->errorMessage)) / 2));
|
||||
}
|
||||
|
||||
|
||||
@@ -331,58 +344,79 @@ static void repairMenu_printRepair(struct RepairMenu* self)
|
||||
int loopCounter = 0;
|
||||
char buffer[20];
|
||||
|
||||
if (xSemaphoreTake(self->repairScreenUpdateSemaphore, 0) != pdTRUE)
|
||||
struct RepairProcess* repairProcess = repairProcesses_getMainRepairProcess();
|
||||
if (repairProcess_isProcessRunning(repairProcess))
|
||||
{
|
||||
// Taking semaphore failed - no update on the screen
|
||||
if (xSemaphoreTake(self->repairScreenUpdateSemaphore, 0) != pdTRUE)
|
||||
{
|
||||
// Taking semaphore failed - no update on the screen
|
||||
}
|
||||
else
|
||||
{
|
||||
struct Time remainingTime;
|
||||
RTC_calculateTimeFromSeconds(repairProcess_getRemainingRepairTime(repairProcess), &remainingTime);
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), " %02d:%02d:%02d remain ", remainingTime.hours, remainingTime.minutes, remainingTime.seconds);
|
||||
Display_write(self->display, buffer, 1, 1);
|
||||
LOGGER_DEBUG(mainLog, "%s", buffer);
|
||||
|
||||
// Regulation is unique for each row
|
||||
// For TESLA repair only row 1 (out of 0,1,2) is used
|
||||
// For ANODE and Cathode/MCP, all 3 rows are used
|
||||
for (loopCounter = ((PCBA_getInstance()->pcba == PCBA_Tesla) ? 1 : 0); loopCounter <= ((PCBA_getInstance()->pcba == PCBA_Tesla) ? 1 : 2); loopCounter++)
|
||||
{
|
||||
const struct RepairProcessRow* row;
|
||||
row = repairProcess_getRowInformation(repairProcess, loopCounter);
|
||||
|
||||
snprintf (buffer, sizeof(buffer) / sizeof(buffer[0]), "R%d", loopCounter + 1);
|
||||
Display_write(self->display, buffer, 2, ((loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
|
||||
if (!row->errorData.rowHasError)
|
||||
{
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%05dV", row->lastADCValue);
|
||||
Display_write(self->display, buffer, 3, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%04dER", row->pidError);
|
||||
Display_write(self->display, buffer, 4, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), " ROW ");
|
||||
Display_write(self->display, buffer, 3, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "ERROR ");
|
||||
Display_write(self->display, buffer, 4, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
struct Time remainingTime;
|
||||
RTC_calculateTimeFromSeconds(repairProcess_getRemainingRepairTime(repairProcesses_getMainRepairProcess()), &remainingTime);
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), " %02d:%02d:%02d remain ", remainingTime.hours, remainingTime.minutes, remainingTime.seconds);
|
||||
Display_write(self->display, buffer, strlen(buffer), 1, 1);
|
||||
|
||||
// Regulation is unique for each row
|
||||
// For TESLA repair only row 1 (out of 0,1,2) is used
|
||||
// For ANODE and Cathode/MCP, all 3 rows are used
|
||||
for (loopCounter = ((PCBA_getInstance()->pcba == Tesla) ? 1 : 0); loopCounter <= ((PCBA_getInstance()->pcba == Tesla) ? 1 : 2); loopCounter++)
|
||||
{
|
||||
struct RepairProcessRow* row;
|
||||
row = repairProcess_getRowInformation(repairProcesses_getMainRepairProcess(), loopCounter);
|
||||
|
||||
snprintf (buffer, sizeof(buffer) / sizeof(buffer[0]), "R%d", loopCounter + 1);
|
||||
Display_write(self->display, buffer, strlen(buffer), 2, ((loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%05dV", row->lastADCValue);
|
||||
Display_write(self->display, buffer, strlen(buffer), 3, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "%04dER", row->pidError);
|
||||
Display_write(self->display, buffer, strlen(buffer), 4, (loopCounter + (loopCounter * (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS)) + (self->display->displayDevice->parameters.numberOfColumns / REPAIRPROCESS_NUMBER_OF_ROWS) / strlen(buffer)));
|
||||
}
|
||||
snprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), "Initialising");
|
||||
Display_write(self->display, buffer, 1, 6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_printAskPause(struct RepairMenu* self)
|
||||
{
|
||||
Display_write(self->display, "REPAIR BUSY", strlen("REPAIR BUSY"), 2, 6);
|
||||
Display_write(self->display, "Hit X to PAUSE", strlen("Hit X to RESET"), 3, 2);
|
||||
Display_write(self->display, "REPAIR BUSY", 2, 6);
|
||||
Display_write(self->display, "Hit X to PAUSE", 3, 2);
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_printPause(struct RepairMenu* self)
|
||||
{
|
||||
Display_write(self->display, "!!PAUSE!!", strlen("!!PAUSE!!"), 2, 6);
|
||||
Display_write(self->display, "Hit ENT to continue", strlen("Hit ENT to continue"), 3, 2);
|
||||
Display_write(self->display, "Hit X to RESET", strlen("Hit X to RESET"), 4, 2);
|
||||
Display_write(self->display, "!!PAUSE!!", 2, 6);
|
||||
Display_write(self->display, "Hit ENT to continue", 3, 2);
|
||||
Display_write(self->display, "Hit X to RESET", 4, 2);
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_printFinish(struct RepairMenu* self)
|
||||
{
|
||||
Display_write(self->display, "REPAIR FINISHED", strlen("REPAIR FINISHED"), 2, 6);
|
||||
Display_write(self->display, "Hit ENT to continue", strlen("Hit ENT to continue"), 4, 2);
|
||||
Display_write(self->display, "REPAIR FINISHED", 2, 6);
|
||||
Display_write(self->display, "Hit ENT to continue", 4, 2);
|
||||
|
||||
}
|
||||
|
||||
@@ -392,11 +426,11 @@ static void repairMenu_printMenu(struct RepairMenu* self)
|
||||
int loopCounter;
|
||||
|
||||
// Always print Row1 (index0), ignoring the scrolling index
|
||||
Display_write(self->display, self->menuArray[self->menuState].row[0].text, strlen(self->menuArray[self->menuState].row[0].text), 1, 1);
|
||||
Display_write(self->display, self->menuArray[self->menuState].row[0].text, 1, 1);
|
||||
|
||||
for (loopCounter = 1 ; loopCounter < self->display->displayDevice->parameters.numberOfRows; loopCounter++)
|
||||
{
|
||||
Display_write(self->display, self->menuArray[self->menuState].row[loopCounter + self->scrollOffset].text, strlen(self->menuArray[self->menuState].row[loopCounter + self->scrollOffset].text), loopCounter + 1, 1);
|
||||
Display_write(self->display, self->menuArray[self->menuState].row[loopCounter + self->scrollOffset].text, loopCounter + 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,7 +439,7 @@ static void repairMenu_printCursor(struct RepairMenu* self)
|
||||
{
|
||||
if (self->menuArray[self->menuState].hasCursor)
|
||||
{
|
||||
Display_write(self->display, &cursorValue, 1, 1 + self->cursorIndex - self->scrollOffset, 1);
|
||||
Display_write(self->display, cursorValue, 1 + self->cursorIndex - self->scrollOffset, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,6 +597,18 @@ static void repairMenu_scrollDownIndexHandler(struct RepairMenu* self)
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_selectCathodeRepair(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
CathodeMCP_switchToCathode();
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_selectMCPRepair(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
CathodeMCP_switchToMCP();
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_selectPreset(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
self->repairPreset = presetArray[cursorIndex - 1];
|
||||
@@ -601,7 +647,7 @@ static void repairMenu_startRepairProcess(struct RepairMenu* self, int cursorInd
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
// For MCP/Cathode, the right settings must be made
|
||||
if (PCBA_getInstance()->pcba == CathodeMCP)
|
||||
if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -612,7 +658,12 @@ static void repairMenu_startRepairProcess(struct RepairMenu* self, int cursorInd
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
returnValue = repairProcesses_startMainRepairProcess(self->repairPreset, &self->rpParameters);
|
||||
if (returnValue != SUCCESS)
|
||||
{
|
||||
Error_postError(REPAIR_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
if (returnValue == SUCCESS)
|
||||
{
|
||||
returnValue = repairProcesses_mainRepairProcessAddObserver(self->observer);
|
||||
@@ -645,13 +696,35 @@ static void repairMenu_abortRepairProcessAndGotoMainMenu(struct RepairMenu* self
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_pauseRepairProcess(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
repairMenu_changeState(self, REPAIR_PAUSE);
|
||||
repairProcess_pauseProcess(repairProcesses_getMainRepairProcess());
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_continueRepairProcess(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
repairMenu_changeState(self, REPAIR_RUNNING);
|
||||
repairProcess_continueProcess(repairProcesses_getMainRepairProcess());
|
||||
}
|
||||
|
||||
|
||||
static ErrorStatus repairMenu_createMenu(struct RepairMenu* self)
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[MAINMENU], MENU_HAS_CURSOR, 4);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], PCBA_getInstance()->name, MAINMENU, NULL);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], " 1.Tube repair", REPAIRMENU, NULL);
|
||||
if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
|
||||
{
|
||||
// For Cathode/MCP PCBA, the type of repair must be selected first
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], " 1.Tube repair", RM_CATHODEMCP_SELECT, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], " 1.Tube repair", REPAIRMENU, NULL);
|
||||
}
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], " 2.Administrator", ADMINMENU, NULL);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[MAINMENU], " 3.Calibration", CALIBRATIONMENU, NULL);
|
||||
repairMenu_addKeyAction_SCROLLUP(&self->menuArray[MAINMENU], 'U', PRESSED);
|
||||
@@ -663,6 +736,18 @@ static ErrorStatus repairMenu_createMenu(struct RepairMenu* self)
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[MAINMENU], '0', PRESSED, repairMenu_solenoidUnlock);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[MAINMENU], '0', RELEASED, repairMenu_solenoidLock);
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[RM_CATHODEMCP_SELECT], MENU_HAS_CURSOR, 3);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[RM_CATHODEMCP_SELECT], "Tube repair", RM_CATHODEMCP_SELECT, NULL);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[RM_CATHODEMCP_SELECT], " 1.Cathode repair", REPAIRMENU, repairMenu_selectCathodeRepair);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[RM_CATHODEMCP_SELECT], " 2.MCP repair", REPAIRMENU, repairMenu_selectMCPRepair);
|
||||
repairMenu_addKeyAction_SCROLLUP(&self->menuArray[RM_CATHODEMCP_SELECT], 'U', PRESSED);
|
||||
repairMenu_addKeyAction_SCROLLDOWN(&self->menuArray[RM_CATHODEMCP_SELECT], 'D', PRESSED);
|
||||
repairMenu_addKeyAction_SELECT(&self->menuArray[RM_CATHODEMCP_SELECT], 'E', PRESSED);
|
||||
repairMenu_addKeyAction_HOTKEYSELECT(&self->menuArray[RM_CATHODEMCP_SELECT], '1', PRESSED, 1);
|
||||
repairMenu_addKeyAction_HOTKEYSELECT(&self->menuArray[RM_CATHODEMCP_SELECT], '2', PRESSED, 2);
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[RM_CATHODEMCP_SELECT], 'X', PRESSED, MAINMENU);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[RM_CATHODEMCP_SELECT], '0', PRESSED, repairMenu_solenoidUnlock);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[RM_CATHODEMCP_SELECT], '0', RELEASED, repairMenu_solenoidLock);
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[REPAIRMENU], MENU_HAS_CURSOR, 4);
|
||||
repairMenu_addMenuPageRow(&self->menuArray[REPAIRMENU], "Tube repair", REPAIRMENU, NULL);
|
||||
@@ -673,7 +758,16 @@ static ErrorStatus repairMenu_createMenu(struct RepairMenu* self)
|
||||
repairMenu_addKeyAction_SELECT(&self->menuArray[REPAIRMENU], 'E', PRESSED);
|
||||
repairMenu_addKeyAction_HOTKEYSELECT(&self->menuArray[REPAIRMENU], '1', PRESSED, 1);
|
||||
repairMenu_addKeyAction_HOTKEYSELECT(&self->menuArray[REPAIRMENU], '2', PRESSED, 2);
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIRMENU], 'X', PRESSED, MAINMENU);
|
||||
if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
|
||||
{
|
||||
// For Cathode/MCP PCBA, the type of repair must can be selected
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIRMENU], 'X', PRESSED, RM_CATHODEMCP_SELECT);
|
||||
}
|
||||
else
|
||||
{
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIRMENU], 'X', PRESSED, MAINMENU);
|
||||
}
|
||||
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIRMENU], '0', PRESSED, repairMenu_solenoidUnlock);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIRMENU], '0', RELEASED, repairMenu_solenoidLock);
|
||||
|
||||
@@ -720,11 +814,13 @@ static ErrorStatus repairMenu_createMenu(struct RepairMenu* self)
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIR_RUNNING], 'X', PRESSED, REPAIR_ASK_PAUSE);
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[REPAIR_ASK_PAUSE], MENU_HAS_NO_CURSOR, 4);
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIR_ASK_PAUSE], 'X', PRESSED, REPAIR_PAUSE);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIR_ASK_PAUSE], 'X', PRESSED, repairMenu_pauseRepairProcess);
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[REPAIR_PAUSE], MENU_HAS_NO_CURSOR, 4);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIR_PAUSE], 'X', PRESSED, repairMenu_abortRepairProcessAndGotoMainMenu);
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[REPAIR_PAUSE], 'E', PRESSED, REPAIR_RUNNING);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIR_PAUSE], 'E', PRESSED, repairMenu_continueRepairProcess);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIR_PAUSE], '0', PRESSED, repairMenu_solenoidUnlock);
|
||||
repairMenu_addKeyAction_EXECUTEFUNCTION(&self->menuArray[REPAIR_PAUSE], '0', RELEASED, repairMenu_solenoidLock);
|
||||
|
||||
repairMenu_createMenuPage(&self->menuArray[FINISH], MENU_HAS_NO_CURSOR, 4);
|
||||
repairMenu_addKeyAction_GOTOSTATE(&self->menuArray[FINISH], 'E', PRESSED, MAINMENU);
|
||||
|
||||
Reference in New Issue
Block a user