Skip to content

Commit

Permalink
add second line for longer pool url, switch to fallback if used
Browse files Browse the repository at this point in the history
  • Loading branch information
WantClue committed Oct 9, 2024
1 parent bbef32f commit 4010a0b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions main/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,20 @@ static void _update_screen_two(GlobalState * GLOBAL_STATE)
if (OLED_status()) {
// Pool URL
memset(module->oled_buf, 0, 20);
snprintf(module->oled_buf, 20, "Pool: %.13s", module->pool_url);
if (module->is_using_fallback) {
snprintf(module->oled_buf, 20, "Pool: %.13s", module->fallback_pool_url);
} else {
snprintf(module->oled_buf, 20, "Pool: %.13s", module->pool_url);
}
OLED_writeString(0, 0, module->oled_buf);

// Second line of pool URL
memset(module->oled_buf, 0, 20);
if (module->is_using_fallback) {
snprintf(module->oled_buf, 20, "%.19s", module->fallback_pool_url + 13);
} else {
snprintf(module->oled_buf, 20, "%.19s", module->pool_url + 13);
}
OLED_writeString(0, 1, module->oled_buf);

// IP Address
esp_netif_get_ip_info(netif, &ip_info);
Expand Down

0 comments on commit 4010a0b

Please sign in to comment.