diff --git a/README.md b/README.md index 2ff754f9..f6d655d3 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki Issue Tracker: https://github.com/olikraus/u8g2/issues -Download (2.32.7): https://github.com/olikraus/U8g2_Arduino/archive/master.zip +Download (2.32.8): https://github.com/olikraus/U8g2_Arduino/archive/master.zip diff --git a/extras/ChangeLog b/extras/ChangeLog index 7ba0e979..31c4325a 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -273,7 +273,7 @@ https://github.com/olikraus/u8g2 ChangeLog * Added icons from https://app.streamlinehq.com/icons/pixel (issue 1589) 2021-09-20 v2.31.2 olikraus@gmail.com * Bugfix release for include error (issues 1592 and 1594) -2021-xx-xx v2.32.x olikraus@gmail.com +2022-xx-xx v2.32.x olikraus@gmail.com * SH1107 128x80 (issue 1598) * ST7920 256x32 (issue 1593) * Added support for UC1609 (issue 1565) diff --git a/keywords.txt b/keywords.txt index fae6f52f..34ab1209 100644 --- a/keywords.txt +++ b/keywords.txt @@ -125,6 +125,7 @@ u8g2_font_squeezed_r7_tr LITERAL1 u8g2_font_squeezed_r7_tn LITERAL1 u8g2_font_squeezed_b7_tr LITERAL1 u8g2_font_squeezed_b7_tn LITERAL1 +u8g2_font_percent_circle_25_hn LITERAL1 u8g2_font_freedoomr10_tu LITERAL1 u8g2_font_freedoomr10_mu LITERAL1 u8g2_font_freedoomr25_tn LITERAL1 @@ -323,6 +324,7 @@ u8x8_font_7x14B_1x2_f LITERAL1 u8x8_font_7x14B_1x2_r LITERAL1 u8x8_font_7x14B_1x2_n LITERAL1 u8g2_font_siji_t_6x10 LITERAL1 +u8g2_font_waffle_t_all LITERAL1 u8g2_font_tom_thumb_4x6_t_all LITERAL1 u8g2_font_tom_thumb_4x6_tf LITERAL1 u8g2_font_tom_thumb_4x6_tr LITERAL1 diff --git a/library.properties b/library.properties index 6f5b5930..069aeedc 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=U8g2 -version=2.32.7 +version=2.32.8 author=oliver maintainer=oliver sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1320, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1638, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, HD44102, T7932, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel. diff --git a/src/MUIU8g2.h b/src/MUIU8g2.h index 9849cd5e..462422e4 100644 --- a/src/MUIU8g2.h +++ b/src/MUIU8g2.h @@ -59,9 +59,13 @@ class MUIU8G2 mui_t *getMUI(void) { return &mui; } uint8_t getCurrentCursorFocusPosition(void) { return mui_GetCurrentCursorFocusPosition(&mui); } + + int getCurrentFormId(void) { return mui_GetCurrentFormId(&mui); } + + void draw(void) { mui_Draw(&mui); } - void getSelectableFieldTextOption(uint8_t form_id, uint8_t cursor_position, uint8_t nth_token) - { mui_GetSelectableFieldTextOption(&mui, form_id, cursor_position, nth_token); } + //void getSelectableFieldTextOption(fds_t *fds, uint8_t nth_token) + // { mui_GetSelectableFieldTextOption(&mui, fds, nth_token); } void enterForm(fds_t *fds, uint8_t initial_cursor_position) { mui_EnterForm(&mui, fds, initial_cursor_position); } void leaveForm(void) { mui_LeaveForm(&mui); } uint8_t gotoForm(uint8_t form_id, uint8_t initial_cursor_position) { return mui_GotoForm(&mui, form_id, initial_cursor_position); } diff --git a/src/U8g2lib.cpp b/src/U8g2lib.cpp index e50e9b82..4f3c3121 100644 --- a/src/U8g2lib.cpp +++ b/src/U8g2lib.cpp @@ -39,14 +39,12 @@ #include "U8g2lib.h" +#ifdef ARDUINO static Print *u8g2_print_for_screenshot; - void u8g2_print_callback(const char *s) { -#ifdef ARDUINO yield(); -#endif u8g2_print_for_screenshot->print(s); } @@ -73,6 +71,6 @@ void U8G2::writeBufferXBM2(Print &p) u8g2_print_for_screenshot = &p; u8g2_WriteBufferXBM2(getU8g2(), u8g2_print_callback); } - +#endif diff --git a/src/U8g2lib.h b/src/U8g2lib.h index 640b659e..eedd01f2 100644 --- a/src/U8g2lib.h +++ b/src/U8g2lib.h @@ -45,13 +45,19 @@ #ifndef U8G2LIB_HH #define U8G2LIB_HH +#ifdef ARDUINO #include #include +#endif + #include "U8x8lib.h" #include "clib/u8g2.h" -class U8G2 : public Print +class U8G2 +#ifdef ARDUINO +: public Print +#endif { protected: u8g2_t u8g2; @@ -294,6 +300,7 @@ u8g2_uint_t u8g2_GetUTF8Width(u8g2_t *u8g2, const char *str); // not required any more, enable UTF8 for print //void printUTF8(const char *s) { tx += u8g2_DrawUTF8(&u8g2, tx, ty, s); } +#ifdef ARDUINO /* screenshot functions for full buffer mode */ /* vertical top lsb memory architecture */ void writeBufferPBM(Print &p); @@ -302,6 +309,7 @@ u8g2_uint_t u8g2_GetUTF8Width(u8g2_t *u8g2, const char *str); /* SH1122, LD7032, ST7920, ST7986, LC7981, T6963, SED1330, RA8835, MAX7219, LS0 */ void writeBufferPBM2(Print &p); void writeBufferXBM2(Print &p); +#endif /* virtual function for print base class */ size_t write(uint8_t v) { @@ -390,7 +398,10 @@ uint8_t u8g2_UserInterfaceInputValue(u8g2_t *u8g2, const char *title, const char void u8g2_print_callback(const char *s); /* U8g2lib.cpp */ -class U8G2LOG : public Print +class U8G2LOG +#ifdef ARDUINO +: public Print +#endif { public: diff --git a/src/U8x8lib.h b/src/U8x8lib.h index 515dd52e..90eb3632 100644 --- a/src/U8x8lib.h +++ b/src/U8x8lib.h @@ -39,8 +39,10 @@ #ifndef U8X8LIB_HH #define U8X8LIB_HH +#ifdef ARDUINO #include #include +#endif #include "clib/u8x8.h" @@ -166,7 +168,10 @@ void u8x8_SetPin_SED1520(u8x8_t *u8x8, uint8_t d0, uint8_t d1, uint8_t d2, uint8 //void u8x8_Setup_8Bit_6800(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset); //void u8x8_Setup_8Bit_8080(u8x8_t *u8x8, u8x8_msg_cb display_cb, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t wr, uint8_t cs, uint8_t dc, uint8_t reset); -class U8X8 : public Print +class U8X8 +#ifdef ARDUINO +: public Print +#endif { protected: u8x8_t u8x8; @@ -336,7 +341,10 @@ class U8X8 : public Print }; -class U8X8LOG : public Print +class U8X8LOG +#ifdef ARDUINO +: public Print +#endif { public: diff --git a/src/clib/mui.c b/src/clib/mui.c index 2d3ef0b6..c777a651 100644 --- a/src/clib/mui.c +++ b/src/clib/mui.c @@ -104,6 +104,7 @@ static size_t mui_fds_get_cmd_size_without_text(fds_t *s) case 'U': return 2; // User Form: CMD (1 Byte), Form-Id (1 Byte) case 'S': return 2; // Style: CMD (1 Byte), Style Id (1 Byte) case 'D': return 3; // Data within Text: CMD (1 Byte), ID (2 Bytes), Text (does not count here) + case 'Z': return 3; // Zero field without x, y, arg & text: CMD (1 Byte), ID (2 Bytes) case 'F': return 5; // Field without arg & text: CMD (1 Byte), ID (2 Bytes), X, Y case 'B': return 5; // Field with text: CMD (1 Byte), ID (2 Bytes), X, Y, Text (does not count here) case 'T': return 6; // Field with arg & text: CMD (1 Byte), ID (2 Bytes), X, Y, Arg, Text (does not count here) @@ -187,7 +188,9 @@ uint8_t mui_fds_first_token(mui_t *ui) return mui_fds_next_token(ui); } - +/* + The inner token delimiter "|" is fixed. It must be the pipe symbol. +*/ uint8_t mui_fds_next_token(mui_t *ui) { uint8_t c; @@ -223,7 +226,7 @@ uint8_t mui_fds_next_token(mui_t *ui) } /* - find nth token, return 0 if n exceeds the number of tokens, 1 otherwise + find nth token ('|' delimiter), return 0 if n exceeds the number of tokens, 1 otherwise the result is stored in ui->text */ uint8_t mui_fds_get_nth_token(mui_t *ui, uint8_t n) @@ -259,7 +262,7 @@ uint8_t mui_fds_get_token_cnt(mui_t *ui) } -#define mui_fds_is_text(c) ( (c) == 'U' || (c) == 'S' || (c) == 'F' || (c) == 'A' ? 0 : 1 ) +#define mui_fds_is_text(c) ( (c) == 'U' || (c) == 'S' || (c) == 'F' || (c) == 'A' || (c) == 'Z' ? 0 : 1 ) /* s must point to a valid command within FDS @@ -370,7 +373,7 @@ static uint8_t mui_prepare_current_field(mui_t *ui) ui->arg = mui_get_fds_char(ui->fds+5); } } - else if ( ui->cmd == 'D' ) + else if ( ui->cmd == 'D' || ui->cmd == 'Z' ) { ui->id0 = mui_get_fds_char(ui->fds+1); ui->id1 = mui_get_fds_char(ui->fds+2); @@ -618,11 +621,17 @@ static uint8_t mui_send_cursor_msg(mui_t *ui, uint8_t msg) If the first selectable field has the focus, then 0 will be returned Unselectable fields (for example labels) are skipped by this count. If no fields are selectable, then 0 is returned + + The return value can be used as last argument for mui_EnterForm or mui_GotoForm + + WARNING: This function will destroy current fds and field information. */ uint8_t mui_GetCurrentCursorFocusPosition(mui_t *ui) { - ui->tmp8 = 0; + //fds_t *fds = ui->fds; + ui->tmp8 = 0; mui_loop_over_form(ui, mui_task_get_current_cursor_focus_position); + //ui->fds = fds; return ui->tmp8; } @@ -653,7 +662,7 @@ void mui_next_field(mui_t *ui) /* OBSOLETE */ #ifdef OBSOLETE void mui_GetSelectableFieldTextOptionByCursorPosition(mui_t *ui, uint8_t form_id, uint8_t cursor_position, uint8_t nth_token) -{ + fds_t *fds = ui->fds; // backup the current fds, so that this function can be called inside a task loop int len = ui->len; // backup length of the current command @@ -675,6 +684,16 @@ void mui_GetSelectableFieldTextOptionByCursorPosition(mui_t *ui, uint8_t form_id } #endif +/* + this function will overwrite the ui field related member variables + nth_token can be 0 if the fiel text is not a option list + the result is stored in ui->text + + token delimiter is '|' (pipe symbol) + + fds: The start of a field (MUI_DATA) + nth_token: The position of the token, which should be returned +*/ uint8_t mui_GetSelectableFieldTextOption(mui_t *ui, fds_t *fds, uint8_t nth_token) { fds_t *fds_backup = ui->fds; // backup the current fds, so that this function can be called inside a task loop @@ -770,7 +789,7 @@ void mui_EnterForm(mui_t *ui, fds_t *fds, uint8_t initial_cursor_position) ui->current_form_fds = fds; /* inform all fields that we start a new form */ - MUI_DEBUG("mui_EnterForm: form_start\n"); + MUI_DEBUG("mui_EnterForm: form_start, initial_cursor_position=%d\n", initial_cursor_position); mui_loop_over_form(ui, mui_task_form_start); /* assign initional cursor focus */ @@ -841,6 +860,50 @@ void mui_RestoreForm(mui_t *ui) mui_GotoForm(ui, ui->last_form_id, ui->last_form_cursor_focus_position); } +/* + Save a cursor position for mui_GotoFormAutoCursorPosition command + Only one such position is stored. +*/ +void mui_SaveCursorPosition(mui_t *ui, uint8_t cursor_position) +{ + uint8_t form_id = mui_get_fds_char(ui->current_form_fds+1); + MUI_DEBUG("mui_SaveCursorPosition form_id=%d cursor_position=%d\n", form_id, cursor_position); + + if ( form_id == ui->menu_form_id[0] ) + ui->menu_form_last_added = 0; + else if ( form_id == ui->menu_form_id[1] ) + ui->menu_form_last_added = 1; + else + ui->menu_form_last_added ^= 1; + ui->menu_form_id[ui->menu_form_last_added] = form_id; + ui->menu_form_cursor_focus_position[ui->menu_form_last_added] = cursor_position; + MUI_DEBUG("mui_SaveCursorPosition ui->menu_form_last_added=%d \n", ui->menu_form_last_added); +} + +/* + Similar to mui_GotoForm, but will jump to previously stored cursor location (mui_SaveCursorPosition) or 0 if the cursor position was not saved. +*/ +uint8_t mui_GotoFormAutoCursorPosition(mui_t *ui, uint8_t form_id) +{ + uint8_t cursor_position = 0; + if ( form_id == ui->menu_form_id[0] ) + cursor_position = ui->menu_form_cursor_focus_position[0]; + if ( form_id == ui->menu_form_id[1] ) + cursor_position = ui->menu_form_cursor_focus_position[1]; + MUI_DEBUG("mui_GotoFormAutoCursorPosition form_id=%d cursor_position=%d\n", form_id, cursor_position); + return mui_GotoForm(ui, form_id, cursor_position); +} + +/* + return current form id or -1 if the menu system is inactive +*/ +int mui_GetCurrentFormId(mui_t *ui) +{ + if ( mui_IsFormActive(ui) == 0 ) + return -1; + return mui_get_fds_char(ui->current_form_fds+1); +} + /* updates "ui->cursor_focus_fds" */ diff --git a/src/clib/mui.h b/src/clib/mui.h index f7b1bb5e..50122699 100644 --- a/src/clib/mui.h +++ b/src/clib/mui.h @@ -32,6 +32,42 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + MUIF (Monochrome User Interface Functions) + n: A number 0 to 9 without any quotes, e.g.: 5 + id: Exactly two characters or numbers in doubl quotes, e.g. "G5". + cb: A callback function with the following prototype: "uint8_t muif_cb(mui_t *ui, uint8_t msg)" + There are MANY predefined callback functions, see separate list + var: Address of a variable. + text: Normal text, but special characters might be required for some callback functions, for + example the text might contain a list of selectable elements separated with the '|' symbol. + + MUIF_STYLE(n,cb) + Corresponding FDS command: MUI_STYLE(n) + Change the style of any other elements after MUI_STYLE(n), does not draw anything + + MUIF_RO(id,cb) + Corresponding FDS command: MUI_DATA(id, text) MUI_XY(id, x, y), MUI_XYT(id, x,y,text), MUI_XYA(id, x,y,a), MUI_XYAT(id, x,y,a,text) + Places a read only element on the form. + The correct FDS command depends on the callback function. + + MUIF_LABEL(cb) + Corresponding FDS command: MUI_LABEL(x,y,text) + Places a text at the specified position, similar to MUIF_RO + + MUIF_GOTO(cb) + Corresponding FDS command: MUI_GOTO(x,y,n,text) + Places a button at the specified position, similar to MUIF_BUTTON, but does not require an ID. + + MUIF_BUTTON(id,cb) + Corresponding FDS command: MUI_XY(id, x, y), MUI_XYT(id, x,y,text), MUI_XYA(id, x,y,a), MUI_XYAT(id, x,y,a,text) + Places a selectable element on the form. + + MUIF_VARIABLE(id,var,cb) + Corresponding FDS command: MUI_XY(id, x, y), MUI_XYA(id, x,y,a) + Places a user input element at the specified location. + The correct FDS command depends on the callback function. + */ @@ -174,6 +210,8 @@ struct muif_struct /* must be smaller than or equal to 255 */ #define MUI_MAX_TEXT_LEN 41 +#define MUI_MENU_CACHE_CNT 2 + struct mui_struct { void *graphics_data; @@ -222,6 +260,11 @@ struct mui_struct uint8_t last_form_id; uint8_t last_form_cursor_focus_position; fds_t *last_form_fds; // not used by mui_RestoreForm, but can be used by field functions + + /* menu cursor position backup */ + uint8_t menu_form_id[MUI_MENU_CACHE_CNT]; + uint8_t menu_form_cursor_focus_position[MUI_MENU_CACHE_CNT]; + uint8_t menu_form_last_added; } ; #define mui_IsCursorFocus(mui) ((mui)->dflags & MUIF_DFLAG_IS_CURSOR_FOCUS) @@ -495,6 +538,8 @@ struct mui_struct /* style: one id only */ #define MUI_STYLE(n) "S" #n +#define MUI_AUX(id) "Z" id + #define MUI_DATA(id, text) "D" id "\xff" text "\xff" #define MUI_XY(id, x, y) "F" id MUI_##x MUI_##y @@ -525,8 +570,12 @@ uint8_t mui_GetSelectableFieldOptionCnt(mui_t *ui, fds_t *fds); void mui_EnterForm(mui_t *ui, fds_t *fds, uint8_t initial_cursor_position); void mui_LeaveForm(mui_t *ui); uint8_t mui_GotoForm(mui_t *ui, uint8_t form_id, uint8_t initial_cursor_position); -void mui_SaveForm(mui_t *ui); -void mui_RestoreForm(mui_t *ui); +void mui_SaveForm(mui_t *ui); /* Save current form+cursor position. Used together with mui_RestoreForm */ +void mui_RestoreForm(mui_t *ui); /* Restore form and cursor position, previously saved with mui_SaveForm */ +void mui_SaveCursorPosition(mui_t *ui, uint8_t cursor_position); /* stores a cursor position for use with mui_GotoFormAutoCursorPosition */ +uint8_t mui_GotoFormAutoCursorPosition(mui_t *ui, uint8_t form_id); + +int mui_GetCurrentFormId(mui_t *ui); /* form id or -1 if the menu system is inactive */ void mui_NextField(mui_t *ui); void mui_PrevField(mui_t *ui); void mui_SendSelect(mui_t *ui); diff --git a/src/clib/mui_u8g2.c b/src/clib/mui_u8g2.c index 16622a75..057eb720 100644 --- a/src/clib/mui_u8g2.c +++ b/src/clib/mui_u8g2.c @@ -64,12 +64,12 @@ mud up/down: select will enter the up/down edit mode. Next/prev event will increment/decrement the value styles (not for draw text/str) - unselected selected up/down edit - plain invers invers + gap + frame pi - frame invers+frame frame fi + unselected selected up/down edit postfix Use for + plain invers invers + gap + frame pi input elements + frame invers+frame frame fi buttons - plain frame invers + frame pf - invers frame invers + frame if + plain frame invers + frame pf input elements + invers frame invers + frame if buttons mui_u8g2_[action]_[field_width]_[edit_mode]_[style] @@ -242,6 +242,34 @@ void mui_u8g2_draw_button_pf(mui_t *ui, u8g2_uint_t width, u8g2_uint_t padding_h } +u8g2_uint_t mui_u8g2_get_if_flags(mui_t *ui) +{ + u8g2_uint_t flags = 0; + if ( mui_IsCursorFocus(ui) ) + { + if ( ui->is_mud ) + { + flags |= 1; + flags |= U8G2_BTN_INV; + } + else + { + flags |= 1; + } + } + else + { + flags |= U8G2_BTN_INV; + } + return flags; +} + +void mui_u8g2_draw_button_if(mui_t *ui, u8g2_uint_t width, u8g2_uint_t padding_h, const char *text) +{ + mui_u8g2_draw_button_utf(ui, mui_u8g2_get_if_flags(ui), width, padding_h , MUI_U8G2_V_PADDING, text); +} + + static uint8_t mui_u8g2_handle_scroll_next_prev_events(mui_t *ui, uint8_t msg) MUI_NOINLINE; static uint8_t mui_u8g2_handle_scroll_next_prev_events(mui_t *ui, uint8_t msg) { @@ -290,6 +318,25 @@ static uint8_t mui_u8g2_handle_scroll_next_prev_events(mui_t *ui, uint8_t msg) } return 0; } + +/*=========================================================================*/ +/* simplified style function */ + +/* +Used for MUIF_U8G2_FONT_STYLE(n,font) +*/ + +uint8_t mui_u8g2_set_font_style_function(mui_t *ui, uint8_t msg) +{ + if ( msg == MUIF_MSG_DRAW ) + { + u8g2_SetFont(mui_get_U8g2(ui), (uint8_t *)muif_get_data(ui->uif)); + } + return 0; +} + + + /*=========================================================================*/ /* field functions */ @@ -362,7 +409,8 @@ uint8_t mui_u8g2_btn_goto_wm_fi(mui_t *ui, uint8_t msg) case MUIF_MSG_CURSOR_ENTER: break; case MUIF_MSG_CURSOR_SELECT: - return mui_GotoForm(ui, ui->arg, 0); + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); case MUIF_MSG_CURSOR_LEAVE: break; case MUIF_MSG_TOUCH_DOWN: @@ -374,6 +422,33 @@ uint8_t mui_u8g2_btn_goto_wm_fi(mui_t *ui, uint8_t msg) return 0; } +uint8_t mui_u8g2_btn_goto_wm_if(mui_t *ui, uint8_t msg) +{ + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_draw_button_utf(ui, U8G2_BTN_HCENTER |mui_u8g2_get_if_flags(ui), 0, 1, MUI_U8G2_V_PADDING, ui->text); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + + } + return 0; +} + uint8_t mui_u8g2_btn_goto_w2_fi(mui_t *ui, uint8_t msg) { u8g2_t *u8g2 = mui_get_U8g2(ui); @@ -389,7 +464,35 @@ uint8_t mui_u8g2_btn_goto_w2_fi(mui_t *ui, uint8_t msg) case MUIF_MSG_CURSOR_ENTER: break; case MUIF_MSG_CURSOR_SELECT: - return mui_GotoForm(ui, ui->arg, 0); + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + } + return 0; +} + +uint8_t mui_u8g2_btn_goto_w2_if(mui_t *ui, uint8_t msg) +{ + u8g2_t *u8g2 = mui_get_U8g2(ui); + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_draw_button_utf(ui, U8G2_BTN_HCENTER | mui_u8g2_get_if_flags(ui), u8g2_GetDisplayWidth(u8g2)/2 - 10, 0, MUI_U8G2_V_PADDING, ui->text); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); case MUIF_MSG_CURSOR_LEAVE: break; case MUIF_MSG_TOUCH_DOWN: @@ -407,7 +510,7 @@ uint8_t mui_u8g2_btn_goto_w2_fi(mui_t *ui, uint8_t msg) Description: A button with size equal to button text plus one pixel padding The button has a one pixel frame around the text. - If the selected, then the menu system will be closed. + If selected, then the menu system will be closed. The arg value will be stored at the specified data location (if not NULL). The arg value can be used as an exit value of the button. @@ -475,7 +578,8 @@ uint8_t mui_u8g2_btn_goto_w1_pi(mui_t *ui, uint8_t msg) case MUIF_MSG_CURSOR_ENTER: break; case MUIF_MSG_CURSOR_SELECT: - return mui_GotoForm(ui, ui->arg, 0); + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); case MUIF_MSG_CURSOR_LEAVE: break; case MUIF_MSG_TOUCH_DOWN: @@ -503,7 +607,8 @@ uint8_t mui_u8g2_btn_goto_w1_fi(mui_t *ui, uint8_t msg) case MUIF_MSG_CURSOR_ENTER: break; case MUIF_MSG_CURSOR_SELECT: - return mui_GotoForm(ui, ui->arg, 0); + //return mui_GotoForm(ui, ui->arg, 0); + return mui_GotoFormAutoCursorPosition(ui, ui->arg); case MUIF_MSG_CURSOR_LEAVE: break; case MUIF_MSG_TOUCH_DOWN: @@ -516,13 +621,13 @@ uint8_t mui_u8g2_btn_goto_w1_fi(mui_t *ui, uint8_t msg) /*===============================================================================*/ - static void mui_u8g2_u8_vmm_draw_wm_pi(mui_t *ui) MUI_NOINLINE; static void mui_u8g2_u8_vmm_draw_wm_pi(mui_t *ui) { u8g2_t *u8g2 = mui_get_U8g2(ui); mui_u8g2_u8_min_max_t *vmm= (mui_u8g2_u8_min_max_t *)muif_get_data(ui->uif); - char *s = "999"; + char buf[4] = "999"; + char *s = buf; uint8_t *value = mui_u8g2_u8mm_get_valptr(vmm); uint8_t min = mui_u8g2_u8mm_get_min(vmm); uint8_t max = mui_u8g2_u8mm_get_max(vmm); @@ -635,7 +740,8 @@ static void mui_u8g2_u8_vmm_draw_wm_pf(mui_t *ui) { u8g2_t *u8g2 = mui_get_U8g2(ui); mui_u8g2_u8_min_max_t *vmm= (mui_u8g2_u8_min_max_t *)muif_get_data(ui->uif); - char *s = "999"; + char buf[4] = "999"; + char *s = buf; uint8_t *value = mui_u8g2_u8mm_get_valptr(vmm); uint8_t min = mui_u8g2_u8mm_get_min(vmm); uint8_t max = mui_u8g2_u8mm_get_max(vmm); @@ -742,6 +848,234 @@ uint8_t mui_u8g2_u8_min_max_wm_mud_pf(mui_t *ui, uint8_t msg) } +/*===============================================================================*/ + +static void mui_u8g2_u8_bar_draw_wm(mui_t *ui, uint8_t flags) MUI_NOINLINE; +static void mui_u8g2_u8_bar_draw_wm(mui_t *ui, uint8_t flags) +{ + u8g2_t *u8g2 = mui_get_U8g2(ui); + mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); + char buf[4] = "999"; + char *s = buf; + uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); + uint8_t min = mui_u8g2_u8mms_get_min(vmms); + uint8_t max = mui_u8g2_u8mms_get_max(vmms); + uint8_t scale = 0; + //uint8_t step = mui_u8g2_u8mms_get_step(vmms); + uint8_t mms_flags = mui_u8g2_u8mms_get_flags(vmms); + uint8_t cnt = 3; + uint8_t height = u8g2_GetAscent(u8g2); + int8_t backup_descent; + u8g2_uint_t x = mui_get_x(ui); + u8g2_uint_t w = 0; + + if ( mms_flags & MUI_MMS_2X_BAR ) + scale |= 1; + if ( mms_flags & MUI_MMS_4X_BAR ) + scale |= 2; + + if ( *value > max ) + *value = max; + if ( *value <= min ) + *value = min; + if ( max < 100 ) + { + s++; + cnt--; + } + if ( max < 10 ) + { + s++; + cnt--; + } + //mui_u8g2_draw_button_utf(ui, mui_u8g2_get_pi_flags(ui), u8g2_GetStrWidth(u8g2, s)+1, 1, MUI_U8G2_V_PADDING, u8x8_u8toa(*value, cnt)); + //mui_u8g2_draw_button_pi(ui, u8g2_GetStrWidth(u8g2, s)+1, 1, u8x8_u8toa(*value, cnt)); + + w += (max<font_ref_descent; + u8g2->font_ref_descent = 0; /* hmm... that's a low level hack so that DrawButtonFrame ignores the descent value of the font */ + u8g2_DrawButtonFrame(u8g2, x, mui_get_y(ui), flags, w, 1, 1); + u8g2->font_ref_descent = backup_descent; + +} + + +uint8_t mui_u8g2_u8_bar_wm_mse_pi(mui_t *ui, uint8_t msg) +{ + mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); + uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); + uint8_t min = mui_u8g2_u8mms_get_min(vmms); + uint8_t max = mui_u8g2_u8mms_get_max(vmms); + uint8_t step = mui_u8g2_u8mms_get_step(vmms); + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_u8_bar_draw_wm(ui, mui_u8g2_get_pi_flags(ui)); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + (*value)+=step; + if ( *value > max ) *value = min; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + } + return 0; +} + + +uint8_t mui_u8g2_u8_bar_wm_mud_pi(mui_t *ui, uint8_t msg) +{ + mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); + uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); + uint8_t min = mui_u8g2_u8mms_get_min(vmms); + uint8_t max = mui_u8g2_u8mms_get_max(vmms); + uint8_t step = mui_u8g2_u8mms_get_step(vmms); + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_u8_bar_draw_wm(ui, mui_u8g2_get_pi_flags(ui)); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + /* toggle between normal mode and capture next/prev mode */ + ui->is_mud = !ui->is_mud; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + case MUIF_MSG_EVENT_NEXT: + if ( ui->is_mud ) + { + (*value)+=step; + if ( *value > max ) + *value = min; + return 1; + } + break; + case MUIF_MSG_EVENT_PREV: + if ( ui->is_mud ) + { + if ( *value <= min || *value > max) + *value = max; + else + (*value)-=step; + return 1; + } + break; + } + return 0; +} + +uint8_t mui_u8g2_u8_bar_wm_mse_pf(mui_t *ui, uint8_t msg) +{ + mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); + uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); + uint8_t min = mui_u8g2_u8mms_get_min(vmms); + uint8_t max = mui_u8g2_u8mms_get_max(vmms); + uint8_t step = mui_u8g2_u8mms_get_step(vmms); + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_u8_bar_draw_wm(ui, mui_u8g2_get_pf_flags(ui)); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + (*value)+=step; + if ( *value > max ) *value = min; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + } + return 0; +} + +uint8_t mui_u8g2_u8_bar_wm_mud_pf(mui_t *ui, uint8_t msg) +{ + mui_u8g2_u8_min_max_step_t *vmms= (mui_u8g2_u8_min_max_step_t *)muif_get_data(ui->uif); + uint8_t *value = mui_u8g2_u8mms_get_valptr(vmms); + uint8_t min = mui_u8g2_u8mms_get_min(vmms); + uint8_t max = mui_u8g2_u8mms_get_max(vmms); + uint8_t step = mui_u8g2_u8mms_get_step(vmms); + switch(msg) + { + case MUIF_MSG_DRAW: + mui_u8g2_u8_bar_draw_wm(ui, mui_u8g2_get_pf_flags(ui)); + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + /* toggle between normal mode and capture next/prev mode */ + ui->is_mud = !ui->is_mud; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + case MUIF_MSG_EVENT_NEXT: + if ( ui->is_mud ) + { + (*value)+=step; + if ( *value > max ) + *value = min; + return 1; + } + break; + case MUIF_MSG_EVENT_PREV: + if ( ui->is_mud ) + { + if ( *value <= min || *value > max) + *value = max; + else + (*value)-=step; + return 1; + } + break; + } + return 0; +} + /*===============================================================================*/ static uint8_t mui_is_valid_char(uint8_t c) MUI_NOINLINE; @@ -882,7 +1216,43 @@ uint8_t mui_u8g2_u8_opt_line_wa_mse_pi(mui_t *ui, uint8_t msg) } return 0; } - + +uint8_t mui_u8g2_u8_opt_line_wa_mse_pf(mui_t *ui, uint8_t msg) +{ + //u8g2_t *u8g2 = mui_get_U8g2(ui); + uint8_t *value = (uint8_t *)muif_get_data(ui->uif); + switch(msg) + { + case MUIF_MSG_DRAW: + if ( mui_fds_get_nth_token(ui, *value) == 0 ) + { + *value = 0; + mui_fds_get_nth_token(ui, *value); + } + mui_u8g2_draw_button_pf(ui, ui->arg, 1, ui->text); + + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + (*value)++; + if ( mui_fds_get_nth_token(ui, *value) == 0 ) + *value = 0; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + } + return 0; +} + uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg) { //u8g2_t *u8g2 = mui_get_U8g2(ui); @@ -896,8 +1266,6 @@ uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg) mui_fds_get_nth_token(ui, *value); } mui_u8g2_draw_button_pi(ui, ui->arg, 1, ui->text); - //mui_u8g2_draw_button_utf(ui, mui_u8g2_get_pi_flags(ui), ui->arg, 1, MUI_U8G2_V_PADDING, ui->text); - //u8g2_DrawButtonUTF8(u8g2, mui_get_x(ui), mui_get_y(ui), mui_u8g2_get_pi_flags(ui), ui->arg, 1, MUI_U8G2_V_PADDING, ui->text); break; case MUIF_MSG_FORM_START: @@ -938,6 +1306,58 @@ uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg) return 0; } +uint8_t mui_u8g2_u8_opt_line_wa_mud_pf(mui_t *ui, uint8_t msg) +{ + //u8g2_t *u8g2 = mui_get_U8g2(ui); + uint8_t *value = (uint8_t *)muif_get_data(ui->uif); + switch(msg) + { + case MUIF_MSG_DRAW: + if ( mui_fds_get_nth_token(ui, *value) == 0 ) + { + *value = 0; + mui_fds_get_nth_token(ui, *value); + } + mui_u8g2_draw_button_pf(ui, ui->arg, 1, ui->text); + + break; + case MUIF_MSG_FORM_START: + break; + case MUIF_MSG_FORM_END: + break; + case MUIF_MSG_CURSOR_ENTER: + break; + case MUIF_MSG_CURSOR_SELECT: + /* toggle between normal mode and capture next/prev mode */ + ui->is_mud = !ui->is_mud; + break; + case MUIF_MSG_CURSOR_LEAVE: + break; + case MUIF_MSG_TOUCH_DOWN: + break; + case MUIF_MSG_TOUCH_UP: + break; + case MUIF_MSG_EVENT_NEXT: + if ( ui->is_mud ) + { + (*value)++; + if ( mui_fds_get_nth_token(ui, *value) == 0 ) + *value = 0; + return 1; + } + break; + case MUIF_MSG_EVENT_PREV: + if ( ui->is_mud ) + { + if ( *value == 0 ) + *value = mui_fds_get_token_cnt(ui); + (*value)--; + return 1; + } + break; + } + return 0; +} @@ -1283,8 +1703,16 @@ uint8_t mui_u8g2_u8_opt_child_wm_mse_pi(mui_t *ui, uint8_t msg) an invisible field (which will not show anything). It should also not be selectable it just provides the menu entries, see "mui_u8g2_u8_opt_child_mse_common" and friends as a consequence it does not have width, input mode and style + + MUIF: MUIF_RO() + FDS: MUI_DATA() + + mui_u8g2_goto_parent --> mui_u8g2_goto_data + + Used together with mui_u8g2_goto_form_w1_mse_pi + */ -uint8_t mui_u8g2_goto_parent(mui_t *ui, uint8_t msg) +uint8_t mui_u8g2_goto_data(mui_t *ui, uint8_t msg) { switch(msg) { @@ -1312,8 +1740,10 @@ uint8_t mui_u8g2_goto_parent(mui_t *ui, uint8_t msg) } - -uint8_t mui_u8g2_goto_child_w1_mse_pi(mui_t *ui, uint8_t msg) +/* +mui_u8g2_goto_child_w1_mse_pi --> mui_u8g2_goto_form_w1_mse_pi +*/ +uint8_t mui_u8g2_goto_form_w1_mse_pi(mui_t *ui, uint8_t msg) { u8g2_t *u8g2 = mui_get_U8g2(ui); uint8_t arg = ui->arg; // remember the arg value, because it might be overwritten @@ -1325,7 +1755,33 @@ uint8_t mui_u8g2_goto_child_w1_mse_pi(mui_t *ui, uint8_t msg) break; case MUIF_MSG_CURSOR_SELECT: if ( mui_GetSelectableFieldTextOption(ui, ui->last_form_fds, ui->arg + ui->form_scroll_top) ) - return mui_GotoForm(ui, (uint8_t)ui->text[0], 0); + { + mui_SaveCursorPosition(ui, ui->arg + ui->form_scroll_top); // store the current cursor position, so that the user can jump back to the corresponding cursor position + return mui_GotoFormAutoCursorPosition(ui, (uint8_t)ui->text[0]); + } + break; + default: + return mui_u8g2_u8_opt_child_mse_common(ui, msg); + } + return 0; +} + +uint8_t mui_u8g2_goto_form_w1_mse_pf(mui_t *ui, uint8_t msg) +{ + u8g2_t *u8g2 = mui_get_U8g2(ui); + uint8_t arg = ui->arg; // remember the arg value, because it might be overwritten + switch(msg) + { + case MUIF_MSG_DRAW: + if ( mui_GetSelectableFieldTextOption(ui, ui->last_form_fds, arg + ui->form_scroll_top) ) + mui_u8g2_draw_button_pf(ui, u8g2_GetDisplayWidth(u8g2)-mui_get_x(ui)*2, mui_get_x(ui)-1, ui->text+1); + break; + case MUIF_MSG_CURSOR_SELECT: + if ( mui_GetSelectableFieldTextOption(ui, ui->last_form_fds, ui->arg + ui->form_scroll_top) ) + { + mui_SaveCursorPosition(ui, ui->arg + ui->form_scroll_top); // store the current cursor position, so that the user can jump back to the corresponding cursor position + return mui_GotoFormAutoCursorPosition(ui, (uint8_t)ui->text[0]); + } break; default: return mui_u8g2_u8_opt_child_mse_common(ui, msg); @@ -1572,7 +2028,8 @@ uint8_t mui_u8g2_u16_list_goto_w1_mse_pi(mui_t *ui, uint8_t msg) case MUIF_MSG_CURSOR_SELECT: if ( selection != NULL ) *selection = pos; - mui_GotoForm(ui, (uint8_t)element_cb(data, pos)[0], 0); + mui_SaveCursorPosition(ui, pos >= 255 ? 0 : pos); // store the current cursor position, so that the user can jump back to the corresponding cursor position + mui_GotoFormAutoCursorPosition(ui, (uint8_t)element_cb(data, pos)[0]); break; default: return mui_u8g2_u16_list_child_mse_common(ui, msg); diff --git a/src/clib/mui_u8g2.h b/src/clib/mui_u8g2.h index 91e2931b..47a1c3a7 100644 --- a/src/clib/mui_u8g2.h +++ b/src/clib/mui_u8g2.h @@ -96,6 +96,32 @@ typedef const struct mui_u8g2_u8_min_max_struct mui_u8g2_u8_min_max_t; #endif +struct mui_u8g2_u8_min_max_step_struct +{ + uint8_t *value; + uint8_t min; + uint8_t max; + uint8_t step; + uint8_t flags; +} MUI_PROGMEM; + +typedef const struct mui_u8g2_u8_min_max_step_struct mui_u8g2_u8_min_max_step_t; + +#if defined(__GNUC__) && defined(__AVR__) +# define mui_u8g2_u8mms_get_step(u8mm) mui_pgm_read(&((u8mm)->step)) +# define mui_u8g2_u8mms_get_flags(u8mm) mui_pgm_read(&((u8mm)->flags)) +# define mui_u8g2_u8mms_get_min(u8mm) mui_pgm_read(&((u8mm)->min)) +# define mui_u8g2_u8mms_get_max(u8mm) mui_pgm_read(&((u8mm)->max)) +# define mui_u8g2_u8mms_get_valptr(u8mm) ((uint8_t *)mui_pgm_wread(&((u8mm)->value))) +#else +# define mui_u8g2_u8mms_get_step(u8mm) ((u8mm)->step) +# define mui_u8g2_u8mms_get_flags(u8mm) ((u8mm)->flags) +# define mui_u8g2_u8mms_get_min(u8mm) ((u8mm)->min) +# define mui_u8g2_u8mms_get_max(u8mm) ((u8mm)->max) +# define mui_u8g2_u8mms_get_valptr(u8mm) ((u8mm)->value) +#endif + + /* helper functions */ u8g2_uint_t mui_get_x(mui_t *ui); @@ -111,33 +137,59 @@ void mui_u8g2_draw_button_utf_pi(mui_t *ui, u8g2_uint_t width, u8g2_uint_t paddi /* ready to use field functions */ uint8_t mui_u8g2_draw_text(mui_t *ui, uint8_t msg); -uint8_t mui_u8g2_btn_goto_wm_fi(mui_t *ui, uint8_t msg); -uint8_t mui_u8g2_btn_goto_w2_fi(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_btn_goto_wm_fi(mui_t *ui, uint8_t msg); /* GIF */ +uint8_t mui_u8g2_btn_goto_wm_if(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_btn_goto_w2_fi(mui_t *ui, uint8_t msg); /* GIF */ +uint8_t mui_u8g2_btn_goto_w2_if(mui_t *ui, uint8_t msg); -uint8_t mui_u8g2_btn_goto_w1_pi(mui_t *ui, uint8_t msg); -uint8_t mui_u8g2_btn_goto_w1_fi(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_btn_goto_w1_pi(mui_t *ui, uint8_t msg); /* GIF */ +uint8_t mui_u8g2_btn_goto_w1_fi(mui_t *ui, uint8_t msg); /* GIF */ -uint8_t mui_u8g2_btn_exit_wm_fi(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_btn_exit_wm_fi(mui_t *ui, uint8_t msg); /* similar to 'mui_u8g2_btn_goto_wm_fi' but will exit the menu system */ -uint8_t mui_u8g2_u8_chkbox_wm_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE, MUI_XY */ -uint8_t mui_u8g2_u8_radio_wm_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE,MUI_XYAT */ +uint8_t mui_u8g2_u8_chkbox_wm_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE, MUI_XY */ +uint8_t mui_u8g2_u8_radio_wm_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */ -uint8_t mui_u8g2_u8_opt_line_wa_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE,MUI_XYAT */ -uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE,MUI_XYAT */ +uint8_t mui_u8g2_u8_opt_line_wa_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */ +uint8_t mui_u8g2_u8_opt_line_wa_mse_pf(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */ +uint8_t mui_u8g2_u8_opt_line_wa_mud_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */ +uint8_t mui_u8g2_u8_opt_line_wa_mud_pf(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XYAT */ -uint8_t mui_u8g2_u8_opt_parent_wm_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE, MUI_XYAT */ -uint8_t mui_u8g2_u8_opt_radio_child_wm_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE, MUI_XYA */ -uint8_t mui_u8g2_u8_opt_radio_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE, MUI_XYA */ +/* The text part of the parent defines a '|' separted list of elements, which can be selected by the child. */ +/* Argument is a form number where the child element is placed multiple times */ +/* The child form does not require the ok button, because the child function will return to the parent with the select element */ +uint8_t mui_u8g2_u8_opt_parent_wm_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE, MUI_XYAT */ +uint8_t mui_u8g2_u8_opt_radio_child_wm_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE, MUI_XYA */ +uint8_t mui_u8g2_u8_opt_radio_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE, MUI_XYA */ uint8_t mui_u8g2_u8_opt_child_wm_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE, MUI_XYA */ -uint8_t mui_u8g2_goto_parent(mui_t *ui, uint8_t msg); /* MUIF_RO */ -uint8_t mui_u8g2_goto_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_BUTTON, MUI_XYA */ + +//uint8_t mui_u8g2_goto_parent(mui_t *ui, uint8_t msg); /* MUIF_RO, MUI_DATA (WARNING: Must appear only once per form!!! */ +// renamed to +uint8_t mui_u8g2_goto_data(mui_t *ui, uint8_t msg); /* REF, MUIF_RO, MUI_DATA (WARNING: Must appear only once per form!!! */ +//uint8_t mui_u8g2_goto_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_BUTTON, MUI_XYA */ +// renamed to +uint8_t mui_u8g2_goto_form_w1_mse_pi(mui_t *ui, uint8_t msg); /* REF, MUIF_BUTTON, MUI_XYA */ +uint8_t mui_u8g2_goto_form_w1_mse_pf(mui_t *ui, uint8_t msg); /* REF, MUIF_BUTTON, MUI_XYA */ +uint8_t mui_u8g2_u8_char_wm_mud_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_VARIABLE,MUI_XY, usually requires a monospaced font line profont12 */ -uint8_t mui_u8g2_u8_char_wm_mud_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE,MUI_XY, usually requires a monospaced font line profont12 */ + +/*===== MUIF U8g2 Label =====*/ + +#define MUIF_U8G2_LABEL() MUIF_LABEL(mui_u8g2_draw_text) + + +/*===== data = u8g2 font data =====*/ + +//#define MUIF_U8G2_FONT_STYLE(n,font) MUIF("S" #n, 0, (void *)(font), mui_u8g2_set_font_style_function) +#define MUIF_U8G2_FONT_STYLE(n, font) { 'S', #n[0], 0, 0, (void *)(font), mui_u8g2_set_font_style_function} + + +uint8_t mui_u8g2_set_font_style_function(mui_t *ui, uint8_t msg); /*===== data = mui_u8g2_u8_min_max_t* =====*/ @@ -148,11 +200,28 @@ uint8_t mui_u8g2_u8_char_wm_mud_pi(mui_t *ui, uint8_t msg); /* MUIF_VARIABLE (void *)((mui_u8g2_u8_min_max_t [] ) {{ (valptr) MUI_U8G2_COMMA (min) MUI_U8G2_COMMA (max)}}), \ (muif)) -uint8_t mui_u8g2_u8_min_max_wm_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U8_MIN_MAX, MUI_XY */ -uint8_t mui_u8g2_u8_min_max_wm_mud_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U8_MIN_MAX, MUI_XY */ +uint8_t mui_u8g2_u8_min_max_wm_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U8_MIN_MAX, MUI_XY */ +uint8_t mui_u8g2_u8_min_max_wm_mud_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U8_MIN_MAX, MUI_XY */ -uint8_t mui_u8g2_u8_min_max_wm_mse_pf(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U8_MIN_MAX, MUI_XY */ -uint8_t mui_u8g2_u8_min_max_wm_mud_pf(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U8_MIN_MAX, MUI_XY */ +uint8_t mui_u8g2_u8_min_max_wm_mse_pf(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U8_MIN_MAX, MUI_XY */ +uint8_t mui_u8g2_u8_min_max_wm_mud_pf(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U8_MIN_MAX, MUI_XY */ + +/*===== data = mui_u8g2_u8_min_max_step_t* =====*/ + +/* gcc note: the macro uses array compound literals to extend the lifetime in C++, see last section in https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html */ +#define MUIF_U8G2_U8_MIN_MAX_STEP(id, valptr, min, max, step, flags, muif) \ + MUIF(id, MUIF_CFLAG_IS_CURSOR_SELECTABLE, \ + (void *)((mui_u8g2_u8_min_max_step_t [] ) {{ (valptr) MUI_U8G2_COMMA (min) MUI_U8G2_COMMA (max) MUI_U8G2_COMMA (step) MUI_U8G2_COMMA (flags) }}), \ + (muif)) + +#define MUI_MMS_2X_BAR 0x01 +#define MUI_MMS_4X_BAR 0x02 +#define MUI_MMS_SHOW_VALUE 0x04 + +uint8_t mui_u8g2_u8_bar_wm_mse_pi(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_u8_bar_wm_mud_pi(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_u8_bar_wm_mse_pf(mui_t *ui, uint8_t msg); +uint8_t mui_u8g2_u8_bar_wm_mud_pf(mui_t *ui, uint8_t msg); /*===== data = mui_u8g2_list_t* =====*/ /* similar to mui_u8g2_u8_opt_line, but u16 and dynamic list */ @@ -163,14 +232,14 @@ uint8_t mui_u8g2_u8_min_max_wm_mud_pf(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U8_ (void *)((mui_u8g2_list_t [] ) {{ (valptr) MUI_U8G2_COMMA (dataptr) MUI_U8G2_COMMA (getcb) MUI_U8G2_COMMA (cntcb)}}), \ (muif)) -uint8_t mui_u8g2_u16_list_line_wa_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U16_LIST, MUI_XYA, arg=pixel fieldsize */ -uint8_t mui_u8g2_u16_list_line_wa_mud_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U16_LIST, MUI_XYA, arg=pixel fieldsize */ +uint8_t mui_u8g2_u16_list_line_wa_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U16_LIST, MUI_XYA, arg=pixel fieldsize */ +uint8_t mui_u8g2_u16_list_line_wa_mud_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U16_LIST, MUI_XYA, arg=pixel fieldsize */ -uint8_t mui_u8g2_u16_list_parent_wm_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U16_LIST, MUI_XYA, arg=subform */ -uint8_t mui_u8g2_u16_list_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U16_LIST, MUI_XYA, arg=sub element number */ +uint8_t mui_u8g2_u16_list_parent_wm_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U16_LIST, MUI_XYA, arg=subform */ +uint8_t mui_u8g2_u16_list_child_w1_mse_pi(mui_t *ui, uint8_t msg); /* GIF, MUIF_U8G2_U16_LIST, MUI_XYA, arg=sub element number */ -uint8_t mui_u8g2_u16_list_goto_w1_mse_pi(mui_t *ui, uint8_t msg); /* MUIF_U8G2_U16_LIST first char of the string denotes the target form */ +uint8_t mui_u8g2_u16_list_goto_w1_mse_pi(mui_t *ui, uint8_t msg); /* REF, MUIF_U8G2_U16_LIST first char of the string denotes the target form */ #ifdef __cplusplus diff --git a/src/clib/u8g2.h b/src/clib/u8g2.h index 9c045f8f..24b818d0 100644 --- a/src/clib/u8g2.h +++ b/src/clib/u8g2.h @@ -1642,6 +1642,7 @@ extern const uint8_t u8g2_font_squeezed_r7_tr[] U8G2_FONT_SECTION("u8g2_font_squ extern const uint8_t u8g2_font_squeezed_r7_tn[] U8G2_FONT_SECTION("u8g2_font_squeezed_r7_tn"); extern const uint8_t u8g2_font_squeezed_b7_tr[] U8G2_FONT_SECTION("u8g2_font_squeezed_b7_tr"); extern const uint8_t u8g2_font_squeezed_b7_tn[] U8G2_FONT_SECTION("u8g2_font_squeezed_b7_tn"); +extern const uint8_t u8g2_font_percent_circle_25_hn[] U8G2_FONT_SECTION("u8g2_font_percent_circle_25_hn"); extern const uint8_t u8g2_font_freedoomr10_tu[] U8G2_FONT_SECTION("u8g2_font_freedoomr10_tu"); extern const uint8_t u8g2_font_freedoomr10_mu[] U8G2_FONT_SECTION("u8g2_font_freedoomr10_mu"); extern const uint8_t u8g2_font_freedoomr25_tn[] U8G2_FONT_SECTION("u8g2_font_freedoomr25_tn"); @@ -1818,6 +1819,7 @@ extern const uint8_t u8g2_font_10x20_t_greek[] U8G2_FONT_SECTION("u8g2_font_10x2 extern const uint8_t u8g2_font_10x20_t_cyrillic[] U8G2_FONT_SECTION("u8g2_font_10x20_t_cyrillic"); extern const uint8_t u8g2_font_10x20_t_arabic[] U8G2_FONT_SECTION("u8g2_font_10x20_t_arabic"); extern const uint8_t u8g2_font_siji_t_6x10[] U8G2_FONT_SECTION("u8g2_font_siji_t_6x10"); +extern const uint8_t u8g2_font_waffle_t_all[] U8G2_FONT_SECTION("u8g2_font_waffle_t_all"); extern const uint8_t u8g2_font_tom_thumb_4x6_t_all[] U8G2_FONT_SECTION("u8g2_font_tom_thumb_4x6_t_all"); extern const uint8_t u8g2_font_tom_thumb_4x6_tf[] U8G2_FONT_SECTION("u8g2_font_tom_thumb_4x6_tf"); extern const uint8_t u8g2_font_tom_thumb_4x6_tr[] U8G2_FONT_SECTION("u8g2_font_tom_thumb_4x6_tr"); diff --git a/src/clib/u8g2_fonts.c b/src/clib/u8g2_fonts.c index cdf57d1c..76adcb37 100644 --- a/src/clib/u8g2_fonts.c +++ b/src/clib/u8g2_fonts.c @@ -534,6 +534,37 @@ const uint8_t u8g2_font_squeezed_b7_tn[180] U8G2_FONT_SECTION("u8g2_font_squeeze "\63 \326\200X\1\64\13}:\22\353\6d@\6\4\65\11|\66\346\14\210b\5\66\14}z\223\14" "\310\0%Q\322\4\67\10|\66\244J\324\2\70\14}z\223DI\223DI\23\0\71\14}z\223D" "I\64@I\23\0:\6\342.\62$\0\0\0\4\377\377\0"; +/* + Fontname: unknown + Copyright: unknown + Glyphs: 9/9 + BBX Build Mode: 1 +*/ +const uint8_t u8g2_font_percent_circle_25_hn[759] U8G2_FONT_SECTION("u8g2_font_percent_circle_25_hn") = + "\11\1\4\3\5\5\1\1\6\31\31\0\0\31\0\31\0\0\0\0\0\2\332\60M\71\237s<\330=\204" + "L\214\260\254d<@\134i$)%\333,\222)-\22\24\1\340\14\17\205K\256`D\22\221D" + "\224\204I\0\340\15\20\210J>\261\60\42I\322\71\22\214\221\0\340\16\17\230:>\261\224H\63\251\214" + "\212\343\0\340\17\20\210J.\232db\252\21\17\21\33\11\0\340\20\14\210J\216\17&\323\341\301\0\340" + "\21\16\210J\216\203\311t\70\220L\7\3\340\22\16\210J\216\203\311D\62\221L\7\3\340\23\16\210J" + "\216\203H\323\341@\322t\20\340\24\16\210J\216\203H\23\311D\322t\20\340\25\16\210J.\232d\345" + "\361 \261\221\0\340\26\23\210J.Z\60\22\212\211b\242\211\70\22\214\221\0\340\27\14\210J\216\3\345" + "\343\341\201\0\340\30\20\210J\216\203X\24\23\305D\23\261\370 \340\31\20\210J>iD&Y\71F" + "lT\31\0\340\32\24\210J>i(\26\11EB\61\321$\61\26\212\312\0\340\33\23\210J\276\220t" + "\22\32Fb\222X(\30\212J\1\340\34\21\206K\256\224\331$\62\213Dd\221Xh\4\340\35\16\205" + "K\36\31EF\21QH\42\0\340\36\21\207J\236\312!*\12\311\42\242\220\64R\1\340\37\20\207J" + "\236\312!*\231H%\23i\244\2\340 \15\207J\216Hv\300\357\200H\6\340!\16\210J\16\211:" + "\344\360\201\16\321\0\340\42\17\210J\16\341\204\22\61y\211P\206\2\340#\16wJ\16\331d\22)\265" + "D\326\4\340$\14\210J\216p\304\344\227p\0\340%\14wJ\216h\244\324K\64\0\340&\22\210J" + "\16\211\204(\42E(\22J\210$\244(\340'\21\210J\236\70 \322&\322V\251\304\1\21\0\340(" + "\15wJ\216Hv\300w@$\3\340)\14\207J\236JT\365\360!\0\340*\17wJ\216Cd\42" + "=H&\322C\0\340+\20\210J\216\203\204\42>L(b\361A\0\340,\21\207J\236\212l\62\221" + "L$k\222J\64\0\340-\24\210J\216Z\60D\212\304B\244\210(\22\231\244\34\4\340.\13\205K" + "\236\321\230\264\245\0\340/\13\206K\36\22\35P\342b\340\60\12\206K.\321Q\307\3\340\61\14\206K" + ".\321Q%$Q<\340\62\14\206K.\321Q\22\222\350x\340\63\13\206K.\321Q\242\217\7\340\64" + "\14\207J\256\321!\252\353!\0\340\65\17\207J\256\321!\252\22\223\210\244\207\0\340\66\20\207J\256\321" + "!*\211ID\222\211\364\20\340\67\20\207J\256\321!*\231H&\222\211\364\20\340\70\15hJ\216K" + "\64\22]\215\134\0\340\71\17hJ\216K\64\222\66\21M#\27\0\340:\17hJ\216K\64\22\21M" + "V#\27\0\340;\15hJ\216K\64\22\331\65r\1\340<\15xJ\216K\64\22\335\32\271\0\340=" + "\20xJ\216K\64\22\235\304&\242i\344\2\340>\20xJ\216K\64\222\66\21MV#\27\0\340\77" + "\16xJ\216K\64\22\331\327\310\5\0\340@\16\246;\316D\231\360\60\224\11\23\1\340A\16\206K\236" + "P\226\303\201B\23\212\0\340B\14hZ\276\341\241d\264\215\0\340C\20\210J\256a(\26\253\345F" + "\11Eg\0\340D\11Dl\276\311$\26\340E\16f[\336Xd\22\231\244E\242\1\340F\24\210J" + "~@\64\22\213D&)\223l\221\324H\34\20\340G\12eM>\31\205\213\0\340H\21\210Jn\65" + "\211LB\221P$\24\11E\1\340I\11DL\16\252H\2\340J\14fK\16;\200\16\22\212\0\340" + "K\16\210J\216C\34d\7\322\301j\0\340L\15\206K.\241(\242c\204&\62\340M\20\210J." + "Z\60\22V&\231&\42\11\0\340N\13\205K\316\330\341!&\14\340O\22\207K\316\250\250R\211L" + "B\222h$\26\12\1\340P\15\207J\316\250\250\342%&\16\1\340Q\13uK\316\330\341\60\23\6\340" + "R\17wJ\316\250\250R\211L\242)!\0\340S\15wJ\316\250\250\342\22\23\207\0\340T\15\206K" + "\216\240lDi\242\15\3\340U\16\210J\276$\225\311\341PYRK\340V\15\210J.\232\345\360\201" + "b#\1\340W\11\210J\216\377C\0\340X\15\204L\216\230hr\240\210b\0\340Y\11\205K\16\11" + "\177\21\340Z\16\206K\216\340\214T\251\220f\302\0\340[\23\210J\216XL$\232L\16\207\312D$" + "\212\305\0\340\134\21\210J.\247`(\30\12Fd\245\232\4\0\340]\22\210J\276\260(B\253D*" + "\221ZH\24\14\2\340^\15gJ\216X\310r\270TC\0\340_\15gJ\256X\344p\260\324\202\0" + "\340`\15\210J>)\315r\10\21\71\1\340a\15\210J.\42\247C\304F\225\1\340b\17\210J\316" + "\70@t\71)\315" + "r\10\21Y)\0\340e\15\210J>F\246C\304F\225\1\340f\16\210J>)\315r\10\21\331h" + "\0\340g\16\210J\36*\221\351\20\261Qe\0\340h\20\210J\316\70@f\71\261\224H\63\251\214\212\2\340\242\13fK\36\212\244\355B\1\340\243\17wJ\256\231D\62\261\35" + "\42\265\21\0\340\244\15uK\36\31EF\21\221D\0\340\245\17vK\256\224\331$S,\22\13\215\0" + "\340\246\13vK\36JP\361p(\340\247\14\206K\216C\210\323at\10\340\250\14\206K\216C\350\60" + "\342t\10\340\251\17hJ.Z\60\22\322\24\11\306H\0\340\252\17\207J\256YE\22\241D\16\17\223" + "\14\340\253\20\210J.\232eT\221P$\245\211\215\4\340\254\16fK\16R,\62\22E&\221\3\340" + "\255\16\210J\36KXs\204\22\25\307\0\340\256\21\210J>i(&\222\214L\23[(*\3\340\257" + "\12vK\216\243\342Id\340\260\21vK\276PH\24I\32E\42\42a\10\0\340\261\14\210J\216Z" + "\227\213X\326\0\340\262\23\210J>)\315r\210\4C\21I(\42\11Y\0\340\263\11\203L\216\207\230" + "\1\340\264\13xJ\216\203X\347\203\0\340\265\20xJ\216\203,$\253\205d\265\320A\0\340\266\20x" + "J\216\203X|\230\204\42\222P\344 \340\267\14xJ\216\203X\371\60>\10\340\270\22xJ\216\203$" + "\24\71LB\221\303$\24\71\10\340\271\15xJ\216Zn\25\71 \226V\340\272\22xJ\216\203(&" + "\62E\42\242\10)\22\71\10\340\273\22xJ\216\203(&\62E\42\242\211(\22\71\10\340\274\20xJ" + "\216\203,$;\210d\265\320A\0\340\275\22xJ\216\203,$\13\35&\241\210$\24\71\10\340\276\17" + "xJ\216\203,$\13\231\304\342\203\0\340\277\25\210J>i(\26\214\34\42\301PD\22\212HB\26" + "\0\340\300\21wJ\16\331d\222\26\212\205b\221\310\232\0\340\301\23\210J\16\341\204\222\30\12\206\202\241" + "`$B\31\12\340\302\20wJ\216h\244\24\13\305B\261P%\32\340\303\22\210J\216p\304\24\14\5" + "C\301P\60d\11\7\340\304\17wJ\216Hv\300!z\210\3\42\31\340\305\20\207J\216Hv\300!" + "*=\304\1\221\14\340\306\17wJ\256YE\22\241D\16\207I\6\340\307\15wJ\256YE\22\71<" + "L\62\340\310\15\207J\256YE\22\71|\230d\340\311\17wJ\256\320lI\22J\13\5\205\0\340\312" + "\24\210J\276\220\64\222\24\11Fb\222X(\30\212J\1\340\313\21wJ\256\320,\22\213\204$\241\264" + "PP\10\340\314\21\206K\256\224Y$\267HD\26\211\205F\0\340\315\17vK\256\224Y$\247X$" + "\26\32\1\340\316\20vK\236Yd\222\26\231$\305B#\0\340\317\22\206K\236Yd\222\26\231$\305" + "\42\261\320\10\0\340\320\22\210J>i(\26\214\214F\211\241`(H\2\340\321\22\210J.b(\30" + "\12\206B+\301X(*\3\340\322\20\210J\316\70@TI\26[\242\342\30\0\340\323\20\210J\276\260" + "\64b\26G\42%\71 \10\340\324\20wJ\276h$\226\262\24\11F\202#\0\340\325\21wJ\256a" + "$\30\11M&\261\224h\14\0\340\326\16wJ\276\260\210\222Z\11Jc\0\340\327\17wJ\276\250\60" + "R\215DH\342\30\0\340\330\20xJ>i$&\252\305D\244HX\6\340\331\21\210J>i$\30" + "\252e\14\221\42a\31\0\340\332\16\206K\236P^\216\221PL(\2\340\333\16vK\236P\226c$" + "\24\23\212\0\340\334\21xJ.Z\60\22\212\204bi\224`\214\4\340\335\23\210J>i(\30\212\5" + "C\301HH%\24\31\12\340\336\22\210J.Z\60\22J\11\206b\211\223`\214\4\340\337\17wJ\276" + "h$\30\211%E\362\62\23\340\340\26\210J\276\260(\42\211\211\42\21Q$\62\211\205D\301 \0\340" + "\341\23xJ\276\260(\42\211\211\42\221I,$\12\6\1\340\342\21\207J\316\250h\22\221Ed\21J" + "\232\70\4\340\343\20wJ\316\250h\22\221E(i\342\20\0\340\344\21\206K\216\240l\24\221\204$!" + "QD\66\14\340\345\17\210J\276$\225,\42M\221\234\324\22\340\346\17\210J.Z\60\22\326\34\11\306" + "H\0\340\347\13\210J\216\203X\317\7\1\340\350\16\204L\216\230(\222\244\22\21\305\0\340\351\11\204L" + "\216\220~\12\340\352\21\206K\216\340L\22\22ED\21Ih&\14\340\353\22\210J\216XL$\212\344" + "\244K\26\221(\26\3\340\354\21wJ\256R,\24\13\305\42\242I\312H\2\340\355\23\207J\256R," + "\24\13\305B\261\210h\222\62\222\0\340\356\11CN\256\220D\22\340\357\15eL\316\244H(\42\211H" + "\22\340\360\22\207J\356\304H\60\22\212$E\42\222\24I\6\340\361\11\63N\256\220$\0\340\362\13U" + "L\316\244H(\42I\340\363\20wJ\356\304H\60\22\212$E\42\222\14\340\364\20vK\216\240l\24" + "\221\204D\21\331\60\0\340\365\17xJ\276$\225,\42Q$'\265\4\340\366\16wJ\256YJT\65" + "\22\213\215\0\340\367\13wJ\216CT\327C\0\340\370\16tL\216\230(\222$\211\210b\0\340\371\11" + "tL\216\220>\5\340\372\20vK\216\340L\22\22E$\241\231\60\0\340\373\22xJ\216XL$\212" + "\344\244\222E$\212\305\0\340\374\21xJ.Z\60\22\26\223(\241HD$\1\340\375\20xJ.Z" + "\60\22\26\223L\23\221\4\0\340\376\17wJ\256\246X(\26\21UJ\22\0\340\377\11\203L\16\333\341" + "\20\341\0\20wJ\16R\304\22\243Dh\21K\210\0\341\1\16fK\216Q\244\22\42E*\241\1\341" + "\2\16hJ\216\303p\22\212\210\224\17\2\341\3\16hJ\216C\304\22\241\14\17\7\2\341\4\17\210J" + ">)\315r\70HlT\31\0\341\5\15wJ\276\350\254r\251Mc\0\341\6\16\210J\36\221\344\360" + "\201b\243\312\0\341\7\16xJ\36\221\344\360\60\261Qe\0\341\10\22\207J\276h$\226\262\24\11F" + "\202\221\340\10\0\341\11\22\207J\256a$\30\11FB\223I,%\32\3\341\12\17xJ\316\70@T" + "I\266D\305\61\0\341\13\20xJ\276\260\64b\216DJr@\20\0\341\14\22\207J\276p\60\222)" + "$\12I#\261\330\10\0\341\15\21wJ\276`$SH\24\222Fb\261\21\0\341\16\20wJ\276h" + "$\226r\211\205\42I\25\0\341\17\17vK\236P\312$\224\227I(\5\0\341\20\12uK\256\220M" + "\233\1\341\21\13uK\256\220M%\42\63\341\22\15uK\256\220M\22\221Dd\6\341\23\15XZ\216" + "K\64\22\235F.\0\341\24\15XZ\216K\64\222\66\215\134\0\341\25\16XZ\216K\64\22\21M#" + "\27\0\341\26\15XZ\216K\64\22Y\215\134\0\341\27\14XZ\236Kt\32\211F\16\341\30\14XZ" + "\236Kt\26I\215\34\341\31\14XZ\236Kt$I\215\34\341\32\14XZ\236Kt\62I\215\34\341" + "\33\23\210J\316$Q,\62I\222$\311\42\222\220\70\6\341\34\22xJ\316$Q,\62I\222E$" + "!q\14\0\341\35\22\207J\256\260,\22\241\304$\61Id$\15\2\341\36\20wJ\256\260,\22\241" + "\304$\221\221\64\10\341\37\14gJ\336\310\65\24\275D\1\341 \16wJ\216Ct\66\231H\245\207\0" + "\341!\14wJ\216K%\262vx\20\341\42\15gJ\216Ct\66\231H\17\1\341#\14gJ\216K" + "%\262v\70\10\341$\17wJ\216\203l\222\42\12I\245\207\0\341%\16gJ\216\203l\222\42\12I" + "\17\1\341&\14WZ\216\203l\62\221\36\2\341'\13WZ\216K%\262v\20\341(\20wJ\256Y" + "J(\244\42\215\304b#\0\341)\20wJ\276h$\26\311$IK\211\306\0\341*\16wJ\216C" + "T\24R\221J\17\1\341+\14\205K\256\330\244\24\314\11\0\341,\14\205K\256`N\225Y\10\0\341" + "-\15XZ\336\70@r\210\212C\0\341.\15XZ\256\260\364\20\221\3\242\0\341/\17\206K\236P" + "\312$\224_&\241\24\0\341\60\13\210J\216\203X\317\7\1\341\61\21\210J\216\203,$\253\205d!" + "Y-t\20\341\62\21\210J\216\203X\371\60\11E$\241\310A\0\341\63\16\210J\216\203X|\30\37" + "\306\7\1\341\64\25\210J\216\203$\24\71LB\21I(r\230\204\42\7\1\341\65\16\210J\216Z\276" + "\234\342\200XZ\1\341\66\24\210J\216\203(&\212\211L\221\210(B\212D\16\2\341\67\24\210J\216" + "\203(&\212\211L\221\210h\42\212D\16\2\341\70\20\210J\216\203(&\62\305j\42S\354 \341\71" + "\24\210J\216\203,$\13\311B\207I(\42\11E\16\2\341:\20\210J\216\203,$\13\311B&\261" + "\370 \341;\13uK\256\330\244\24\314\4\341<\13uK\256`\246\312,\4\341=\13WZ\316\260\344" + "(\15\1\341>\13WZ\256\250\360\42\16\2\341\77\16hJ\356\310!\34\12\37\42a\0\341@\20\207" + "J\256YJ\26I\212T:\211L\62\341A\17wJ\256YJ\26I\212t\22\231d\341B\17\207J" + "\256YJ\26\251\352$\62\311\0\341C\16wJ\256YJ\26\251t\22\231d\341D\16wJ\216CT" + "e\42I\221d\61\341E\17wJ\216CTe\42\231H&\21\3\341F\21\210J\216\203X\13E\22" + "\212HB\221\310\1\341G\20\210J\216\203X\13E\22Q\211H\42\7\341H\16wJ\256\341\350p\210" + "\244\34\16\1\341I\16\207J\256\341\350\360\20I\71\34\2\341J\15xJ\216\203X\371 \23Z\0\341" + "K\16\206K\216C\35@\242\203\204\42\0\341L\16hJn\231\204\42\241\250I\304\2\341M\16wJ" + ".\222\344 )\21M\24\0\341N\14wJ^\31\345`\261Q\5\341O\15wJ\16)\315r\260\320" + "\244\0\341P\17xJ>iD&Y\223\330\250\62\0\341Q\17wJ\256\231D\62\261\35\42\265\21\0" + "\341R\20xJ\276\260(B\253Dj!Q\60\10\341S\17\210J>)\315r\70H\214R\22\0\341" + "T\16xJ>)\315r\210\30\245$\0\341U\15xJ>)\315r\10\21\231\0\341V\15xJ." + "\42\323!b\243\312\0\341W\15wJ\276\260\310r\60Jc\0\341X\15wJ\276\250\360`\61\211c" + "\0\341Y\15hJ>)\315r\210C\16\1\341Z\13gJ\276\350\254r\7\34\341[\15hJ\216K" + "\64\22]\215\134\0\341\134\17hJ\216K\64\222\66\21M#\27\0\341]\17hJ\216K\64\22\21M" + "V#\27\0\341^\15hJ\216K\64\22\331\65r\1\341_\16uK\236\211\204r\220P$\23\0\341" + "`\12tL\36\311H\27\2\341a\13uK\236\211\232H[\1\341b\15uK\236\211\232dH\221L" + "\0\341c\17vK>\331(\42\11IlB\11\0\341d\14uK\216\33QF\221L\0\341e\14u" + "K.m\24\11E\62\1\341f\14uK\216\232H&\222)\1\341g\17uK\236\211\204\42\231H(" + "\222\11\0\341h\15uK\236\211\204\42\241\211\224\0\341i\16\206K\36\212\210\305B\42I(\0\341j" + "\12\204L\36\311H/\4\341k\14\206K\36\212H(\323\321\0\341l\17\206K\36\212H(\232\12I" + "\22\12\0\341m\17\206K>\331(\42\11IlB\25\0\341n\16\206K\216CPX\25\222$\24\0" + "\341o\16\206K\256\221LX\21\61I(\0\341p\14\206K\16\243\232P&T\2\341q\17\206K\36" + "\212\210$\241\210\230$\24\0\341r\16\206K\36\212\210IR\224\211F\0\341s\15vK\216C\210r" + "\250\220\16\1\341t\10sL\236\212\36\341u\13vK\16\243\360\60\24\32\341v\14vK\16\243\360\20" + "\24\36\2\341w\13vK\16\21\323!\250\1\341x\14vK\216CPh\24\36\2\341y\15vK\216" + "CPx\10\221\16\1\341z\10vK\16\243>\341{\16vK\216C\210$\241\210H\207\0\341|\13" + "vK\216C\210t\10j\341}\16\206K\216C\210R\261TH\207\0\341~\11\204L.\311I\17\341" + "\177\13\206K\16\243\360\60T\64\341\200\14\206K\16\243\360\20T<\4\341\201\13\206K\16\21\323!\250" + "\3\341\202\14\206K\216CPhT<\4\341\203\15\206K\216CPx\10\61\35\2\341\204\10\206K\16" + "\243~\341\205\16\206K\216C\210$\241\210\230\16\1\341\206\15\206K\216C\210t\10*\36\2\341\207\15" + "\207K\216\303\244dq\251\35\4\341\210\14\207K\216\203l\62\351\365\20\341\211\17\207K\216\203l\62!" + "]$k\7\1\341\212\17\207K\216\3\245D\211L+\226\203\0\341\213\16\207K\216CTb\274H\326" + "\16\2\341\214\17\207K\216\203lb\234L$k\7\1\341\215\16\207K\216C\324R\261T,\207\1\341" + "\216\17\207K\216\203l\262\66\231H\326\16\2\341\217\17\207K\216\203l\62\221,Zf\7\1\341\220\16" + "JY\36\241\204t\10Q\204\22\0\341\221\12D\134\36\311!\42\1\341\222\10R]\16\22\1\341\223\10" + "bM\16\42\1\341\224\13V[\16\21I,\42\11\341\225\14fK\16\21I\16\25\221\4\341\226\16\206" + "K\16\21I,\42\211E$\1\341\227\22\207J\316H\60\42\211\230\42\243\264\210e\24\1\341\230\22\210" + "J\356HL\22\231\244l\212%\231F\21\0\341\231\22\210J\336\210L\22\331\24\32\305\222L\243\10\0" + "\341\232\22\210J\216\260\370 \211H\42*\207I\60d\1\341\233\16\210J\36\313\341\303D,\7H\1" + "\341\234\20\210J\216Z\246\203,$\13\231\222\16\1\341\235\25\210J\236`,\24\63E$\221\203$\24" + "\221PBI\0\341\236\17\210J\216\7\231Xv\230H\210\207\1\341\237\15\210J\36\313\341ar\25\247" + "\1\341\240\24\210J.\232HB\271D$\241\210$\64\11\315H\0\341\241\21\210J\36\313A,\11\212" + "b\222\240\70b\1\341\242\20\210J\36\313A,\241\210%\24q\304\2\341\243\21\210J\36\313A,\11" + "E\304\22\212\70b\1\341\244\15\210J\16\312;\350r\244\134\6\341\245\16\210J\216\311\27:D\205\42" + "\241(\341\246\20\210J.\247`(\30\12\206\202$\323\0\341\247\14\210J\36\313\341\3\305\252\6\341\250" + "\21yI\216\303\244\262R\211TR&\225\303\0\341\251\21\306+\216\250pF\252\34\16\23\322L\30\5" + "\341\252\13\306+\216p^\203y\5\341\253\20\306+\336\240lD\71\34&%\332P\32\341\254\12\306+" + "\336`^\303y\341\255\14\305+\216\240lD\71\374P\341\256\14\305+\216\77TH\63a\0\341\257\20" + "yI\236K\34\20\252E\203s\244 \0\341\260\13\206K\36\312Q\242\217\7\341\261\10\301-\216C\1" + "\341\262\20\210J\216C\254H\221\34\42\22b\355\20\341\263\22\210JNi$\30\62\205F\301\320,\22" + "\26\1\341\264\20\207J\276pt\70\223\210b\221\11\65\0\341\265\21\206K.Q$I\42\232\215$\223" + "\64\21\0\341\266\22\210J\16\241(U&Q\242Y\42\24\221(\0\341\267\23\210J\16\241(\61\24\222" + "(\321,!Q$\30\1\341\270\21\210J\216\360pB\71\214D\7\211%B\11\341\271\20\210J.\32" + "%B\261\34\17\22\33\11\0\341\272\22\210J\216\360\204$\13\215b\223Pi\62\21\12\341\273\20\210J" + "\216\203X\13E\22Q\211H\42\7\341\274\17\210J.Z\60\22\326\34\11\306H\0\341\275\20hJ\16" + "\211\60\16\210C\202\242J\30\0\341\276\20hJ>\211\70\16\210\4C\245p\4\0\341\277\21\210J\216" + "\360pB\71\214D\23\25\243\14\0\341\300\25\210J\36Y$$\12Q\42\42-\21RH\24\211I\0" + "\341\301\22\210J\216\230E\222B\32)\215()\22[\0\341\302\15\210J.\232\345\360\201b#\1\341" + "\303\17\210J.\332(B\353\26\31\305H\0\341\304\20\210J.\232Hr \71MD\62\22\0\341\305" + "\14\210J\216\3\351p\362t \341\306\15\207J\216\211\13\365\360\20\251\0\341\307\17\210J\16\61\225X" + "\244J\302\221\260\0\341\310\17\210J.Z\60\22\26\37DD&\0\341\311\25\210J.QD\24\32\205" + "(!Jh\24\32%\211\42\0\341\312\23\210J\236\241(\26\14EC\321P\60\26\22N\0\341\313\21" + "\210J\316a,\24\223\304&\246\220(q\12\341\314\24\210J\356h(\213(\22\21E\222R\202\241p" + "\4\0\341\315\25\231\71\236\234\42Y\16s\300$e\16\230\244\314\1\207\1\341\316\23\230:\236\70@\16" + "\20\313\1R\232D&\222\10\5\341\317\15\227:\216R,\24\243\352z\10\341\320\24|H\216\203\35&" + "\207D$\261\310!\62;L\16\7\341\321\24\233\70\216C\35$\213\312\204\262\231\242,*\7\35\12\341" + "\322\21{H\216C-*\23\312f\212\262\350\241\0\341\323\30\254\70\36\261\350\60:L\16\17u\10E" + "$\241\210$\312B\33\0\341\324\31\253\70\316\71\240J\212\305\1\21-t\300E%\242\22\224\310\1C" + "\0\341\325\21\251\71\16\33ED\231\20\17\325\203\365p\60\341\326\23\232\71\16\362\201v\207\310!r\210" + "\34\42\207\34\10\341\327\22\232\71\216\3\35\42\207\310!r\310\341\215L\3\341\330\32\234\70\236\303(\16" + "\11\305!\241\70$\24\207\304\16\261\70$R:\34\6\341\331\30\213H\16: T\213\3B\241K:" + "`\16\210\304\1\222\203\10\0\341\332\27\234\70\216\203%\16)\206$\261\221(R\221\34\42\207;\354`" + "\341\333\17\210J\16bH\26\32=\331\250\42\0\341\334\30\233\70\16\212\60$\221\205&\242\213\350\42\262" + "\310(R\211\34\24\3\341\335\26\234\70\216\203%\34!S\302\221\303%\34!S\302\221\203\1\341\336\30" + "\234\70\216\203E\222E%\213J\26\225,*YT\262\250d\71\30\341\337\21\231\71\256\27\241\344\60<" + "\34,\341\220\11\0\341\340\12\212I\16\362\341\377\0\341\341\26\213H\16:\340\20;\210\246!\311Ar" + "\10\35B\207\30\0\341\342\13\227:\216\177\230\324\246\1\341\343\16\227:\216CT\247\220$e\66\15\341" + "\344\20\247:\276\350\254T\71H\134(\265\21\0\341\345\26\273(~\210\34B\256F\246\223h\327\310X" + "\22\7\314!\0\341\346\25\231\71\256\232\312A\22\15E\62E\62E\62EC\27\0\341\347\21\212I\216" + "\3)z\250\210.\22\213\344t\70\341\350\36\274(N:\300Z\212\305!\21%\11\35r\222PD\22" + "ID$\11\212\344\0\42\0\341\351\32\314(\356: \62\26\223(\311\221\71d\244\357\260H\210\24\23" + "\212\211\0\341\352\15\210J\36\33)$\32\226<\15\341\353\24\212I\236C\344p\71\210\16\241C\344p" + "\210\34\42\0\341\354\24\213H\216\70L\16\223\303\344 \71D\16\221\203\202\6\341\355\26\251\71\16[P" + "\24\214$\326\1\222\212\34 \251\310\1\207\1\341\356\27\252\71\256q,\30\215Ec\321`,<\211\303" + "\342\260\70,\0\341\357\22\212I\216\357\20IX\24\225\204&r\310\201\0\341\360\27\254\70^\221\224\42" + "\24\321\204#\261D\16!\221$\241\374\304\2\341\361\20zI\216\303\34v\230\303\16s\330a\0\341\362" + "\23zI\216\310!\16\213\34\342\260\310!\16\213\34\2\341\363\20zI\216C\34z\220\3\17q\350a" + "\0\341\364\20zI\256C\34x\220C\17q\330a\0\341\365\16zI\216\323!r\370\201r\20\5\341" + "\366\21\307*\236RI\42\222\210Z\16\267p\66\0\341\367\17\311)\216\67\177\222Pd\325\71 \10\341" + "\370\13fK\336\240lD\71\20\341\371\13fK\216\250pF\252\30\341\372\14fK\216\3\205\64\23F" + "\1\341\373\13fK\16K\211\66\224\6\341\374\17uK\236\244HD%E%)\22\1\341\375\14\247:" + "\256\321!\252\257\207\0\341\376\21\247:\256\321!\252e\42\231H&\322C\0\341\377\24\247:\256\321!" + "*\231H&\222\211d\42\231H\17\1\342\0\21\247:\256\321A\22\241D\246\322Y\305r\30\342\1\17" + "\247:\256\321\201\322D%U*\7\2\342\2\25\227:\316PH\26\21E\222$\261IP\22\224\4C" + "\0\342\3\21\230:\316PL\22\233\265\134\307\222h(\0\342\4\15\225;\316\230\350p \315\204\1\342" + "\5\15wJ\256\246X\250\24\243X\6\342\6\17V[\216PH\42\71D$\241\20\0\342\7\14V[" + "\256\24\311!\242\224\0\342\10\13eK\256\330\244\24\233\24\342\11\14eK\216\312,T\231\205\0\342\12" + "\15WZ\216Ph\42\71L\224\22\342\13\16WZ\216PH\42\71L$\243\4\342\14\17V[\216P" + "d\22\251L\42\242H\0\342\15\16uK\236\220$\267\224,\242\10\0\342\16\14hJ\276\341\241d\264" + "\215\0\342\17\23\213H~\220l&\262\34b\207\230\310<\223\203\4\342\20\14\267:\256\321!\252_\17" + "\1\342\21\30\273\70\256\361\61\32\232\206\246\241ih\32\232\6\243\241i\350 \4\342\22\32\273\70\256\361" + "\61\32\232\206\246\241ih\32\232\304\202\21Qh\32:\10\1\342\23\23\267:\256\321!\252\22\223\210T" + "$)J\322C\0\342\24\24\267:\256\321!*\222HR\224T$)J\322C\0\342\25\16\246;\316" + "D\231\360\60\224\11\23\1\342\26\14\225;\316X\232\250$\313\10\342\27\16XJ>\211p\42\13\211\206" + "\22\1\342\30\13FK\36J\60$\24\1\342\31\16hJ\36K\70D\13\6\305\62\0\342\32\23\212I" + "\236C$\16\11\331\302Aj\60,\207\10\1\342\33\23\212I\216\70(\216\32\224L\347\220Pt\22\224" + "\10\342\34\12\203I\216P\64\24\65\342\35\15\206I\216h\34x(\317f\0\342\36\16\211I\216\7:" + "\310f\207\216\307\0\342\37\10\30J\16\211\2\342 \11\70J\16\261\212\2\342!\15hJ>\261\232D" + "&\221I\24\342\42\21\230:nm\22\231D&\241H(\22\212\2\342#\26\231\71\236K\34 \12\212" + "\202\222,\302\220\60$\7D.\0\342$\25\231\71\236\313\344\20\71DL\221\220\345\20\71D&\27\0" + "\342%\24\231\71\236h\344p\250\3$Y\344\0I\26\71\340\60\342&\24\231\71\236h\344p\250\3\344" + "\0\71@\16\220\3\16\3\342'\33\234\70\236h\360 \71P\346\200\310\34\20\231\3\42s@,\16\210" + "\34(\2\342(\22yI\216\3u\22\213\210\42!I\226\351\201\0\342)\21yI\216\303\244\262R\211" + "TR&\225\303\0\342*\16\231\71~@\34\60\335\263\70\16\1\342+\13Wj\256Y\345pQ\1\342" + ",\16\207J\256Y\345pQ\214J\203\0\342-\16\207J\256Y\345pQ\7E\362\4\342.\21\227:" + "\256Y\345pQ\207\204\242\221h(\0\342/\17\227:\256Y\345pQL\13\246E\0\342\60\17\207:" + "\256Y\345pQ\7\305\202\61\0\342\61\22xJ\316H,\42\33\325\42\244C,\42\211\0\342\62\21\210" + "J\316p\34\20\215\210(\23\242-\42\3\342\63\14U[\236X\60(\212L\0\342\64\21wJ\216P" + "J)\26\212\205b\241J(\1\342\65\16xJ>Y\35t\230C\314\42\0\342\66\25zI\216\203$" + "\16\210\304\1s\300\34\60\7D\16\22\0\342\67\25zI\216\203$\16\210Df\223\331d\66\7D\16" + "\22\0\342\70\25zI\216\203$\16\210D*\223\312\244\62\7D\16\22\0\342\71\20zI\216\203\204\64" + "\231N\257\246\311A\2\342:\22zI\216\203\204e$\241RD\207\10\345 \1\342;\24zI\236\203" + "$\16\230\3\346\200\71 \22\7D\16\2\342<\23zI\236\203$\16\230Mf\223\331$\35\20\71\10" + "\342=\23zI\236\203$\16\230T&\225I%\35\20\71\10\342>\17zI\236\203dd\275\256\214(" + "\7\1\342\77\21zI\236\203\204b\21YM\222\10\313A\0\342@\21\134H\276\70\60\16\241DL\221" + ",\7I\2\342A\25|H\276\70\60\16\214C(\21S$\213(\222\345 I\342B\23|H\216\3" + "%\16\232\303\344\60\71L\16:X\0\342C\23|H\216\3%\16\242\203\346\240\71H\16:X\0\342" + "D\23|H\216\3%\16\252C\350\20:D\16:X\0\342E\23|H\216\3%\16\262\3\352\200:" + "@\16:X\0\342F\20|H\216\3%\16:;\313A\7\13\0\342G\21|H\216\3%\16:D" + "_\345\240\203\5\0\342H\23|H\216\3%\16:\10\17\301CP\16:X\0\342I\23|H\216\3" + "%\16:\314\16\262\203L\16:X\0\342J\23|H\216\3%\16:\220\16\243\303H\16:X\0\342" + "K\23|H\216\3%\16:T\16\224\3E\16:X\0\342L\23|H\216\3E\16\241\203\346\240\71" + "h\16\71X\0\342M\23|H\216\3e\16\250C\350\20:\204\16\70X\0\342N\21|H\216\3\205" + "l\7\324\1u@\371`\1\342O\15|H\216\3\245z\366z\260\0\342P\16|H\216\3\305x\210" + "~" + ")\315\344\345\20\7\312\0\342x\23\230:\216\220\260)B\222\214&\222\212\34\20\223\1\342y\22zI" + "\276\323!B\211\34\42\23JDt\210\35\342z\23\210J\16S$R\211\250DT\42*\221\211\311\4" + "\342{\12fK\16\341\341\203\0\342|\11wJ\16\351\341\17\342}\16\212I.c\322\341\35R:<" + "\14\342~\17\210J\216\70 \226%\377\337\1\207\0\342\177\17\210J\216X\226,\223\310w\300!\0\342" + "\200\23\212I\216\3\35\42\207\310!r\210\34\22\35\35\6\342\201\15wJ\216\207Je\22\251\34\10\342" + "\202\15wJ\216\7I\244%r\70\10\342\203\12wJ.\213\317\26\0\342\204\13wJ\216R\305K\70" + "b\342\205\13wJ\16K\70\342\245T\342\206\12wJ\36\263\305'\0\342\207\23\232\71\236\333Ar\211" + "\134\42\207\320\261\16>H\0\342\210\22\210J\216\220(bRQ\241h\22YB\242\0\342\211\20fK" + "\216\210$B\21\221$\224\210$\0\342\212\20\231\71\256\332\305\311\22\61Y,\267\22\0\342\213\17\210J" + ".\232eTy\10Ml$\0\342\214\16\210J\36\313\341\3\305*\7H\0\342\215\15\210J\36\313\341" + "\3\305&\225\2\342\216\26\251:\216\70(\16*I*\23\226IET\211\11#b\0\342\217\27\252\71" + "~@\34$\71\314\1rH\60\16\221\3\16\23\71(\16\342\220\27\252\71~@\34$\71\314\1rH" + "\60\16\221\3\16\23\71(\16\342\221\25\251\71\356\70Dr\20\313\1\301\70@|\220\310!a\0\342\222" + "\21zI~@\34$\71\314a\207\211\34\24\7\342\223\21\212I~@\34$\71\314\221\17\23\71(\16" + "\342\224\21\210J\336\70@r\210#\35\42r@\24\0\342\225\22\212I\256`\332,T\12f*\305f" + "\301$\0\342\226\25\214H\256p\60:\13\226\302\301p\250\30\233\6\303!\0\342\227\23\210J\256\304\220" + ",\64J\14\205F\61Q\60\24\2\342\230\21\212I\256`\242,\70\12f\32\306\204\231\0\342\231\24|" + "H~\320\64(L\211\5c\221`P\30\235\203\0\342\232\25\234\70\356\70,\16\213\225\242fk\250\26" + "\207\305aa\0\342\233\24|H~\320\64(L\211\5c\221`P\30\235\203\0\342\234\24|H~\320" + "\34&L\211\5c\221`P\16\233\203\0\342\235\16xJ\336\70@\22\234\324j\71\1\342\236\24\211I" + "\16\222$\70\211\215B#I\232D(\7\34\6\342\237\24\231\71\216\322\224\70\211\215B#I\232D(" + "\7\34\6\342\240\14wJ^\341l[$(\5\342\241\23\234\70\216\71\360\60;\4\17Q\263\35\321\34" + "\14\1\342\242\20\227:\216PJ,\66\334\61\22\214\204\0\342\243\27\253\71^\222)%R\62\245DJ" + "&J\244r\260D*\207\2\342\244\16\267;\276h$t\210\36\376!\0\342\245\22\267;\276h$t" + "\210\36,\225I\244r\70\20\342\246\14wJ\256\341\254\66\215\303\16\342\247\15xJ.\42\315F\225\3" + "\17\1\342\250\33\271)\276HT\42\233d\221\204&)\223\30)R\212PRf\22i$\6\342\251\22" + "|H\16*)D:\304!\342C\60\24b\35\342\252\21{H\216a%D\272\3\304\307H\210\64$" + "\342\253\16\250:\256Il\262\26\371;\340\2\342\254\10\262-\16\22\7\342\255\12+h\16\211\12E\3" + "\342\256\21|HN:\300H\242\20)$\242\35@\4\342\257\25\214H\276\70\224\16\210\20)\25Z\205" + "\66\254\204I\21\0\342\260\23\232\71\356\70d\134\10\342\270\21\250:\216Z(\22\312\22\212\211\314\232\17\2\342\271\16\250:\16J\210\42" + "\241\34\17\177\60\342\272\17\250:\216Il\42\232\254\134\17\77\24\342\273\14\246;\216\331\341\201D\315\12" + "\342\274\22\227:\256YJ($I\221E\62e\15\312\0\342\275\23\231\71\216\203\344V\235\3\342\220\70" + "$\16\11\227\0\342\276\24\231:nq\350\20\211Tbs@\34\22\207\204k\0\342\277\27\272)\256\251" + "\35B\266I\206\242\240\34\42\7\310!r\200\34\2\342\300\20jI>i\344 \251Ej\221Z\204\10" + "\342\301\25\231\71\256Z\64\22\7\310\1\22\275D\326$B\211\10\0\342\302\20\252\71\236q\325\370\261L" + "\7\204\342\260\0\342\303\25\273(\216\70P\16\242C\312\327C\354Z\66K\246\61\1\342\304\26\251:\216" + "\323\341 \211C\202D\71@\16\220\3\344\0!\0\342\305\22|H\256\210m\32*&\7\203\245\350\314" + "\22\2\342\306\24\234\70Nc\70\66\15\25\223\203\301Rt\26\16\32\1\342\307\24\234\70\336b\70\66\15" + "\25\223\203\301Rt\26\16V\1\342\310\24\234\70^jT\66\15\25\223\203\301Rt&\215R\1\342\311" + "\23\231\71\256Xl$\251\214ei\342IE\64K\2\342\312\25\231\71\256Xl$\71\210b\262\64Y" + "\350 \21\315\222\0\342\313\26\252\71\16\262\34B\226C\310r\10%e\222Er\210\34\4\342\314\15[" + "X\216H.\222\134\16\37\14\342\315\24\272)\216\207\321\201\16;\34F\7:\354p\30\35\10\342\316\21" + "\230:\236K\64\26\63]L\261\224h\344\0\342\317\14uK\256\330\244Z\231\205\0\342\320\15\205K\256" + "\330\244\16\253\314B\0\342\321\21\134X~H\34\26\11\315b\262H\34\26\7\342\322\32\234\70~H\34" + "\30\207E\342\240Hh\26\223E\342\240H\34\26\7\306\1\342\323\30\273(\316\71d\16\231\203\342\260\360" + "A\24K\212\245\254X&\226\5\342\324\26\234\70\256\240\64\16\14\16\343\300\340\60\16*\221\346\260`\1" + "\342\325\27\234\70\256`)\16\14\322\342\300\340\60\16*\315\346\260\240\14\0\342\326\30\253\70\16\231\60\32" + "\214\6\243\241iH\22K\33\246\246\305\1\63\0\342\327\15\210J\216\313\35v\271C^\0\342\330\27\274" + "(\336\71P\232\70\24\25\223\203\301\222p\30\215\312\201S\0\342\331\20\212I.c\322\241\244\16\23\211" + "\16\17\1\342\332\21\232\71.c\322\341!\244\16\23\211\16\17\1\342\333\23\254\70^\71\304x\230\34*" + "\42\375\345P\207\36\12\342\334\17\250:>i(\26\14\5#\207\77\30\342\335\15wJ\216;,:\253" + "\15G\0\342\336\20\211I\216\203\34\34\7Lk\267b\11\0\342\337\24\212I\236\134$\271C#Y$" + "\271C#Y$\271\0\342\340\26\251\71\316\70`Z\273\304\1\222\212\244\42\7H*\222J\0\342\341\26" + "\251\71\316\70`Z\273\304\1\222\212\34 \251\310\1\222J\0\342\342\15xJ\216K\34\360!r\70\14" + "\342\343\14\246;\216\77Dh\62\212\1\342\344\16\246;\216\243\360p\250\320d\24\3\342\345\17\226;\216" + "c$\24\23\252\205\42\301\3\342\346\16\226;\216c$\24\23\252Q\16\5\342\347\15\226;\216C\205&" + "T\243\34\12\342\350\20\210J.\232d\345!r\210Hl$\0\342\351\26\232\71\236p$D\12If" + "\23\322\204D\31UdV\32\0\342\352\22\212I\216\3\35\242*\11\213#R\211\34r \342\353\16x" + "J\216\203\230t\240CF\7\2\342\354\20yI\216\7\313!\62\241\244PR\16\4\342\355\22\231\71\216" + "\203\345\20\71D\16\207\311\301\42\226\3\342\356\26\273(\216\17\226\303\344\60\71L\16/\207\203D\16\221" + "\203\0\342\357\17zI\216C\365p\210\35\16\343C\1\342\360\30\271*\236C\34r\210\34\42\207\310!" + "r\210\34\42\224\65\211\64\4\342\361\27|H~@\70\30\211\5c\221h\60\22\13\306\42\262p\34\0" + "\342\362\16YY\356H\64\222\267Hj$\10\342\363\24\247:\216Cdr\220L\16\222\311A\62\71H" + "&\1\342\364\21\231\71\236;\360rx\260DC\321\320\5\0\342\365\14\230:.\322!\16\362\27\0\342" + "\366\22\234\70.\362!\216f\241\230-\62\263ed\5\342\367\21jY\216\70,\71\222\34\213\304!r" + "\300\0\342\370\22jY~\300\34\42K\11E\22c\301\70\10\0\342\371\17\231\71\276\361\332$\362\22\231" + "\215\327\0\342\372\15wJ\216\303\304B\245X\16\3\342\373\26\231:\236C\34r\210P&\224\211\64B" + "\231P&\207\20\0\342\374\27\231:\236C\34r\210\34\42\223\210\204\262\22\221\34\42\207\20\0\342\375\26" + "\231:\236C\34r\210L(\243\311L\62\232L(\207\20\0\342\376\22\230:^\252$\26\11E\302)" + "\301XD*\35\342\377\26\231\71\216\350$*\212Eb\221\70 \16\210Dc\221\324\5\343\0\24\211I" + "\216Yu\22\213\304\342\240\70$\16\211C\202\0\343\1\25\273(\216\17s\300C\370p\220\3>L\344" + "\20\71\10\0\343\2\15\213I\316w\360\361\16>\36\1\343\3\25\270*\16\211\204\242\16Q\241\250CT" + "(\352@\261\14\0\343\4\20\231\71\236;\354`\71D\254\265\313\301\0\343\5\26\252\71.[\70r\270" + "\34D\207\330\351\20\71\34\42\207\10\0\343\6\27\271)\336\70 \22\215\245F\242\221h,\65\22\7D" + "e\7\3\343\7\25\231\71\16j\34\22\214\224$\302\220\60T\11\305A\7\1\343\10\24\232\71\236\71$" + "\32\213\306b\263PZ(i\35x\30\343\11\16YY\16\311)(\242\310\1\207\1\343\12\15\247;\216" + "CT\257\207\331A\0\343\13\17ZY\216C\345\20\223D&\207\303\0\343\14\21\270*\216\3\311t\70" + "\25G\232\206\245\3\1\343\15\25\250:.\42-\30\11\305D\61\321D\34\11\306\210$\0\343\16\26\230" + ":\236`$BI\214\204b\242\230h\42\216\4c$\0\343\17\16ZY\216X%\345\22\271\35\16\2" + "\343\20\26\252\71N\261\355\20\71\34\254qP\34\24\7D\342\220(\0\343\21\21\212I\276\267h,\32" + "\213\306\242\245C\210\0\0"; /* Fontname: -Raccoon-Fixed4x6-Medium-R-Normal--6-60-75-75-P-40-ISO10646-1 Copyright: diff --git a/src/clib/u8x8_d_st7565.c b/src/clib/u8x8_d_st7565.c index 799025d4..2224367d 100644 --- a/src/clib/u8x8_d_st7565.c +++ b/src/clib/u8x8_d_st7565.c @@ -637,8 +637,8 @@ static const uint8_t u8x8_d_st7565_nhd_c12864_init_seq[] = { U8X8_C(0x0a2), /* LCD bias 1/9 */ U8X8_C(0x02f), /* all power control circuits on */ U8X8_CA(0x0f8, 0x000), /* set booster ratio to 4x */ - U8X8_C(0x023), /* set V0 voltage resistor ratio to large*/ - U8X8_CA(0x081, 180), /* set contrast, contrast value NHD C12864, see issue 186, increased contrast to 180 (issue 219) */ + U8X8_C(0x025), /* set V0 voltage resistor ratio to large, issue 1678: changed from 0x23 to 0x25 */ + U8X8_CA(0x081, 170), /* set contrast, contrast value NHD C12864, see issue 186, increased contrast to 180 (issue 219), reduced to 170 (issue 1678) */ U8X8_C(0x0ae), /* display off */ U8X8_C(0x0a5), /* enter powersafe: all pixel on, issue 142 */