diff options
author | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2024-09-28 18:29:46 +0200 |
---|---|---|
committer | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2024-09-28 18:29:46 +0200 |
commit | 62f508b029c4cc6d0819eb5b3e06353c902be2be (patch) | |
tree | 9fde7c2d47b7a59be9ae4edc2e64924bb456d969 | |
parent | 129a2650c22915bc789b6bdbc9d360bd97059e2f (diff) |
[+] Using screen as progress indicator when booting
-rw-r--r-- | components/screen/screen.c | 9 | ||||
-rw-r--r-- | main/main.c | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/components/screen/screen.c b/components/screen/screen.c index 45f89f7..92f55de 100644 --- a/components/screen/screen.c +++ b/components/screen/screen.c @@ -50,25 +50,25 @@ void configure_screen(struct Screen* screen) printf("I2C MCP Configured!\n"); - screen->nixies[0].digit = 0; + screen->nixies[0].digit = 9; screen->nixies[0].reg = REG_GPIOA; screen->nixies[0].C = N0_P0; screen->nixies[0].B = N0_P1; screen->nixies[0].D = N0_P2; screen->nixies[0].A = N0_P3; - screen->nixies[1].digit = 0; + screen->nixies[1].digit = 9; screen->nixies[1].reg = REG_GPIOA; screen->nixies[1].C = N1_P0; screen->nixies[1].B = N1_P1; screen->nixies[1].D = N1_P2; screen->nixies[1].A = N1_P3; - screen->nixies[2].digit = 0; + screen->nixies[2].digit = 9; screen->nixies[2].reg = REG_GPIOB; screen->nixies[2].C = N2_P0; screen->nixies[2].B = N2_P1; screen->nixies[2].D = N2_P2; screen->nixies[2].A = N2_P3; - screen->nixies[3].digit = 0; + screen->nixies[3].digit = 9; screen->nixies[3].reg = REG_GPIOB; screen->nixies[3].C = N3_P0; screen->nixies[3].B = N3_P1; @@ -180,6 +180,7 @@ void display(struct Screen* screen, char digits[4]) { for (uint8_t i = 0; i < 4; ++i) { uint8_t digit = digits[i] - '0'; + printf("%i", digit); if (screen->nixies[i].digit != digit){ screen->nixies[i].digit = digit; set_digit(screen->mcp, &(screen->nixies[i])); // Call set_digit function diff --git a/main/main.c b/main/main.c index f30cfdd..81a51b1 100644 --- a/main/main.c +++ b/main/main.c @@ -29,13 +29,18 @@ void app_main(void) { printf("Starting up...\n"); configure_screen(&screen); + display(&screen, "aaaa"); printf("Screen Configured!\n"); setup_nvs(); + display(&screen, "0aaa"); printf("NVS Flash Configured!\n"); launch_dpp(); + display(&screen, "00aa"); printf("WiFi Configured!\n"); set_tz("CET-1CEST,M3.5.0/2,M10.5.0/2"); + display(&screen, "000a"); sync_time(); + display(&screen, "0000"); printf("SNTP Configured!\n"); while(1){ |