Added some IO modules (teslaGun, solenoid, powerEnable) as dedicated modules instead of general IO
Fixed code behind them git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@266 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -38,10 +38,12 @@
|
||||
#include "Error.h"
|
||||
#include "hsb-mrts.h"
|
||||
|
||||
#include "CoverSolenoid.h"
|
||||
#include "Logger.h"
|
||||
#include "Interlock.h"
|
||||
#include "internalADC.h"
|
||||
#include "MAX5715.h"
|
||||
#include "TeslaGunSafety.h"
|
||||
|
||||
#include "KeyboardDevice.h"
|
||||
#include "PCBA.h"
|
||||
@@ -268,10 +270,6 @@ void repairMenu_interlockFailed(struct RepairMenu* self, T_INTERLOCK_ID interloc
|
||||
{
|
||||
snprintf(self->errorMessage, sizeof(self->errorMessage) / sizeof(self->errorMessage[0]), "COVER OPEN");
|
||||
}
|
||||
else if (interlockID == TESLA_INTERLOCK)
|
||||
{
|
||||
snprintf(self->errorMessage, sizeof(self->errorMessage) / sizeof(self->errorMessage[0]), "SAFETY TUBE MISSING");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -676,13 +674,13 @@ static void repairMenu_selectPreset(struct RepairMenu* self, int cursorIndex)
|
||||
|
||||
static void repairMenu_solenoidLock(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
hsb_solenoidLock();
|
||||
CoverSolenoid_lock();
|
||||
}
|
||||
|
||||
|
||||
static void repairMenu_solenoidUnlock(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
hsb_solenoidUnlock();
|
||||
CoverSolenoid_unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -704,12 +702,11 @@ 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 == PCBA_CathodeMCP)
|
||||
// In case of a TESLA repair, release the teslaGunSafety
|
||||
if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
{
|
||||
|
||||
TeslaGunSafety_release();
|
||||
}
|
||||
///TODO
|
||||
}
|
||||
|
||||
// If all is OK, start the repair process
|
||||
@@ -741,6 +738,10 @@ static void repairMenu_startRepairProcess(struct RepairMenu* self, int cursorInd
|
||||
|
||||
static void repairMenu_stopRepairProcess(struct RepairMenu* self, int cursorIndex)
|
||||
{
|
||||
if (PCBA_getInstance()->pcba == PCBA_Tesla)
|
||||
{
|
||||
TeslaGunSafety_block();
|
||||
}
|
||||
repairProcesses_mainRepairProcessRemoveObserver(self->observer);
|
||||
repairProcesses_abortMainRepairProcess();
|
||||
hsb_disableSafety();
|
||||
|
||||
Reference in New Issue
Block a user