Skip to content

Commit

Permalink
Improved DisplayGeneralInfoSection() for less than three virtual screens
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Dec 29, 2023
1 parent ca186a1 commit ecc23de
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Forecast_record_type WxForecast[max_readings]; //!< OWM Weather Forecast
#define barchart_on true
#define barchart_off false

const String Locations[] = LOCATIONS_TXT; //!< Locations/Screen Titles
const String [] = _TXT; //!< /Screen Titles

// OWM Forecast Data
float pressure_readings[max_readings] = { 0 }; //!< OWM pressure readings
Expand Down Expand Up @@ -1729,7 +1729,8 @@ void DisplayGeneralInfoSection(void) {
uint16_t w = 0;

// Print page heading
for (int i = 0; i <= 2; i++) {
int i_max = sizeof(Locations) / sizeof(Locations[0]) - 2;
for (int i = 0; i <= i_max; i++) {
if (i == 0) {
// Current menu item, centered
u8g2Fonts.setFont(u8g2_font_helvB14_tf);
Expand Down

0 comments on commit ecc23de

Please sign in to comment.