generated from Projetos/RaspberryPi_app
Fix spacing on yellow area
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -24,7 +24,7 @@
|
||||
// Configuration
|
||||
// ---------------------------------------------------------------------------
|
||||
constexpr int16_t SCREEN_W = 128;
|
||||
constexpr int16_t SCREEN_H = 64;
|
||||
constexpr int16_t SCREEN_H = 64; // 16 yellow on top and 48 blue on bottom
|
||||
|
||||
constexpr const char* ETH_IFACE = "eth0";
|
||||
constexpr const char* WLAN_IFACE = "wlan0";
|
||||
@@ -75,7 +75,7 @@ static void signal_handler(int) { g_running = 0; }
|
||||
// Main
|
||||
// ---------------------------------------------------------------------------
|
||||
int main(int argc, char* argv[]) {
|
||||
const char* fb_device = "/dev/fb0";
|
||||
const char* fb_device = "/dev/fb1";
|
||||
if (argc > 1) fb_device = argv[1];
|
||||
|
||||
gfx::LinuxFBDisplay display(SCREEN_W, SCREEN_H);
|
||||
@@ -98,15 +98,15 @@ int main(int argc, char* argv[]) {
|
||||
std::string wlan_ip = get_ip(WLAN_IFACE);
|
||||
|
||||
std::snprintf(line_buf, sizeof(line_buf), "ETH: %s", eth_ip.c_str());
|
||||
display.setCursor(0, 1);
|
||||
display.setCursor(0, 0);
|
||||
display.print(line_buf);
|
||||
|
||||
std::snprintf(line_buf, sizeof(line_buf), "WLAN: %s", wlan_ip.c_str());
|
||||
display.setCursor(0, 11);
|
||||
display.setCursor(0, 8);
|
||||
display.print(line_buf);
|
||||
|
||||
// --- Separator ---
|
||||
display.drawHLine(0, 23, SCREEN_W, gfx::colors::white);
|
||||
display.drawHLine(0, 17, SCREEN_W, gfx::colors::white);
|
||||
|
||||
// --- Date and time ---
|
||||
std::time_t now = std::time(nullptr);
|
||||
|
||||
Reference in New Issue
Block a user