Commit for SWO for HW validation menu updates

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@245 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-10 12:46:41 +00:00
parent a73154a5e6
commit a688a6549a
19 changed files with 720 additions and 89 deletions

View File

@@ -36,6 +36,9 @@
#include "internalADC.h"
#include "MAX5715.h"
#include "KeyboardDevice.h"
#include "storm700.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
@@ -134,11 +137,24 @@ void repairMenu_feedSecondsCounterFromISR(struct RepairMenu* self)
static struct RepairProcess _rp = {.initialized = false};
struct RepairProcess* rp = &_rp;
extern struct MAX5715* dac;
extern struct Storm700* storm700;
static void repairMenu_task(void* parameters)
{
struct RepairMenu* self = (struct RepairMenu*)parameters;
Display_write(self->display, " ", 20, 3, 1);
Display_clearLine(self->display, 3);
char key;
Keypad_KeyState keyState;
if (Storm700_readKey(storm700, &key, &keyState) == SUCCESS)
{
LOGGER_DEBUG(mainLog, "Got key %c %d", key, keyState);
}
else
{
LOGGER_ERROR(mainLog, "Getting key failed");
}
struct RepairProcessParameters rpParameters;
rpParameters.adcRow1 = &adc1->channel[0];
@@ -148,10 +164,8 @@ static void repairMenu_task(void* parameters)
rpParameters.dacRow2 = &dac->dac[1];
rpParameters.dacRow3 = &dac->dac[2];
MAX5715Channel_setValue(&dac->dac[1], 0xE00);
struct RepairPresetParameters presetStage1 = {.voltage = 0xA00, .duration = 5000, .softstartDuration = 1000};
struct RepairPresetParameters presetStage2 = {.voltage = 0xE00, .duration = 1000, .softstartDuration = 2000};
struct RepairPresetParameters presetStage1 = {.voltage = 0xA00, .duration = 300, .softstartDuration = 120};
struct RepairPresetParameters presetStage2 = {.voltage = 0xE00, .duration = 120, .softstartDuration = 30};
struct RepairPreset repairPreset;
repairPreset.numberOfStages = 2;