- Re-located repairprocessrow information in dedicated object
- added error conditions to repair row and added condition handling to repair process

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@260 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2017-10-23 09:02:13 +00:00
parent aa9ba5ea8e
commit e3ca058c96
30 changed files with 1348 additions and 323 deletions

View File

@@ -126,7 +126,6 @@ ErrorStatus Display_clearScreen(struct Display* self)
{
ErrorStatus returnValue = SUCCESS;
returnValue = DisplayDevice_clear(self->displayDevice);
vTaskDelay(5);
Display_clearShadow(self);
return returnValue;
}
@@ -134,15 +133,16 @@ ErrorStatus Display_clearScreen(struct Display* self)
ErrorStatus Display_clearLine(struct Display* self, size_t line)
{
char buffer[self->displayDevice->parameters.numberOfColumns];
char buffer[self->displayDevice->parameters.numberOfColumns + 1];
int loopcounter;
for (loopcounter = 0; loopcounter < self->displayDevice->parameters.numberOfColumns; loopcounter++)
{
buffer[loopcounter] = 0x20;
}
buffer[self->displayDevice->parameters.numberOfColumns] = '\0';
return Display_write(self, buffer, self->displayDevice->parameters.numberOfColumns, line, 1);
return Display_write(self, buffer, line, 1);
}
@@ -164,12 +164,13 @@ ErrorStatus Display_setContrast(struct Display* self, size_t contrast)
}
ErrorStatus Display_write(struct Display* self, const char* buffer, unsigned int length, size_t row, size_t column)
ErrorStatus Display_write(struct Display* self, const char* buffer, size_t row, size_t column)
{
ErrorStatus returnValue = SUCCESS;
if (self->initialized)
{
int length = 0;
// Prior to any action on the display memory, perform necessary checkings
if (returnValue == SUCCESS)
{
@@ -189,6 +190,7 @@ ErrorStatus Display_write(struct Display* self, const char* buffer, unsigned int
}
if (returnValue == SUCCESS)
{
length = strlen(buffer);
// Check that the length request does not exceed the display boundary
// This is checked in combination with the column coordinate
// numberOfColumns - column >= length
@@ -282,7 +284,7 @@ inline static void Display_clearShadow(struct Display* self)
// Clear the display shadow
size_t rowCounter;
size_t colCounter;
char buffer[self->displayDevice->parameters.numberOfColumns];
xSemaphoreTake(self->displayShadowAccessSemaphore, portMAX_DELAY);
for (rowCounter = 0; rowCounter < self->displayDevice->parameters.numberOfRows; rowCounter++)
{
for (colCounter = 0; colCounter < self->displayDevice->parameters.numberOfColumns; colCounter++)
@@ -295,6 +297,7 @@ inline static void Display_clearShadow(struct Display* self)
self->displayShadow[rowCounter][colCounter].isUpdated = false;
}
}
xSemaphoreGive(self->displayShadowAccessSemaphore);
}