Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit589689911fb58f1582c702869dcd303ed26b3b24 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-05-26 11:56:00 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-05-26 11:56:00 +0300
Filese7766f7520908f3c845b2f77f2faf48948ad899b
uni-projects-589689911fb58f1582c702869dcd303ed26b3b24.tar
uni-projects-589689911fb58f1582c702869dcd303ed26b3b24.tar.gz
uni-projects-589689911fb58f1582c702869dcd303ed26b3b24.zip
Parent56828e01f75fbfafc44c6969201129aeb1d71308 (diff)
[iot/goam] WiFi chars are now double width
diff --git a/Year 3/Internet of things/goam/ibm-vga-8x16.xcf b/Year 3/Internet of things/goam/ibm-vga-8x16.xcf
index fab6aa1..41026bb 100644
--- a/Year 3/Internet of things/goam/ibm-vga-8x16.xcf
+++ b/Year 3/Internet of things/goam/ibm-vga-8x16.xcf
Binary files differ
diff --git a/Year 3/Internet of things/goam/main/display.h b/Year 3/Internet of things/goam/main/display.h
index a465682..db1c339 100644
--- a/Year 3/Internet of things/goam/main/display.h
+++ b/Year 3/Internet of things/goam/main/display.h
@@ -14,11 +14,12 @@ void display_printat(const char* str, unsigned char line, unsigned char column);
#define LINE_CLEAR " "
-#define CHAR_WIFI "\5"
-#define CHAR_NO_WIFI "\7"
-#define CHAR_WIFI_EXCLAM "\6"
/* Double-width characters */
#define DCHAR_CAMERA "\1\2"
#define DCHAR_NO_CAMERA "\3\4"
+
+#define DCHAR_WIFI "\5\6"
+#define DCHAR_NO_WIFI "\10\11"
+#define DCHAR_WIFI_EXCLAM "\12\13"
diff --git a/Year 3/Internet of things/goam/main/ibm-vga-8x16.c b/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
index 2a61a7b..1df4772 100644
--- a/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
+++ b/Year 3/Internet of things/goam/main/ibm-vga-8x16.c
@@ -49,37 +49,58 @@ const uint8_t bitpixel_chars[256][16] = {
COL(0000000000000000)
},
- ['\5'] = {
- COL(0000000000110000)
- COL(0000000110011000)
- COL(0000110011011000)
- COL(0010011011011000)
- COL(0000110011011000)
- COL(0000000110011000)
- COL(0000000000110000)
- COL(0000000000000000)
+ ['\5'] = { COL(0000000000110000)
+ COL(0000000000011000)
+ COL(0000000000001100)
+ COL(0000000110000110)
+ COL(0000000011000110)
+ COL(0000110001100110)
+ COL(0000011001100110)
+ COL(0011011001100110) },
+ ['\6'] = { COL(0011011001100110)
+ COL(0000011001100110)
+ COL(0000110001100110)
+ COL(0000000011000110)
+ COL(0000000110000110)
+ COL(0000000000001100)
+ COL(0000000000011000)
+ COL(0000000000110000)
},
- ['\6'] = {
- COL(0000000000110000)
- COL(0000000110011000)
- COL(0000110011011000)
- COL(0010011011011000)
- COL(0000110011011000)
- COL(0000000110011000)
- COL(0010111000110000)
- COL(0000000000000000)
+ ['\10'] = { COL(0000000000110000)
+ COL(0000000000011000)
+ COL(0010000000001100)
+ COL(0011000110000110)
+ COL(0001100011000110)
+ COL(0000110001100110)
+ COL(0000011001100110)
+ COL(0011011101100110) },
+ ['\11'] = { COL(0011011111100110)
+ COL(0000011011100110)
+ COL(0000110001110110)
+ COL(0000000011011110)
+ COL(0000000110001110)
+ COL(0000000000001110)
+ COL(0000000000011011)
+ COL(0000000000110001)
},
- ['\7'] = {
- COL(0000011000110000)
- COL(0000001110011000)
- COL(0000110111011000)
- COL(0010011011011000)
- COL(0000110011111000)
- COL(0000000110111000)
- COL(0000000000111000)
- COL(0000000000001100)
+ ['\12'] = { COL(0000000000110000)
+ COL(0000000000011000)
+ COL(0000000000001100)
+ COL(0000000110000110)
+ COL(0000000011000110)
+ COL(0000110001100110)
+ COL(0000011001100110)
+ COL(0011011001100110) },
+ ['\13'] = { COL(0011011001100110)
+ COL(0000011001100110)
+ COL(0000110001100110)
+ COL(0000000011000110)
+ COL(0000000110000110)
+ COL(0000000000001100)
+ COL(0011011110011000)
+ COL(0011011110110000)
},
/* Standard characters */
diff --git a/Year 3/Internet of things/goam/main/wifi.c b/Year 3/Internet of things/goam/main/wifi.c
index 0322518..24a6ba5 100644
--- a/Year 3/Internet of things/goam/main/wifi.c
+++ b/Year 3/Internet of things/goam/main/wifi.c
@@ -58,7 +58,7 @@ static unsigned short MAX_AP = 16;
static TaskHandle_t launcher_handle = NULL;
static void scan_and_connect_task() {
- display_printat(CHAR_NO_WIFI, AT_WIFI_ICON);
+ display_printat(DCHAR_NO_WIFI, AT_WIFI_ICON);
display_printon("---.---.---.--- " "-" LINE_CLEAR LINE_CLEAR, IP_LINE);
ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, true));
@@ -125,13 +125,13 @@ static void launcher_scan_and_connect_task(void*) {
static int connect_tries = 0;
static void sta_connected_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
- display_printat(CHAR_WIFI, AT_WIFI_ICON);
+ display_printat(DCHAR_WIFI, AT_WIFI_ICON);
}
static void sta_disconnect_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
if (connect_tries < ESP_MAXIMUM_RETRY) {
esp_wifi_connect();
- display_printat(CHAR_WIFI_EXCLAM, AT_WIFI_ICON);
+ display_printat(DCHAR_WIFI_EXCLAM, AT_WIFI_ICON);
connect_tries++;
ESP_LOGW(TAG, "Retrying to connect... Try %d/%d", connect_tries, ESP_MAXIMUM_RETRY);
vTaskDelay(200 / portTICK_PERIOD_MS);