Skip to content

Commit

Permalink
Fixing 15min vertical line (was drawn every 20min)
Browse files Browse the repository at this point in the history
  • Loading branch information
lains committed Apr 20, 2024
1 parent 1a2ac7b commit 051b6c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/domain/HistoryDraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void drawHistory(Stm32LcdDriver& lcd, uint16_t x, uint16_t y, uint16_t width, ui
}

if (thisSamplePower.isValid) {
/* Review the code below */
/* TODO: Review the code below */
if (thisSamplePower.maxValue > 0) { /* Positive value, even if range, display the highest value of the range (worst case) */
uint16_t thisSampleTopAbsoluteY = 0;
uint16_t thisSampleBottomAbsoluteY = 0;
Expand Down Expand Up @@ -252,7 +252,7 @@ void drawHistory(Stm32LcdDriver& lcd, uint16_t x, uint16_t y, uint16_t width, ui
if (gridX > x)
lcd.drawVerticalLine(gridX-1, y, height, Stm32LcdDriver::Black); /* Draw each hour, with a double line */
}
else if (fiveMinStep % 4 == 0) /* gridX is pointing to the edge of a quarter of an hour */
else if (fiveMinStep % 3 == 0) /* gridX is pointing to the edge of a quarter of an hour */
lcd.drawVerticalLine(gridX, y, height, Stm32LcdDriver::Black); /* Draw each other quarter */
else
lcd.drawVerticalLine(gridX, y, height, Stm32LcdDriver::LightGrey); /* Draw each other step of 5 mins */
Expand Down

0 comments on commit 051b6c6

Please sign in to comment.