diff options
| Commit | 670c46eb532b5981ced6d8ba7d1cde31b1981d7a (patch) | |
|---|---|---|
| Author | 2024-05-24 16:41:30 +0300 | |
| Committer | 2024-05-24 16:41:30 +0300 | |
| Files | 6f9eac4b94af4f8b98b4703ceb427e7c1158ddf1 | |
| uni-projects-670c46eb532b5981ced6d8ba7d1cde31b1981d7a.tar uni-projects-670c46eb532b5981ced6d8ba7d1cde31b1981d7a.tar.gz uni-projects-670c46eb532b5981ced6d8ba7d1cde31b1981d7a.zip | ||
| Parent | d892a6bd4b10d9d3534c9af0f3e568a37a0c4afa (diff) | |
[iot/goam] Added double-width camera characters
4 files changed, 50 insertions, 24 deletions
| -rw-r--r-- | Year 3/Internet of things/goam/ibm-vga-8x16.xcf | bin | 99597 -> 100663 bytes | |||
| -rw-r--r-- | Year 3/Internet of things/goam/main/display.h | 9 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/ibm-vga-8x16.c | 57 | ||||
| -rw-r--r-- | Year 3/Internet of things/goam/main/main.c | 8 |
diff --git a/Year 3/Internet of things/goam/ibm-vga-8x16.xcf b/Year 3/Internet of things/goam/ibm-vga-8x16.xcf Binary files differindex 9ca0697..0f74db2 100644 --- a/Year 3/Internet of things/goam/ibm-vga-8x16.xcf +++ b/Year 3/Internet of things/goam/ibm-vga-8x16.xcf diff --git a/Year 3/Internet of things/goam/main/display.h b/Year 3/Internet of things/goam/main/display.h index db7159f..112ee87 100644 --- a/Year 3/Internet of things/goam/main/display.h +++ b/Year 3/Internet of things/goam/main/display.h @@ -8,9 +8,10 @@ enum Inversion { }; void display_invertion(enum Inversion inv_byte); - - -/* clang-format on */ - void display_println(const char* str); void display_printon(const char* str, unsigned char line); + +/* Double-width characters */ + +#define DCHAR_CAMERA "\1\2" +#define DCHAR_NO_CAMERA "\3\4" 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 e804225..f623d2c 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 @@ -144,26 +144,51 @@ const uint8_t bitpixel_chars[256][16] = { COL(0000000000000000) }, - ['+'] = { - COL(0000011111000000) - COL(0000010001100000) - COL(0000010001100000) - COL(0000010101000000) - COL(0000010001000000) - COL(0000011111000000) + ['-'] = { + COL(0000000010000000) + COL(0000000010000000) + COL(0000000010000000) + COL(0000000010000000) + COL(0000000010000000) + COL(0000000010000000) COL(0000000000000000) COL(0000000000000000) }, - ['-'] = { - COL(0011011111000000) - COL(0000110001100000) - COL(0000011001100000) - COL(0000010101000000) - COL(0000010011100000) - COL(0000011111011000) - COL(0000000000000000) - COL(0000000000000000) + ['\1'] = { COL(0000111111110000) + COL(0000111111110000) + COL(0000100000011100) + COL(0000100000011100) + COL(0000100000011100) + COL(0000100000011100) + COL(0000100000010000) + COL(0000100110010000) }, + ['\2'] = { COL(0000100110010000) + COL(0000100000010000) + COL(0000100000010000) + COL(0000100000010000) + COL(0000100000010000) + COL(0000111111110000) + COL(0000111111110000) + COL(0000000000000000) + }, + + ['\3'] = { COL(0000111111110000) + COL(0100111111110000) + COL(0110100000011100) + COL(0011100000011100) + COL(0001100000011100) + COL(0000110000011100) + COL(0000111000010000) + COL(0000100110010000) }, + ['\4'] = { COL(0000100110010000) + COL(0000100001110000) + COL(0000100000110000) + COL(0000100000011000) + COL(0000100000011100) + COL(0000111111110110) + COL(0000111111110010) + COL(0000000000000000) }, }; diff --git a/Year 3/Internet of things/goam/main/main.c b/Year 3/Internet of things/goam/main/main.c index f83dbf3..0623206 100644 --- a/Year 3/Internet of things/goam/main/main.c +++ b/Year 3/Internet of things/goam/main/main.c @@ -68,14 +68,14 @@ void debug_serial_print_image(const char* image, size_t length) { } void take_photo() { - display_printon("-", 1); + display_printon(DCHAR_NO_CAMERA, 1); ptc06_set_image_resolution(RES_640X480); char* image; size_t length = ptc06_get_image(&image); spiffs_write(SPIFFS_PREFIX "/capture.jpeg", image, length); - display_printon("+", 1); + display_printon(DCHAR_CAMERA, 1); free(image); } @@ -94,7 +94,7 @@ static void init_camera(void*) { ESP_LOGE(TAG, "Couldnt't notify main of camera init, software will hang"); } - display_printon("+", 1); + display_printon(DCHAR_CAMERA, 1); vTaskDelete(NULL); } @@ -114,7 +114,7 @@ void app_main(void) add_push_button(BTN_SHOOT_PIN, take_photo, NULL); display_init(); - display_printon("-", 1); + display_printon(DCHAR_NO_CAMERA, 1); // This is really slow wifi_init(); |
