Added calibration setpoints

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@417 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2018-01-11 13:55:17 +00:00
parent 9915a5a349
commit 1bbfa1c7f3
22 changed files with 993 additions and 114 deletions

View File

@@ -65,8 +65,9 @@ struct RepairPresetStorageClass
// -----------------------------------------------------------------------------
// File-scope variables
// -----------------------------------------------------------------------------
static struct CachedStorage cache = {.initialized = false};
static struct RepairPresets _self = {.initialized = false, .presetsLoaded = false};
static struct RepairPresets _self = {.initialized = false, .presetStorage = &cache, .presetsLoaded = false};
struct RepairPresets* const self = &_self;
// -----------------------------------------------------------------------------
@@ -81,23 +82,11 @@ static ErrorStatus RepairPresets_verifyPresetCRC(struct RepairPresetStorageClass
// -----------------------------------------------------------------------------
ErrorStatus RepairPresets_construct(struct CachedStorage* presetStorage, struct MemoryDevice* memoryDevice)
ErrorStatus RepairPresets_construct(struct MemoryDevice* memoryDevice)
{
ErrorStatus returnValue = SUCCESS;
if (!self->initialized)
{
if (returnValue == SUCCESS)
{
if (presetStorage != NULL)
{
self->presetStorage = presetStorage;
}
else
{
returnValue = ERROR;
}
}
if (returnValue == SUCCESS)
{
if (memoryDevice != NULL)