From e69bc9b1f826aa392b3a596da20489c8a8718f5d Mon Sep 17 00:00:00 2001 From: Rene Date: Mon, 11 Mar 2024 01:19:39 +0100 Subject: [PATCH 1/2] Develop into 2.0.8 (#26) * Updated boards * Updated boards * Updated boards * Updated boards * Updated board * Added 2432S022N * Updated boards * Added 8048S070R * Updated boards * Smaller Lena 80x80 * Updated boards * Rem oved v11 boards * Removed esp32-8048S070 * Default no rotation * Updated boards * Updated build for node 20 * No default_env * Updated boards * Corrected platformio.ini * Updated boards * Set back to develop * Added name of board in define and in loggin * Added esp32-2432S028Rv3 * Updated boards * Updated boards * updated boards * Updated boards * Updated boards * UPdated boards * Updated boards * Updated boards * Updated boards * Updated boards * Enable all boards * Delay if ARDUINO_USB_CDC_ON_BOOT * Updated boards * Updated boards * Updated boards * Updated boards * Updated boards * Updated boards * Removed audio * Updated boards * not track s;ll * Added rotate button, version 2.8 * Small fixes --- .gitignore | 6 +- SquareLine_Project.sll | 1 - SquareLine_Project.spj | 641 ++++++++++++++++++++++++++- SquareLine_Project_events.py | 4 - boards | 2 +- platformio.ini | 8 +- src/main.cpp | 37 +- src/ui/components/ui_comp_hook.c | 2 +- src/ui/images/ui_img_lena80x80_png.c | 4 +- src/ui/screens/ui_scrMain.c | 18 +- src/ui/ui.c | 15 +- src/ui/ui.h | 12 +- src/ui/ui_events.h | 5 +- src/ui/ui_helpers.c | 98 +++- src/ui/ui_helpers.h | 27 +- 15 files changed, 821 insertions(+), 59 deletions(-) delete mode 100644 SquareLine_Project.sll delete mode 100644 SquareLine_Project_events.py diff --git a/.gitignore b/.gitignore index e3075b5..585cfc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ .* ./ *.log -.DS_Store workspace.code-workspace autosave/ -backup/ \ No newline at end of file +backup/ +SquareLine_Project.sll +Themes.slt +SquareLine_Project_events.py diff --git a/SquareLine_Project.sll b/SquareLine_Project.sll deleted file mode 100644 index 21d6cbf..0000000 --- a/SquareLine_Project.sll +++ /dev/null @@ -1 +0,0 @@ -{"name":"SquareLine_Project.spj","depth":2,"width":320,"height":240,"rotation":0,"offset_x":0,"offset_y":0,"shape":"RECTANGLE","multilang":"DISABLE","description":"","board":"VS Code with SDL for development on PC","board_version":"v1.0.1","editor_version":"1.3.4","image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADwAUADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3aiiigAopm9mYrGhcjrzgUuJ/+eH/AI+KAHUU3E//ADw/8fFGJ/8Anh/4+KAHUU3E/wDzw/8AHxRif/nh/wCPigB1F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APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBRmf/AJ7/APjgp1FADcz/APPf/wAcFGZ/+e//AI4KdRQA3M//AD3/APHBSbGZg0jlyOnGBT6KACiiigD/2Q==","force_export_images":false,"flat_export":false,"pointfilter":false,"theme_simplified":false,"theme_dark":false,"theme_color1":5,"theme_color2":0,"uiExportFolderPath":"C:\\Users\\rzeld\\source\\repos\\esp32-smartdisplay-demo\\src\\ui","projectExportFolderPath":"","backup_cnt":70,"autosave_cnt":0,"lvgl_version":"8.3.6","callfuncsexport":"CPP_FILE","lvgl_include_path":"lvgl.h"} \ No newline at end of file diff --git a/SquareLine_Project.spj b/SquareLine_Project.spj index c739b89..6e2ffeb 100644 --- a/SquareLine_Project.spj +++ b/SquareLine_Project.spj @@ -1157,6 +1157,622 @@ ], "saved_objtypeKey": "LABEL" }, + { + "guid": "GUID98385998-882988S33149369", + "deepid": -335272605, + "children": [ + { + "guid": "GUID61390002-883548S569369", + "deepid": -1650129863, + "locked": false, + "properties": [ + { + "nid": 1442754740, + "strtype": "OBJECT/Name", + "strval": "Label1", + "InheritedType": 10 + }, + { + "nid": 342834439, + "strtype": "OBJECT/Layout", + "InheritedType": 1 + }, + { + "Flow": 0, + "Wrap": false, + "Reversed": false, + "MainAlignment": 0, + "CrossAlignment": 0, + "TrackAlignment": 0, + "LayoutType": 0, + "nid": 224666674, + "strtype": "OBJECT/Layout_type", + "strval": "No_layout", + "InheritedType": 13 + }, + { + "nid": 824357465, + "strtype": "OBJECT/Transform", + "InheritedType": 1 + }, + { + "nid": -822552499, + "flags": 17, + "strtype": "OBJECT/Position", + "intarray": [ + 0, + 0 + ], + "InheritedType": 7 + }, + { + "nid": 875382501, + "flags": 51, + "strtype": "OBJECT/Size", + "intarray": [ + 1, + 1 + ], + "InheritedType": 7 + }, + { + "nid": 827079137, + "strtype": "OBJECT/Align", + "strval": "CENTER", + "InheritedType": 3 + }, + { + "nid": -850667278, + "flags": 1048576, + "strtype": "OBJECT/Flags", + "InheritedType": 1 + }, + { + "nid": 1711992282, + "strtype": "OBJECT/Hidden", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 852090798, + "strtype": "OBJECT/Clickable", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 630995121, + "strtype": "OBJECT/Checkable", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 7502698, + "strtype": "OBJECT/Press_lock", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": 819176383, + "strtype": "OBJECT/Click_focusable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -519131414, + "strtype": "OBJECT/Adv_hittest", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 567523943, + "strtype": "OBJECT/Ignore_layout", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 155597143, + "strtype": "OBJECT/Floating", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1325199371, + "strtype": "OBJECT/Overflow_visible", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 142328265, + "strtype": "OBJECT/Flex_in_new_track", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -93409243, + "strtype": "OBJECT/Event_bubble", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -2005556760, + "strtype": "OBJECT/Gesture_bubble", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": 1708067148, + "strtype": "OBJECT/Snappable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -196917968, + "strtype": "OBJECT/Scrollable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -2047826988, + "strtype": "OBJECT/Scroll_elastic", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -1898524709, + "strtype": "OBJECT/Scroll_momentum", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -1723729260, + "strtype": "OBJECT/Scroll_on_focus", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -28486215, + "strtype": "OBJECT/Scroll_chain", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -2125364532, + "strtype": "OBJECT/Scroll_with_arrow", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1783104629, + "strtype": "OBJECT/Scroll_one", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1358011081, + "strtype": "OBJECT/Scrollbar_mode", + "strval": "AUTO", + "InheritedType": 3 + }, + { + "nid": -438601294, + "strtype": "OBJECT/Scroll_direction", + "strval": "ALL", + "InheritedType": 3 + }, + { + "nid": 1744785133, + "flags": 1048576, + "strtype": "OBJECT/States", + "InheritedType": 1 + }, + { + "nid": 638604064, + "strtype": "OBJECT/Checked", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1606914610, + "strtype": "OBJECT/Disabled", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1495402902, + "strtype": "OBJECT/Focused", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1241302375, + "strtype": "OBJECT/Pressed", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1085757518, + "strtype": "OBJECT/User_1", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1668346252, + "strtype": "OBJECT/User_2", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1325258139, + "strtype": "OBJECT/User_3", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 225163757, + "strtype": "OBJECT/User_4", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -2090177965, + "strtype": "LABEL/Label", + "InheritedType": 1 + }, + { + "nid": -1586919080, + "strtype": "LABEL/Long_mode", + "strval": "WRAP", + "InheritedType": 3 + }, + { + "nid": -36005373, + "strtype": "LABEL/Text", + "strval": "Rotate", + "InheritedType": 10 + }, + { + "part": "lv.PART.MAIN", + "childs": [], + "nid": 1771066441, + "strtype": "LABEL/Style_main", + "strval": "lv.PART.MAIN, Text, Rectangle, Pad", + "InheritedType": 11 + }, + { + "nid": 644834894, + "strtype": "LABEL/Recolor", + "strval": "False", + "InheritedType": 2 + } + ], + "saved_objtypeKey": "LABEL" + } + ], + "locked": false, + "properties": [ + { + "nid": -642660101, + "strtype": "OBJECT/Name", + "strval": "Rotate", + "InheritedType": 10 + }, + { + "nid": -1298229436, + "strtype": "OBJECT/Layout", + "InheritedType": 1 + }, + { + "Flow": 0, + "Wrap": false, + "Reversed": false, + "MainAlignment": 0, + "CrossAlignment": 0, + "TrackAlignment": 0, + "LayoutType": 0, + "nid": -1578641459, + "strtype": "OBJECT/Layout_type", + "strval": "No_layout", + "InheritedType": 13 + }, + { + "nid": -1316752961, + "strtype": "OBJECT/Transform", + "InheritedType": 1 + }, + { + "nid": -1750449178, + "flags": 17, + "strtype": "OBJECT/Position", + "intarray": [ + 0, + 0 + ], + "InheritedType": 7 + }, + { + "nid": 1824280140, + "flags": 17, + "strtype": "OBJECT/Size", + "intarray": [ + 100, + 50 + ], + "InheritedType": 7 + }, + { + "nid": -1897871785, + "strtype": "OBJECT/Align", + "strval": "BOTTOM_LEFT", + "InheritedType": 3 + }, + { + "nid": 91801937, + "flags": 1048576, + "strtype": "OBJECT/Flags", + "InheritedType": 1 + }, + { + "nid": 406821442, + "strtype": "OBJECT/Hidden", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -362461289, + "strtype": "OBJECT/Clickable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -2138482613, + "strtype": "OBJECT/Checkable", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -66039966, + "strtype": "OBJECT/Press_lock", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -418458486, + "strtype": "OBJECT/Click_focusable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": 76869552, + "strtype": "OBJECT/Adv_hittest", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1794404267, + "strtype": "OBJECT/Ignore_layout", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -425931157, + "strtype": "OBJECT/Floating", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1397406420, + "strtype": "OBJECT/Overflow_visible", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -200793177, + "strtype": "OBJECT/Flex_in_new_track", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1921099633, + "strtype": "OBJECT/Event_bubble", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -477223235, + "strtype": "OBJECT/Gesture_bubble", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": 163722874, + "strtype": "OBJECT/Snappable", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -1934923098, + "strtype": "OBJECT/Scrollable", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -201890939, + "strtype": "OBJECT/Scroll_elastic", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -1322806651, + "strtype": "OBJECT/Scroll_momentum", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -23110176, + "strtype": "OBJECT/Scroll_on_focus", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": -656856749, + "strtype": "OBJECT/Scroll_chain", + "strval": "True", + "InheritedType": 2 + }, + { + "nid": 1724685365, + "strtype": "OBJECT/Scroll_with_arrow", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1316457989, + "strtype": "OBJECT/Scroll_one", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1021715762, + "strtype": "OBJECT/Scrollbar_mode", + "strval": "AUTO", + "InheritedType": 3 + }, + { + "nid": -1371163310, + "strtype": "OBJECT/Scroll_direction", + "strval": "ALL", + "InheritedType": 3 + }, + { + "nid": 745104175, + "flags": 1048576, + "strtype": "OBJECT/States", + "InheritedType": 1 + }, + { + "nid": -1231770581, + "strtype": "OBJECT/Checked", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -1953607701, + "strtype": "OBJECT/Disabled", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -812959049, + "strtype": "OBJECT/Focused", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 1042703602, + "strtype": "OBJECT/Pressed", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -2058976230, + "strtype": "OBJECT/User_1", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -347764684, + "strtype": "OBJECT/User_2", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": -2043274545, + "strtype": "OBJECT/User_3", + "strval": "False", + "InheritedType": 2 + }, + { + "nid": 30634157, + "strtype": "OBJECT/User_4", + "strval": "False", + "InheritedType": 2 + }, + { + "part": "lv.PART.MAIN", + "childs": [], + "nid": 1682744946, + "strtype": "BUTTON/Style_main", + "strval": "lv.PART.MAIN, Rectangle, Pad, Text ", + "InheritedType": 11 + }, + { + "disabled": false, + "nid": -1736035920, + "strtype": "_event/EventHandler", + "strval": "CLICKED", + "childs": [ + { + "nid": 799025726, + "strtype": "_custom/name", + "strval": "Event1", + "InheritedType": 10 + }, + { + "nid": -1802223861, + "strtype": "_custom/condition_C", + "strval": "", + "InheritedType": 10 + }, + { + "nid": -21001486, + "strtype": "_custom/condition_P", + "strval": "", + "InheritedType": 10 + }, + { + "nid": 1817739929, + "strtype": "_event/action", + "strval": "CALL FUNCTION", + "childs": [ + { + "nid": 982475560, + "strtype": "CALL FUNCTION/Name", + "strval": "CALL FUNCTION", + "InheritedType": 10 + }, + { + "nid": 1643403114, + "strtype": "CALL FUNCTION/Call", + "strval": "<{Function_name}>( event_struct )", + "InheritedType": 10 + }, + { + "nid": 237009652, + "strtype": "CALL FUNCTION/CallC", + "strval": "<{Function_name}>( e );", + "InheritedType": 10 + }, + { + "nid": -690063285, + "strtype": "CALL FUNCTION/Function_name", + "strval": "OnRotateClicked", + "InheritedType": 10 + }, + { + "nid": -1386628958, + "strtype": "CALL FUNCTION/Dont_export_function", + "strval": "True", + "InheritedType": 2 + } + ], + "InheritedType": 10 + } + ], + "InheritedType": 4 + } + ], + "saved_objtypeKey": "BUTTON" + }, { "guid": "GUID74451784-121997S1282280", "deepid": 1370575997, @@ -1756,7 +2372,7 @@ { "nid": 1685483521, "strtype": "CALL FUNCTION/Function_name", - "strval": "OnButtonClicked", + "strval": "OnAddOneClicked", "InheritedType": 10 }, { @@ -2326,7 +2942,7 @@ { "nid": 1036576854, "strtype": "LABEL/Text", - "strval": "Count", + "strval": "0", "InheritedType": 10 }, { @@ -2911,6 +3527,8 @@ } ], "isPage": true, + "editor_posx": 400, + "editor_posy": -400, "locked": false, "properties": [ { @@ -3135,6 +3753,7 @@ "saved_objtypeKey": "STARTEVENTS" }, "animations": [], + "selected_theme": "Default", "info": { "name": "SquareLine_Project.spj", "depth": 2, @@ -3148,22 +3767,34 @@ "description": "", "board": "VS Code with SDL for development on PC", "board_version": "v1.0.1", - "editor_version": "1.3.4", + "editor_version": "1.4.0", "image": "", "force_export_images": false, "flat_export": false, + "advanced_alpha": false, "pointfilter": false, "theme_simplified": false, "theme_dark": false, "theme_color1": 5, "theme_color2": 0, "uiExportFolderPath": "C:\\Users\\rzeld\\source\\repos\\esp32-smartdisplay-demo\\src\\ui", - "projectExportFolderPath": "", - "backup_cnt": 69, + "projectExportFolderPath": "C:\\Users\\rzeld\\source\\repos\\esp32-smartdisplay-demo", + "backup_cnt": 71, "autosave_cnt": 0, "lvgl_version": "8.3.6", "callfuncsexport": "CPP_FILE", + "imageexport": "SOURCE", "lvgl_include_path": "lvgl.h", + "drive_stdio": "-", + "drive_stdio_path": "", + "drive_posix": "-", + "drive_posix_path": "", + "drive_win32": "-", + "drive_win32_path": "", + "drive_fatfs": "-", + "drive_fatfs_path": "", + "naming": null, + "naming_force_lowercase": false, "BitDepth": 16, "Name": "SquareLine_Project" } diff --git a/SquareLine_Project_events.py b/SquareLine_Project_events.py deleted file mode 100644 index 9cf1ebe..0000000 --- a/SquareLine_Project_events.py +++ /dev/null @@ -1,4 +0,0 @@ - -def OnButtonClicked(event_struct): - return - diff --git a/boards b/boards index e75f05f..e864619 160000 --- a/boards +++ b/boards @@ -1 +1 @@ -Subproject commit e75f05f68229c59de4c6aa40e38a16e012e5883f +Subproject commit e864619f48bb75cfb7d1db3387ffa5897126aa5f diff --git a/platformio.ini b/platformio.ini index edcadc5..2a87744 100644 --- a/platformio.ini +++ b/platformio.ini @@ -50,19 +50,17 @@ monitor_rts = 0 monitor_dtr = 0 monitor_filters = esp32_exception_decoder -# Partition scheme for OTA -board_build.partitions = min_spiffs.csv - build_flags = -Ofast -Wall -D 'BOARD_NAME="${this.board}"' - -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE + -D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_INFO' + #-D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG' + #-D 'CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE' -D'LV_CONF_PATH=${platformio.include_dir}/lv_conf.h' lib_deps = https://github.com/rzeldent/esp32-smartdisplay - https://github.com/schreibfaul1/ESP32-audioI2S [env:esp32-1732S019C] board = esp32-1732S019C diff --git a/src/main.cpp b/src/main.cpp index bd24e37..637e763 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,21 +2,21 @@ #include #include -#include -#define WIFI_SSID "" -#define WIFI_PASSWORD "" -#define RADIO_URL "http://www.wdr.de/wdrlive/media/einslive.m3u" - -Audio *audio; - -void OnButtonClicked(lv_event_t *e) +void OnAddOneClicked(lv_event_t *e) { static uint8_t cnt = 0; cnt++; lv_label_set_text_fmt(ui_lblCountValue, "%d", cnt); } +void OnRotateClicked(lv_event_t *e) +{ + auto disp = lv_disp_get_default(); + auto rotation = (lv_disp_rot_t)((lv_disp_get_rotation(disp) + 1) % LV_DISP_ROT_270); + lv_disp_set_rotation(disp, rotation); +} + void setup() { #ifdef ARDUINO_USB_CDC_ON_BOOT @@ -30,23 +30,9 @@ void setup() log_i("Free PSRAM: %d bytes", ESP.getPsramSize()); log_i("SDK version: %s", ESP.getSdkVersion()); -#ifdef BOARD_HAS_SPEAK - // Connect to WiFi - WiFi.begin(WIFI_SSID, WIFI_PASSWORD); - if (WiFi.waitForConnectResult() == WL_CONNECTED) - { - audio = new Audio(true, I2S_DAC_CHANNEL_LEFT_EN); - audio->forceMono(true); - audio->setVolume(10); - - while (!audio->connecttohost(RADIO_URL)) - delay(500); - } -#endif - smartdisplay_init(); - auto disp = lv_disp_get_default(); + __attribute__((unused)) auto disp = lv_disp_get_default(); // lv_disp_set_rotation(disp, LV_DISP_ROT_90); // lv_disp_set_rotation(disp, LV_DISP_ROT_180); // lv_disp_set_rotation(disp, LV_DISP_ROT_270); @@ -58,11 +44,6 @@ ulong next_millis; void loop() { -#ifdef BOARD_HAS_SPEAK - if (audio) - audio->loop(); -#endif - auto const now = millis(); if (now > next_millis) { diff --git a/src/ui/components/ui_comp_hook.c b/src/ui/components/ui_comp_hook.c index 038329f..c6ed9bf 100644 --- a/src/ui/components/ui_comp_hook.c +++ b/src/ui/components/ui_comp_hook.c @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.3 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project diff --git a/src/ui/images/ui_img_lena80x80_png.c b/src/ui/images/ui_img_lena80x80_png.c index 25bce11..ae4ffca 100644 --- a/src/ui/images/ui_img_lena80x80_png.c +++ b/src/ui/images/ui_img_lena80x80_png.c @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -9,7 +9,7 @@ #define LV_ATTRIBUTE_MEM_ALIGN #endif -// IMAGE DATA: assets\Lena80x80.png +// IMAG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0x6A,0xC2,0xAB,0xC2,0xEB,0xCA,0xEB,0xCB,0x0B,0xCB,0x0B,0xCB,0x0C,0xCB,0x0B,0xCB,0x0B,0xD3,0x2C,0xD3,0x2C,0xD3,0x2C,0xD3,0x2C,0xD3,0x2C,0xD3,0x2C,0xD3,0x2C,0xCB,0x0C,0xCB,0x2C,0xCB,0x0B,0xCB,0x2C,0xCB,0x0B,0xCB,0x2C,0xD3,0x2C,0xCB,0x0B,0xCB,0x2C,0xCB,0x0B,0xCB,0x0B,0xCB,0x0B,0xCB,0x0C,0xCB,0x0C,0xCB,0x0B,0xC2,0xEB, diff --git a/src/ui/screens/ui_scrMain.c b/src/ui/screens/ui_scrMain.c index 9f906ae..daf7d41 100644 --- a/src/ui/screens/ui_scrMain.c +++ b/src/ui/screens/ui_scrMain.c @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -41,6 +41,19 @@ void ui_scrMain_screen_init(void) lv_obj_set_align(ui_lblCdrValue, LV_ALIGN_TOP_MID); lv_label_set_text(ui_lblCdrValue, "cdr"); + ui_Rotate = lv_btn_create(ui_pnlMain); + lv_obj_set_width(ui_Rotate, 100); + lv_obj_set_height(ui_Rotate, 50); + lv_obj_set_align(ui_Rotate, LV_ALIGN_BOTTOM_LEFT); + lv_obj_add_flag(ui_Rotate, LV_OBJ_FLAG_SCROLL_ON_FOCUS); /// Flags + lv_obj_clear_flag(ui_Rotate, LV_OBJ_FLAG_SCROLLABLE); /// Flags + + ui_Label1 = lv_label_create(ui_Rotate); + lv_obj_set_width(ui_Label1, LV_SIZE_CONTENT); /// 1 + lv_obj_set_height(ui_Label1, LV_SIZE_CONTENT); /// 1 + lv_obj_set_align(ui_Label1, LV_ALIGN_CENTER); + lv_label_set_text(ui_Label1, "Rotate"); + ui_btnCount = lv_btn_create(ui_pnlMain); lv_obj_set_width(ui_btnCount, 100); lv_obj_set_height(ui_btnCount, 50); @@ -67,7 +80,7 @@ void ui_scrMain_screen_init(void) lv_obj_set_x(ui_lblCountValue, 0); lv_obj_set_y(ui_lblCountValue, 60); lv_obj_set_align(ui_lblCountValue, LV_ALIGN_TOP_MID); - lv_label_set_text(ui_lblCountValue, "Count"); + lv_label_set_text(ui_lblCountValue, "0"); ui_Image1 = lv_img_create(ui_pnlMain); lv_img_set_src(ui_Image1, &ui_img_lena80x80_png); @@ -77,6 +90,7 @@ void ui_scrMain_screen_init(void) lv_obj_add_flag(ui_Image1, LV_OBJ_FLAG_ADV_HITTEST); /// Flags lv_obj_clear_flag(ui_Image1, LV_OBJ_FLAG_SCROLLABLE); /// Flags + lv_obj_add_event_cb(ui_Rotate, ui_event_Rotate, LV_EVENT_ALL, NULL); lv_obj_add_event_cb(ui_btnCount, ui_event_btnCount, LV_EVENT_ALL, NULL); } diff --git a/src/ui/ui.c b/src/ui/ui.c index 7e87e2c..14f91df 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -17,6 +17,9 @@ lv_obj_t * ui_lblMilliseconds; lv_obj_t * ui_lblMillisecondsValue; lv_obj_t * ui_lblCdr; lv_obj_t * ui_lblCdrValue; +void ui_event_Rotate(lv_event_t * e); +lv_obj_t * ui_Rotate; +lv_obj_t * ui_Label1; void ui_event_btnCount(lv_event_t * e); lv_obj_t * ui_btnCount; lv_obj_t * ui_lblButton; @@ -37,12 +40,20 @@ const lv_img_dsc_t * ui_imgset_lenax[1] = {&ui_img_lena80x80_png}; ///////////////////// ANIMATIONS //////////////////// ///////////////////// FUNCTIONS //////////////////// +void ui_event_Rotate(lv_event_t * e) +{ + lv_event_code_t event_code = lv_event_get_code(e); + lv_obj_t * target = lv_event_get_target(e); + if(event_code == LV_EVENT_CLICKED) { + OnRotateClicked(e); + } +} void ui_event_btnCount(lv_event_t * e) { lv_event_code_t event_code = lv_event_get_code(e); lv_obj_t * target = lv_event_get_target(e); if(event_code == LV_EVENT_CLICKED) { - OnButtonClicked(e); + OnAddOneClicked(e); } } diff --git a/src/ui/ui.h b/src/ui/ui.h index 96fbb80..573393e 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -14,6 +14,7 @@ extern "C" { #include "ui_helpers.h" #include "ui_events.h" + // SCREEN: ui_scrMain void ui_scrMain_screen_init(void); extern lv_obj_t * ui_scrMain; @@ -22,6 +23,9 @@ extern lv_obj_t * ui_lblMilliseconds; extern lv_obj_t * ui_lblMillisecondsValue; extern lv_obj_t * ui_lblCdr; extern lv_obj_t * ui_lblCdrValue; +void ui_event_Rotate(lv_event_t * e); +extern lv_obj_t * ui_Rotate; +extern lv_obj_t * ui_Label1; void ui_event_btnCount(lv_event_t * e); extern lv_obj_t * ui_btnCount; extern lv_obj_t * ui_lblButton; @@ -30,7 +34,11 @@ extern lv_obj_t * ui_lblCountValue; extern lv_obj_t * ui_Image1; extern lv_obj_t * ui____initial_actions0; -LV_IMG_DECLARE(ui_img_lena80x80_png); // assets\Lena80x80.png + +LV_IMG_DECLARE(ui_img_lena80x80_png); // assets/Lena80x80.png + + + diff --git a/src/ui/ui_events.h b/src/ui/ui_events.h index 7e14753..e6e2c5a 100644 --- a/src/ui/ui_events.h +++ b/src/ui/ui_events.h @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -10,7 +10,8 @@ extern "C" { #endif -void OnButtonClicked(lv_event_t * e); +void OnRotateClicked(lv_event_t * e); +void OnAddOneClicked(lv_event_t * e); #ifdef __cplusplus } /*extern "C"*/ diff --git a/src/ui/ui_helpers.c b/src/ui/ui_helpers.c index 5d68254..c87f954 100644 --- a/src/ui/ui_helpers.c +++ b/src/ui/ui_helpers.c @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -19,6 +19,7 @@ void _ui_basic_set_property(lv_obj_t * target, int id, int val) if(id == _UI_BASIC_PROPERTY_HEIGHT) lv_obj_set_height(target, val); } + void _ui_dropdown_set_property(lv_obj_t * target, int id, int val) { if(id == _UI_DROPDOWN_PROPERTY_SELECTED) lv_dropdown_set_selected(target, val); @@ -34,6 +35,7 @@ void _ui_label_set_property(lv_obj_t * target, int id, const char * val) if(id == _UI_LABEL_PROPERTY_TEXT) lv_label_set_text(target, val); } + void _ui_roller_set_property(lv_obj_t * target, int id, int val) { if(id == _UI_ROLLER_PROPERTY_SELECTED_WITH_ANIM) lv_roller_set_selected(target, val, LV_ANIM_ON); @@ -46,6 +48,7 @@ void _ui_slider_set_property(lv_obj_t * target, int id, int val) if(id == _UI_SLIDER_PROPERTY_VALUE) lv_slider_set_value(target, val, LV_ANIM_OFF); } + void _ui_screen_change(lv_obj_t ** target, lv_scr_load_anim_t fademode, int spd, int delay, void (*target_init)(void)) { if(*target == NULL) @@ -105,11 +108,26 @@ void _ui_state_modify(lv_obj_t * target, int32_t state, int value) else lv_obj_clear_state(target, state); } + +void _ui_textarea_move_cursor(lv_obj_t * target, int val) + +{ + + if(val == UI_MOVE_CURSOR_UP) lv_textarea_cursor_up(target); + if(val == UI_MOVE_CURSOR_RIGHT) lv_textarea_cursor_right(target); + if(val == UI_MOVE_CURSOR_DOWN) lv_textarea_cursor_down(target); + if(val == UI_MOVE_CURSOR_LEFT) lv_textarea_cursor_left(target); + lv_obj_add_state(target, LV_STATE_FOCUSED); +} + void scr_unloaded_delete_cb(lv_event_t * e) + { + lv_obj_t ** var = lv_event_get_user_data(e); lv_obj_del(*var); (*var) = NULL; + } void _ui_opacity_set(lv_obj_t * target, int val) @@ -124,115 +142,178 @@ void _ui_anim_callback_free_user_data(lv_anim_t * a) } void _ui_anim_callback_set_x(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_obj_set_x(usr->target, v); + } + void _ui_anim_callback_set_y(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_obj_set_y(usr->target, v); + } + void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_obj_set_width(usr->target, v); + } + void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_obj_set_height(usr->target, v); + } + void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_obj_set_style_opa(usr->target, v, 0); + } + void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_img_set_zoom(usr->target, v); + } + void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; lv_img_set_angle(usr->target, v); + } + void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; usr->val = v; + if(v < 0) v = 0; if(v >= usr->imgset_size) v = usr->imgset_size - 1; lv_img_set_src(usr->target, usr->imgset[v]); } int32_t _ui_anim_callback_get_x(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_obj_get_x_aligned(usr->target); + } + int32_t _ui_anim_callback_get_y(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_obj_get_y_aligned(usr->target); + } + int32_t _ui_anim_callback_get_width(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_obj_get_width(usr->target); + } + int32_t _ui_anim_callback_get_height(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_obj_get_height(usr->target); + } + int32_t _ui_anim_callback_get_opacity(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_obj_get_style_opa(usr->target, 0); + } int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_img_get_zoom(usr->target); + } int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return lv_img_get_angle(usr->target); + } int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a) + { + ui_anim_user_data_t * usr = (ui_anim_user_data_t *)a->user_data; return usr->val; + } void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix) { char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE]; + lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_arc_get_value(src), postfix); + lv_label_set_text(trg, buf); } void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix) { char buf[_UI_TEMPORARY_STRING_BUFFER_SIZE]; + lv_snprintf(buf, sizeof(buf), "%s%d%s", prefix, (int)lv_slider_get_value(src), postfix); + lv_label_set_text(trg, buf); } void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt_on, const char * txt_off) @@ -241,11 +322,26 @@ void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt else lv_label_set_text(trg, txt_off); } + void _ui_spinbox_step(lv_obj_t * target, int val) + { + if(val > 0) lv_spinbox_increment(target); + else lv_spinbox_decrement(target); + lv_event_send(target, LV_EVENT_VALUE_CHANGED, 0); } +void _ui_switch_theme(int val) + +{ + +#ifdef UI_THEME_ACTIVE + ui_theme_set(val); +#endif +} + + diff --git a/src/ui/ui_helpers.h b/src/ui/ui_helpers.h index 7e6e7e1..abbe46f 100644 --- a/src/ui/ui_helpers.h +++ b/src/ui/ui_helpers.h @@ -1,5 +1,5 @@ // This file was generated by SquareLine Studio -// SquareLine Studio version: SquareLine Studio 1.3.4 +// SquareLine Studio version: SquareLine Studio 1.4.0 // LVGL version: 8.3.6 // Project name: SquareLine_Project @@ -62,6 +62,14 @@ void _ui_flag_modify(lv_obj_t * target, int32_t flag, int value); #define _UI_MODIFY_STATE_TOGGLE 2 void _ui_state_modify(lv_obj_t * target, int32_t state, int value); +#define UI_MOVE_CURSOR_UP 0 +#define UI_MOVE_CURSOR_RIGHT 1 +#define UI_MOVE_CURSOR_DOWN 2 +#define UI_MOVE_CURSOR_LEFT 3 +void _ui_textarea_move_cursor(lv_obj_t * target, int val) +; + + void scr_unloaded_delete_cb(lv_event_t * e); void _ui_opacity_set(lv_obj_t * target, int val); @@ -83,30 +91,41 @@ void _ui_anim_callback_set_width(lv_anim_t * a, int32_t v); void _ui_anim_callback_set_height(lv_anim_t * a, int32_t v); + void _ui_anim_callback_set_opacity(lv_anim_t * a, int32_t v); + void _ui_anim_callback_set_image_zoom(lv_anim_t * a, int32_t v); + void _ui_anim_callback_set_image_angle(lv_anim_t * a, int32_t v); + void _ui_anim_callback_set_image_frame(lv_anim_t * a, int32_t v); + int32_t _ui_anim_callback_get_x(lv_anim_t * a); int32_t _ui_anim_callback_get_y(lv_anim_t * a); int32_t _ui_anim_callback_get_width(lv_anim_t * a); + int32_t _ui_anim_callback_get_height(lv_anim_t * a); + int32_t _ui_anim_callback_get_opacity(lv_anim_t * a); + int32_t _ui_anim_callback_get_image_zoom(lv_anim_t * a); + int32_t _ui_anim_callback_get_image_angle(lv_anim_t * a); + int32_t _ui_anim_callback_get_image_frame(lv_anim_t * a); + void _ui_arc_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix); void _ui_slider_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * prefix, const char * postfix); @@ -116,6 +135,12 @@ void _ui_checked_set_text_value(lv_obj_t * trg, lv_obj_t * src, const char * txt void _ui_spinbox_step(lv_obj_t * target, int val) ; + +void _ui_switch_theme(int val) +; + + + #ifdef __cplusplus } /*extern "C"*/ #endif From 5754016093d53ac2159514ac91797febc4476cb1 Mon Sep 17 00:00:00 2001 From: Rene Zeldenthuis Date: Mon, 11 Mar 2024 01:21:55 +0100 Subject: [PATCH 2/2] Updated markdown --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f7da398..1e65b7a 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,9 @@ Example with sound! (if WiFi credentials are provided and speaker attached) ## Version history +- March 2024 + - Added rotate button + - Removed radio (and wifi dependencies) - December 2023 - Release 2.0.0 - Updated demo with sound