Menu implementation structure done. Menus far from finished but basic structure is functional
Scheck-in for TLa for PID tuning git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@252 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
@@ -56,7 +56,8 @@ static void DisplayTask(void* parameters);
|
||||
inline static void Display_characterUpdate (struct DisplayCharacter* displayCharacter, char character);
|
||||
inline static bool Display_isCharacterUpdated (struct DisplayCharacter* displayCharacter);
|
||||
inline static char Display_getUpdatedCharacter (struct DisplayCharacter* displayCharacter);
|
||||
static void Display_characterUpdateAll(struct Display* self);
|
||||
inline static void Display_characterUpdateAll(struct Display* self);
|
||||
inline static void Display_clearShadow(struct Display* self);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function definitions
|
||||
@@ -86,16 +87,7 @@ ErrorStatus Display_construct(struct Display* self, struct DisplayDevice* displa
|
||||
vSemaphoreCreateBinary(self->displayWriteRequest);
|
||||
|
||||
|
||||
// Clear the display shadow
|
||||
size_t rowCounter;
|
||||
size_t colCounter;
|
||||
for (rowCounter = 0; rowCounter < self->displayDevice->parameters.numberOfRows; rowCounter++)
|
||||
{
|
||||
for (colCounter = 0; colCounter < self->displayDevice->parameters.numberOfColumns; colCounter++)
|
||||
{
|
||||
Display_characterUpdate(&self->displayShadow[rowCounter][colCounter], 0x20);
|
||||
}
|
||||
}
|
||||
Display_clearShadow(self);
|
||||
}
|
||||
|
||||
self->runTask = true;
|
||||
@@ -132,6 +124,7 @@ void Display_destruct(struct Display* self)
|
||||
|
||||
ErrorStatus Display_clearScreen(struct Display* self)
|
||||
{
|
||||
Display_clearShadow(self);
|
||||
return DisplayDevice_clear(self->displayDevice);
|
||||
}
|
||||
|
||||
@@ -260,7 +253,7 @@ inline static char Display_getUpdatedCharacter (struct DisplayCharacter* display
|
||||
}
|
||||
|
||||
|
||||
static void Display_characterUpdateAll(struct Display* self)
|
||||
inline static void Display_characterUpdateAll(struct Display* self)
|
||||
{
|
||||
size_t rowCounter;
|
||||
size_t colCounter;
|
||||
@@ -281,6 +274,23 @@ static void Display_characterUpdateAll(struct Display* self)
|
||||
}
|
||||
|
||||
|
||||
inline static void Display_clearShadow(struct Display* self)
|
||||
{
|
||||
// Clear the display shadow
|
||||
size_t rowCounter;
|
||||
size_t colCounter;
|
||||
char buffer[self->displayDevice->parameters.numberOfColumns];
|
||||
for (rowCounter = 0; rowCounter < self->displayDevice->parameters.numberOfRows; rowCounter++)
|
||||
{
|
||||
for (colCounter = 0; colCounter < self->displayDevice->parameters.numberOfColumns; colCounter++)
|
||||
{
|
||||
buffer[colCounter] = 0x20;
|
||||
}
|
||||
Display_write(self, buffer, self->displayDevice->parameters.numberOfColumns, rowCounter + 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void DisplayTask(void* parameters)
|
||||
{
|
||||
struct Display* self = (struct Display*)parameters;
|
||||
@@ -386,7 +396,7 @@ static void DisplayTask(void* parameters)
|
||||
Display_characterUpdateAll(self);
|
||||
}
|
||||
|
||||
vTaskDelay(10);
|
||||
// vTaskDelay(10);
|
||||
}
|
||||
|
||||
vTaskDelay(10);
|
||||
|
||||
Reference in New Issue
Block a user