1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-29 13:33:06 +01:00

Add lower chart line for horizontal half chart; write current value after chart lines

This commit is contained in:
Ulrich Meine
2025-12-05 00:10:31 +01:00
parent 1b55439135
commit 0f50b614eb
2 changed files with 15 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ protected:
int top = 48; // display top header lines
int bottom = 22; // display bottom lines
int hGap = 10; // gap between 2 horizontal charts; actual gap is 2x <gap>
int hGap = 11; // gap between 2 horizontal charts; actual gap is 2x <gap>
int vGap = 20; // gap between 2 vertical charts; actual gap is 2x <gap>
int xOffset = 33; // offset for horizontal axis (time/value), because of space for left vertical axis labeling
int yOffset = 10; // offset for vertical axis (time/value), because of space for top horizontal axis labeling
@@ -52,6 +52,7 @@ protected:
size_t currIdx; // Current index in TWD history buffer
size_t lastIdx; // Last index of TWD history buffer
size_t lastAddedIdx = 0; // Last index of TWD history buffer when new data was added
bool bufDataValid = false; // Flag to indicate if buffer data is valid
int oldChrtIntv = 0; // remember recent user selection of data interval
void drawChrt(int8_t chrtIntv, GwApi::BoatValue& currValue); // Draw chart line