diff options
| Commit | 9bd70c8ed50efb0d84a652bd5a5682627a819cd3 (patch) | |
|---|---|---|
| Author | 2024-05-26 09:55:11 +0300 | |
| Committer | 2024-05-26 09:55:11 +0300 | |
| Files | 8f7d186194e6f1da7be9bf1107aef17b96669411 | |
| uni-projects-9bd70c8ed50efb0d84a652bd5a5682627a819cd3.tar uni-projects-9bd70c8ed50efb0d84a652bd5a5682627a819cd3.tar.gz uni-projects-9bd70c8ed50efb0d84a652bd5a5682627a819cd3.zip | ||
| Parent | 28e2190b4c4034a82cb60b3ff1afcf5f34153b07 (diff) | |
[iot/goam] Generalized line clearing
3 files changed, 4 insertions, 5 deletions
| -rw-r--r-- | Year 3/Internet of things/goam/main/display.c | 5 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/display.h | 2 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/wifi.c | 2 |
diff --git a/Year 3/Internet of things/goam/main/display.c b/Year 3/Internet of things/goam/main/display.c index 6480d78..449386f 100644 --- a/Year 3/Internet of things/goam/main/display.c +++ b/Year 3/Internet of things/goam/main/display.c @@ -93,10 +93,7 @@ void display_init() { i2c_init(); send(CMD_STREAM, startup, sizeof(startup)); display_output_beginning(); - display_println(" "); - display_println(" "); - display_println(" "); - display_println(" "); + display_println(LINE_CLEAR LINE_CLEAR LINE_CLEAR LINE_CLEAR); ESP_LOGI(TAG, "Initialized display"); } diff --git a/Year 3/Internet of things/goam/main/display.h b/Year 3/Internet of things/goam/main/display.h index 84f1e96..7686a54 100644 --- a/Year 3/Internet of things/goam/main/display.h +++ b/Year 3/Internet of things/goam/main/display.h @@ -11,6 +11,8 @@ void display_invertion(enum Inversion inv_byte); void display_println(const char* str); void display_printon(const char* str, unsigned char line); +#define LINE_CLEAR " " + #define CHAR_WIFI "\5" #define CHAR_NOWIFI "\7" #define CHAR_WIFI_EXCLAM "\6" diff --git a/Year 3/Internet of things/goam/main/wifi.c b/Year 3/Internet of things/goam/main/wifi.c index 6f74640..32b82ee 100644 --- a/Year 3/Internet of things/goam/main/wifi.c +++ b/Year 3/Internet of things/goam/main/wifi.c @@ -57,7 +57,7 @@ static unsigned short MAX_AP = 16; static TaskHandle_t launcher_handle = NULL; static void scan_and_connect_task() { - display_printon(CHAR_NOWIFI "---.---.---.---", IP_LINE); + display_printon(CHAR_NOWIFI "---.---.---.---" "-" LINE_CLEAR LINE_CLEAR, IP_LINE); ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, true)); wifi_ap_record_t ap_info[MAX_AP]; |
