Added Interlock

Fixed PID regulation functionality

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@250 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-12 07:16:50 +00:00
parent 3df93a80d7
commit 54b6afe5a3
19 changed files with 504 additions and 261 deletions

View File

@@ -61,10 +61,10 @@ struct HwValidationMenuItems
struct Adc* internalADC; // Internal ADC with channel array
struct MAX5715* externalDAC; // External DAC with channel array
struct Gpio* power6v5Enable;
struct Gpio* interlock1;
struct Gpio* interlock2;
struct Gpio* tesla1;
struct Gpio* tesla2;
struct Gpio* interlockNO;
struct Gpio* interlockNC;
struct Gpio* teslaNO;
struct Gpio* teslaNC;
struct Gpio* solenoid;
struct Gpio* mcp0Relay;
struct Gpio* mcp1Relay;
@@ -72,7 +72,6 @@ struct HwValidationMenuItems
struct Gpio* cat0Relay;
struct Gpio* cat1Relay;
struct Gpio* cat2Relay;
struct Gpio* teslaLock;
struct Pcba* pcba;
struct Keypad *keypad;
// struct Eeprom* eeprom; // Not implemented yet

View File

@@ -46,7 +46,7 @@
// Constant and macro definitions
// -----------------------------------------------------------------------------
#define REPAIRPROCESS_NUMBER_OF_ROWS (3)
// -----------------------------------------------------------------------------
// Type definitions.
@@ -58,6 +58,7 @@ typedef enum
SOFTSTART,
VOLTAGE_HOLD,
PAUSE,
PAUSE_RESTORE,
FINISH_VERIFY,
FINISHED
} RepairState;
@@ -80,19 +81,17 @@ struct RepairProcess
uint16_t stackSize;
bool runTask;
SemaphoreHandle_t secondsSyncronisation;
uint32_t startTime;
uint32_t secondsCounter;
uint32_t softStartTimer;
uint32_t voltageHoldTimer;
RepairState currentState;
bool initialized;
size_t currentPresetIndex;
struct RepairPreset* repairPreset;
const struct AdcChannel* adcRow1;
const struct AdcChannel* adcRow2;
const struct AdcChannel* adcRow3;
const struct MAX5715_DAC* dacRow1;
const struct MAX5715_DAC* dacRow2;
const struct MAX5715_DAC* dacRow3;
struct Pid pidRow1;
struct Pid pidRow2;
struct Pid pidRow3;
const struct AdcChannel* adc[REPAIRPROCESS_NUMBER_OF_ROWS];
const struct MAX5715_DAC* dac[REPAIRPROCESS_NUMBER_OF_ROWS];
struct Pid pid[REPAIRPROCESS_NUMBER_OF_ROWS];
};
// -----------------------------------------------------------------------------