Fixed number of stages bug.
git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@282 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
- Display backlight unstable
|
||||
- Display cursor unstable
|
||||
- HW validation menu outdated/unfunctional
|
||||
- NumberOfStages Macro for presets not implemented well. It will be ignored when generating DEFAULT presets
|
||||
- repairMenu has bad reference to getmainrepairmenu
|
||||
|
||||
|
||||
@@ -9,3 +8,4 @@
|
||||
FIXED
|
||||
- PIN change verification not functional
|
||||
- Multi-Language support added to menu. All strings/messages outsourced to dedicated file. MakeFile adapted
|
||||
- NumberOfStages Macro for presets not implemented well. It will be ignored when generating DEFAULT presets
|
||||
@@ -55,6 +55,8 @@ ErrorStatus RepairPreset_generateDefaultPreset(struct RepairPreset* self, unsign
|
||||
{
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
|
||||
int loopCounter;
|
||||
|
||||
if (presetNumber <= REPAIR_PRESET_MAX_ONE_STAGE_PRESETS)
|
||||
{
|
||||
self->numberOfStages = 1;
|
||||
@@ -68,25 +70,34 @@ ErrorStatus RepairPreset_generateDefaultPreset(struct RepairPreset* self, unsign
|
||||
}
|
||||
else
|
||||
{
|
||||
self->numberOfStages = 2;
|
||||
self->numberOfStages = REPAIR_PRESET_MAX_STAGES;
|
||||
}
|
||||
}
|
||||
|
||||
self->presetNumber = presetNumber;
|
||||
self->preset[0].softstartDuration = 1800;
|
||||
self->preset[0].duration = 28800;
|
||||
|
||||
if (PCBA_getInstance()->pcba == PCBA_CathodeMCP)
|
||||
{
|
||||
self->preset[0].voltage = -1000;
|
||||
self->preset[1].voltage = -1000;
|
||||
for (loopCounter = 0; loopCounter < self->numberOfStages; loopCounter++)
|
||||
{
|
||||
self->preset[loopCounter].softstartDuration = 1800;
|
||||
self->preset[loopCounter].duration = 28800;
|
||||
self->preset[loopCounter].voltage = -1000;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
for (loopCounter = 0; loopCounter < self->numberOfStages; loopCounter++)
|
||||
{
|
||||
self->preset[loopCounter].softstartDuration = 1800;
|
||||
self->preset[loopCounter].duration = 28800;
|
||||
self->preset[0].voltage = 1000;
|
||||
self->preset[1].voltage = 1000;
|
||||
}
|
||||
// Generate dummy presets to fill the memory
|
||||
self->preset[1].softstartDuration = 1800;
|
||||
self->preset[1].duration = 28800;
|
||||
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ ErrorStatus SignalProfileGenerator_construct(struct SignalProfileGenerator* self
|
||||
ErrorStatus returnValue = SUCCESS;
|
||||
|
||||
if (!self->initialized)
|
||||
{
|
||||
if (preset != NULL)
|
||||
{
|
||||
self->secondsCounter = 0;
|
||||
self->currentPresetIndex = 0;
|
||||
@@ -91,6 +93,11 @@ ErrorStatus SignalProfileGenerator_construct(struct SignalProfileGenerator* self
|
||||
|
||||
self->voltageHoldTimer = 0;
|
||||
self->voltagePriorToPause = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = ERROR;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@@ -109,7 +116,6 @@ void SignalProfileGenerator_destruct(struct SignalProfileGenerator* self)
|
||||
|
||||
void SignalProfileGenerator_calculate(struct SignalProfileGenerator* self)
|
||||
{
|
||||
|
||||
if (self->initialized)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user