diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/font24_7seg.c b/lib/lib_display/Display_Renderer-gemu-1.0/src/font24_7seg.c new file mode 100644 index 000000000..1844fc6cf --- /dev/null +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/font24_7seg.c @@ -0,0 +1,754 @@ +/** + ****************************************************************************** + * @file font24.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +const uint8_t Font24_Table_7seg [] PROGMEM = +{ + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @72 '!' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x01,0x00,0x00, // # + 0x01,0x00,0x00, // # + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @144 '"' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x0e,0x70,0x00, // ### ### + 0x0e,0x70,0x00, // ### ### + 0x0e,0x70,0x00, // ### ### + 0x04,0x20,0x00, // # # + 0x04,0x20,0x00, // # # + 0x04,0x20,0x00, // # # + 0x04,0x20,0x00, // # # + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @216 '#' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x06,0x60,0x00, // ## ## + 0x06,0x60,0x00, // ## ## + 0x06,0x60,0x00, // ## ## + 0x06,0x60,0x00, // ## ## + 0x06,0x60,0x00, // ## ## + 0x3f,0xf8,0x00, // ########### + 0x3f,0xf8,0x00, // ########### + 0x06,0x60,0x00, // ## ## + 0x0c,0xc0,0x00, // ## ## + 0x3f,0xf8,0x00, // ########### + 0x3f,0xf8,0x00, // ########### + 0x0c,0xc0,0x00, // ## ## + 0x0c,0xc0,0x00, // ## ## + 0x0c,0xc0,0x00, // ## ## + 0x0c,0xc0,0x00, // ## ## + 0x0c,0xc0,0x00, // ## ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @288 '$' (17 pixels wide) + 0x00,0x00,0x00, // + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x07,0xb0,0x00, // #### ## + 0x0f,0xf0,0x00, // ######## + 0x18,0x70,0x00, // ## ### + 0x18,0x70,0x00, // ## ### + 0x1c,0x00,0x00, // ### + 0x0f,0x80,0x00, // ##### + 0x07,0xe0,0x00, // ###### + 0x00,0xf0,0x00, // #### + 0x18,0x30,0x00, // ## ## + 0x1c,0x30,0x00, // ### ## + 0x1c,0x70,0x00, // ### ### + 0x1f,0xe0,0x00, // ######## + 0x1b,0xc0,0x00, // ## #### + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @360 '%' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x07,0x80,0x00, // #### + 0x0f,0xc0,0x00, // ###### + 0x1c,0xe0,0x00, // ### ### + 0x18,0x60,0x00, // ## ## + 0x18,0x60,0x00, // ## ## + 0x1c,0xe0,0x00, // ### ### + 0x0f,0xf8,0x00, // ######### + 0x07,0xe0,0x00, // ###### + 0x1f,0xf0,0x00, // ######### + 0x07,0x38,0x00, // ### ### + 0x06,0x18,0x00, // ## ## + 0x06,0x18,0x00, // ## ## + 0x07,0x38,0x00, // ### ### + 0x03,0xf0,0x00, // ###### + 0x01,0xe0,0x00, // #### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @432 '&' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x03,0xf0,0x00, // ###### + 0x07,0xf0,0x00, // ####### + 0x0c,0x60,0x00, // ## ## + 0x0c,0x00,0x00, // ## + 0x0c,0x00,0x00, // ## + 0x06,0x00,0x00, // ## + 0x07,0x00,0x00, // ### + 0x0f,0x9c,0x00, // ##### ### + 0x1d,0xfc,0x00, // ### ####### + 0x18,0xf0,0x00, // ## #### + 0x18,0x70,0x00, // ## ### + 0x0f,0xfc,0x00, // ########## + 0x07,0xdc,0x00, // ##### ### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @504 ''' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x01,0x00,0x00, // # + 0x01,0x00,0x00, // # + 0x01,0x00,0x00, // # + 0x01,0x00,0x00, // # + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @576 '(' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x18,0x00, // ## + 0x00,0x38,0x00, // ### + 0x00,0x70,0x00, // ### + 0x00,0xf0,0x00, // #### + 0x00,0xe0,0x00, // ### + 0x00,0xe0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x01,0xc0,0x00, // ### + 0x00,0xe0,0x00, // ### + 0x00,0xe0,0x00, // ### + 0x00,0x70,0x00, // ### + 0x00,0x70,0x00, // ### + 0x00,0x38,0x00, // ### + 0x00,0x18,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @648 ')' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x18,0x00,0x00, // ## + 0x1c,0x00,0x00, // ### + 0x0e,0x00,0x00, // ### + 0x0e,0x00,0x00, // ### + 0x07,0x00,0x00, // ### + 0x07,0x00,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x03,0x80,0x00, // ### + 0x07,0x00,0x00, // ### + 0x07,0x00,0x00, // ### + 0x0f,0x00,0x00, // #### + 0x0e,0x00,0x00, // ### + 0x1c,0x00,0x00, // ### + 0x18,0x00,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @720 '*' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x1d,0xb8,0x00, // ### ## ### + 0x1f,0xf8,0x00, // ########## + 0x07,0xe0,0x00, // ###### + 0x03,0xc0,0x00, // #### + 0x03,0xc0,0x00, // #### + 0x06,0x60,0x00, // ## ## + 0x06,0x60,0x00, // ## ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @792 '+' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x3f,0xfc,0x00, // ############ + 0x3f,0xfc,0x00, // ############ + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @864 ',' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0xe0,0x00, // ### + 0x00,0xc0,0x00, // ## + 0x01,0xc0,0x00, // ### + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x03,0x00,0x00, // ## + 0x03,0x00,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @936 '-' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x1f,0xf8,0x00, // ########## + 0x1f,0xf8,0x00, // ########## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @1008 '.' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x03,0xc0,0x00, // #### + 0x03,0xc0,0x00, // #### + 0x03,0xc0,0x00, // #### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @1080 '/' (17 pixels wide) + 0x00,0x18,0x00, // ## + 0x00,0x18,0x00, // ## + 0x00,0x38,0x00, // ### + 0x00,0x30,0x00, // ## + 0x00,0x70,0x00, // ### + 0x00,0x60,0x00, // ## + 0x00,0x60,0x00, // ## + 0x00,0xc0,0x00, // ## + 0x00,0xc0,0x00, // ## + 0x01,0x80,0x00, // ## + 0x01,0x80,0x00, // ## + 0x03,0x00,0x00, // ## + 0x03,0x00,0x00, // ## + 0x06,0x00,0x00, // ## + 0x06,0x00,0x00, // ## + 0x0e,0x00,0x00, // ### + 0x0c,0x00,0x00, // ## + 0x1c,0x00,0x00, // ### + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x18,0x00,0x00, // ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x0f,0xfc,0x00, // ########## + 0x0f,0xfc,0x00, // ########## + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x0f,0xfc,0x00, // ########## + 0x0f,0xfc,0x00, // ########## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x00,0x00, // + + // @0 ' ' (17 pixels wide) + 0x00,0x00,0x00, // + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x18,0x03,0x00, // ## ## + 0x07,0xfc,0x00, // ######### + 0x07,0xfc,0x00, // ######### + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x03,0x00, // ## + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + + // @1872 ':' (17 pixels wide) + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0xf0,0x00, // #### + 0x00,0xf0,0x00, // #### + 0x00,0xf0,0x00, // #### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0xf0,0x00, // #### + 0x00,0xf0,0x00, // #### + 0x00,0xf0,0x00, // #### + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00, // + 0x00,0x00,0x00 // +}; + +sFONT Font24_7seg = { + Font24_Table_7seg, + 17, /* Width */ + 24, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ + diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/fonts.h b/lib/lib_display/Display_Renderer-gemu-1.0/src/fonts.h index a19c1bedc..e7a709b74 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/fonts.h +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/fonts.h @@ -51,8 +51,6 @@ /* Includes ------------------------------------------------------------------*/ #include -#define USE_TINY_FONT - typedef struct _tFont { const uint8_t *table; @@ -66,6 +64,7 @@ extern sFONT Font20; extern sFONT Font16; extern sFONT Font12; extern sFONT Font8; +extern sFONT Font24_7seg; #ifdef __cplusplus } diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp index 31b62f1e2..c05faee13 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.cpp @@ -31,10 +31,7 @@ //#define USE_ALL_EPD_FONTS //#define USE_GFX_FONTS #define USE_TINY_FONT - -#ifdef ESP32 -#define USE_ICON_FONT -#endif +#define USE_7SEG_FONT uint8_t wr_redir=0; @@ -247,6 +244,11 @@ void Renderer::setTextFont(uint8_t f) { selected_font = &Font24; #endif break; + case 4: +#ifdef USE_7SEG_FONT + selected_font = &Font24_7seg; + break; +#endif default: selected_font = &Font12; break; diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index dc5f74b50..3022bfb20 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -4317,6 +4317,23 @@ int16_t Run_script_sub(const char *type, int8_t tlen, struct GVARS *gv) { WSContentFlush(); goto next_line; } + else if (!strncmp(lp, "rapp", 3)) { + lp+=4; + // skip one space after cmd + char tmp[256]; + Replace_Cmd_Vars(lp ,1 , tmp, sizeof(tmp)); + ResponseAppend_P(PSTR("%s"), tmp); + goto next_line; + } +#ifdef USE_SENDMAIL + else if (!strncmp(lp, "sm", 2)) { + lp+=3; + char tmp[256]; + Replace_Cmd_Vars(lp ,1 , tmp, sizeof(tmp)); + SendMail(tmp); + goto next_line; + } +#endif else if (!strncmp(lp,"=>",2) || !strncmp(lp,"->",2) || !strncmp(lp,"+>",2) || !strncmp(lp,"print",5)) { // execute cmd uint8_t sflag = 0,pflg = 0,svmqtt,swll; @@ -7192,8 +7209,13 @@ void ScriptJsonAppend(void) { } if (*lp!=';') { // send this line to mqtt - Replace_Cmd_Vars(lp, 1, tmp, sizeof(tmp)); - ResponseAppend_P(PSTR("%s"), tmp); + if (!strncmp(lp, "%=#", 3)) { + // subroutine + lp = scripter_sub(lp + 1, 0); + } else { + Replace_Cmd_Vars(lp, 1, tmp, sizeof(tmp)); + ResponseAppend_P(PSTR("%s"), tmp); + } } if (*lp==SCRIPT_EOL) { lp++; diff --git a/tasmota/xsns_53_sml.ino b/tasmota/xsns_53_sml.ino index 84b7643fa..878001ed4 100755 --- a/tasmota/xsns_53_sml.ino +++ b/tasmota/xsns_53_sml.ino @@ -1419,9 +1419,8 @@ void SML_Decode(uint8_t index) { } } else { // compare value - uint8_t found=1, use_uval = 1; - uint32_t ebus_uval=99; - float ebus_dval; + uint8_t found=1; + double ebus_dval=99; float mbus_dval=99; while (*mp!='@') { if (meter_desc_p[mindex].type=='o' || meter_desc_p[mindex].type=='c') { @@ -1445,19 +1444,18 @@ void SML_Decode(uint8_t index) { cp++; } else if (!strncmp(mp,"UUuuUUuu",8)) { uint32_t val= (cp[0]<<24)|(cp[1]<<16)|(cp[2]<<8)|(cp[3]<<0); - ebus_uval=val; + ebus_dval=val; mbus_dval=val; mp+=8; cp+=4; } else if (*mp=='U' && *(mp+1)=='U' && *(mp+2)=='u' && *(mp+3)=='u'){ uint16_t val = cp[1]|(cp[0]<<8); mbus_dval=val; - ebus_uval=val; + ebus_dval=val; mp+=4; cp+=2; } else if (!strncmp(mp,"SSssSSss",8)) { int32_t val= (cp[0]<<24)|(cp[1]<<16)|(cp[2]<<8)|(cp[3]<<0); - use_uval = 0; ebus_dval=val; mbus_dval=val; mp+=8; @@ -1465,25 +1463,23 @@ void SML_Decode(uint8_t index) { } else if (*mp=='u' && *(mp+1)=='u' && *(mp+2)=='U' && *(mp+3)=='U'){ uint16_t val = cp[0]|(cp[1]<<8); mbus_dval=val; - ebus_uval=val; + ebus_dval=val; mp+=4; cp+=2; } else if (*mp=='u' && *(mp+1)=='u') { uint8_t val = *cp++; mbus_dval=val; - ebus_uval=val; + ebus_dval=val; mp+=2; } else if (*mp=='s' && *(mp+1)=='s' && *(mp+2)=='S' && *(mp+3)=='S') { int16_t val = *cp|(*(cp+1)<<8); mbus_dval=val; - use_uval = 0; ebus_dval=val; mp+=4; cp+=2; } else if (*mp=='S' && *(mp+1)=='S' && *(mp+2)=='s' && *(mp+3)=='s') { int16_t val = cp[1]|(cp[0]<<8); mbus_dval=val; - use_uval = 0; ebus_dval=val; mp+=4; cp+=2; @@ -1491,14 +1487,12 @@ void SML_Decode(uint8_t index) { else if (*mp=='s' && *(mp+1)=='s') { int8_t val = *cp++; mbus_dval=val; - use_uval = 0; ebus_dval=val; mp+=2; } else if (!strncmp(mp,"ffffffff",8)) { uint32_t val= (cp[0]<<24)|(cp[1]<<16)|(cp[2]<<8)|(cp[3]<<0); float *fp=(float*)&val; - use_uval = 0; ebus_dval=*fp; mbus_dval=*fp; mp+=8; @@ -1508,7 +1502,6 @@ void SML_Decode(uint8_t index) { // reverse word float uint32_t val= (cp[1]<<0)|(cp[0]<<8)|(cp[3]<<16)|(cp[2]<<24); float *fp=(float*)&val; - use_uval = 0; ebus_dval=*fp; mbus_dval=*fp; mp+=8; @@ -1588,9 +1581,9 @@ void SML_Decode(uint8_t index) { // ebus pzem or mbus or raw if (*mp=='b') { mp++; - uint8_t shift=*mp&7; - ebus_uval>>=shift; - ebus_uval&=1; + uint8_t shift = *mp&7; + ebus_dval = (uint32_t)ebus_dval>>shift; + ebus_dval = (uint32_t)ebus_dval&1; mp+=2; } if (*mp=='i') { @@ -1613,8 +1606,6 @@ void SML_Decode(uint8_t index) { uint8_t crc = SML_PzemCrc(&smltbuf[mindex][0],6); if (crc!=smltbuf[mindex][6]) goto nextsect; dval=mbus_dval; - } else if (use_uval) { - dval=ebus_uval; } else { dval=ebus_dval; }