Setting up rounded rectangles support

This commit is contained in:
Clément Grennerat 2025-09-15 14:32:20 +02:00
parent 0017804193
commit 13c4e50264
11 changed files with 2046 additions and 882 deletions

View File

@ -29,7 +29,8 @@
#define SPI1_BASEDR_ADR SPI1_BASE //adresse du reg SPI3 DR pour acces 8 bits (defs std permet accès 16bits seulement) #define SPI1_BASEDR_ADR SPI1_BASE //adresse du reg SPI3 DR pour acces 8 bits (defs std permet accès 16bits seulement)
#define LCD_HEIGHT 282 // ST7365 is 320 (centered, offset = 19) #define LCD_HEIGHT 202 // 282 // ST7365 is 320 (centered, offset = 19)
#define LCD_FULL_HEIGHT 282 // ST7365 is 320 (centered, offset = 19)
#define LCD_WIDTH 470 // ST7365 is 480 (aligned at the left, offset = 10) #define LCD_WIDTH 470 // ST7365 is 480 (aligned at the left, offset = 10)
//CHIP SELECT PIN AND PORT, STANDARD GPIO //CHIP SELECT PIN AND PORT, STANDARD GPIO
@ -67,11 +68,6 @@
#define GREENYELLOW 0xAFE5 #define GREENYELLOW 0xAFE5
#define PINK 0xF81F #define PINK 0xF81F
#define SCREEN_VERTICAL_1 0
#define SCREEN_HORIZONTAL_1 1
#define SCREEN_VERTICAL_2 2
#define SCREEN_HORIZONTAL_2 3
void LCD_SPI_Init(void); void LCD_SPI_Init(void);
void LCD_SPI_Send(unsigned char SPI_Data); void LCD_SPI_Send(unsigned char SPI_Data);
void LCD_Write_Command(uint8_t Command); void LCD_Write_Command(uint8_t Command);
@ -88,12 +84,9 @@ void LCD_Set_Rotation(uint8_t Rotation);
// Par defaut pour kit L476 IUT1 : SCREEN_HORIZONTAL_1 // Par defaut pour kit L476 IUT1 : SCREEN_HORIZONTAL_1
void LCD_Init(void); void LCD_Init(void);
void LCD_Fill_Screen(uint16_t Colour); void LCD_Fill_Screen(uint16_t color, uint8_t full_screen);
// @param Colour : voir #define de quelques couleurs 16 bits standard ci-dessus
void LCD_Draw_Colour(uint16_t Colour); void LCD_Draw_Colour(uint16_t Colour);
// @param Colour : voir #define de quelques couleurs 16 bits standard ci-dessus
void LCD_Draw_Pixel(uint16_t X, uint16_t Y, uint16_t Colour); void LCD_Draw_Pixel(uint16_t X, uint16_t Y, uint16_t Colour);
//@param X : coordonnee x //@param X : coordonnee x
//@param Y : coordonnee y //@param Y : coordonnee y
@ -117,6 +110,19 @@ void LCD_Draw_Rectangle(
void LCD_Draw_Colour_Burst(uint16_t Colour, uint32_t Size); void LCD_Draw_Colour_Burst(uint16_t Colour, uint32_t Size);
void LCD_DrawHollowRoundRect(
uint16_t x,
uint16_t y,
uint16_t w,
uint16_t h,
uint8_t radius_top,
uint8_t radius_bottom,
uint8_t border_width,
uint16_t color,
uint16_t fill_color,
uint8_t do_fill);
#endif #endif
/*******************PARTIE ISSUE DE LA LIB ILI9193_GFX.h***************************/ /*******************PARTIE ISSUE DE LA LIB ILI9193_GFX.h***************************/
@ -137,18 +143,6 @@ void LCD_Draw_Filled_Circle(
uint16_t Y, uint16_t Y,
uint16_t Radius, uint16_t Radius,
uint16_t Colour); uint16_t Colour);
void LCD_Draw_Hollow_Rectangle_Coord(
uint16_t X0,
uint16_t Y0,
uint16_t X1,
uint16_t Y1,
uint16_t Colour);
void LCD_Draw_Filled_Rectangle_Coord(
uint16_t X0,
uint16_t Y0,
uint16_t X1,
uint16_t Y1,
uint16_t Colour);
void LCD_Draw_Filled_Rectangle_Size_Text( void LCD_Draw_Filled_Rectangle_Size_Text(
uint16_t X0, uint16_t X0,

View File

@ -3,6 +3,15 @@
#include "LCD_driver.h" #include "LCD_driver.h"
#define COLOR_PRIMARY 0xfdaa
#define COLOR_SECONDARY 0x667f
#define COLOR_SUCCESS 0x3766
#define COLOR_ERROR 0xf226
#define COLOR_BG 0xFFFF
#define COLOR_FG 0x0000
#define COLOR_OFF 0x0000
void run_dashboard_loop(); void run_dashboard_loop();
void init(); void init();
@ -10,14 +19,39 @@ void update_values();
void update_values_setup(); void update_values_setup();
void update_adc(); void update_adc();
void draw_init(); void draw_init();
void draw_battery();
void draw_distances();
void draw_power_bars(); // Displays the battery voltage and percent, with the trip and life distances
void draw_speed(); // Input voltage from COMM_GET_VALUES, scale 10
void draw_power(); // battery percent (level) from COMM_GET_VALUES_SETUP, scale 100
void draw_adc(); // trip distance from COMM_GET_VALUES_SETUP, scale 100
void draw_temps(); // life distance (odometer) from COMM_GET_VALUES_SETUP
void draw_battery(int16_t voltage, int32_t percent, int32_t trip_dist, uint32_t life_dist);
// Displays the power bars at the top
// Duty from COMM_GET_VALUES, scale 1000
void draw_power_bars(int16_t duty);
// Displays the huge speed counter with avg and max values.
// Speed from COMM_GET_VALUES_SETUP, scale 1000
void draw_speed(int32_t speed);
// Displays Current, Duty, Watts
// Current from COMM_GET_VALUES, scale 100
// Duty from COMM_GET_VALUES, scale 1000
// Input voltage from COMM_GET_VALUES, scale 10
void draw_power(int32_t amps, int16_t duty, int16_t voltage);
// Displays the two ADS voltages
//2 voltages from COMM_GET_DECODED_ADC, scale 1 000 000
void draw_adc(int32_t adc1, int32_t adc2);
// Displays the controller and motor temperatures
// 2 temperatures from COMM_GET_VALUES_SETUP, scale 10
void draw_temps(int16_t temp_fet, int16_t temp_motor);
#endif #endif

View File

@ -3,6 +3,16 @@
#include "stm32f1xx.h" #include "stm32f1xx.h"
/**
* Char mapping:
* : => :
* ; => ,
* < => /
* = => %
* > => °
*
*/
typedef struct { typedef struct {
uint16_t bitmapOffset;// Pointer into `bitmaps` array uint16_t bitmapOffset;// Pointer into `bitmaps` array
uint8_t width;// Bitmap width in pixels uint8_t width;// Bitmap width in pixels
@ -28,7 +38,7 @@ void GFX_DrawChar(
uint16_t fg_color, uint16_t fg_color,
uint16_t bg_color); uint16_t bg_color);
uint16_t GFX_GetTextWidth(const char *text, const GFXfont *font); uint16_t GFX_GetTextWidth(const char *text, const GFXfont *font, int8_t letter_spacing);
// Alignment: 0 => Left, 1 => Center, 2 => Right // Alignment: 0 => Left, 1 => Center, 2 => Right
void GFX_DrawText( void GFX_DrawText(
@ -38,6 +48,7 @@ void GFX_DrawText(
const GFXfont *font, const GFXfont *font,
uint16_t fg_color, uint16_t fg_color,
uint16_t bg_color, uint16_t bg_color,
uint8_t alignment); uint8_t alignment,
int8_t letter_spacing);
#endif #endif

19
Core/Inc/icons.h Normal file
View File

@ -0,0 +1,19 @@
// 36x41 chip icon
const uint8_t chip_icon[] = { 0xff, 0xe7, 0xe7, 0xe7, 0xf0, 0xff, 0xc3, 0xc3,
0xc3, 0xf0, 0xff, 0xc3, 0xc3, 0xc3, 0xf0, 0xff, 0xc3, 0xc3, 0xc3, 0xf0,
0xff, 0xc3, 0xc3, 0xc3, 0xf0, 0xff, 0x80, 0x00, 0x00, 0xf0, 0xfe, 0x00,
0x00, 0x00, 0x30, 0xfc, 0x00, 0x00, 0x00, 0x10, 0xfc, 0x00, 0x00, 0x00,
0x10, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0xff, 0xfe, 0x00, 0x00,
0x3f, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xfe, 0x00, 0x80, 0x3f, 0xff,
0xfe, 0x00, 0xf8, 0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xff, 0xfe, 0x00,
0xf8, 0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xff, 0xfe, 0x00, 0x80, 0x3f,
0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xfe,
0x00, 0x80, 0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xff, 0xfe, 0x00, 0xf8,
0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f, 0xff,
0xfe, 0x00, 0x80, 0x3f, 0xff, 0xfe, 0x00, 0x00, 0x3f, 0xff, 0xfe, 0x00,
0x00, 0x3f, 0xff, 0xfe, 0x00, 0x80, 0x3f, 0xff, 0xfe, 0x00, 0xf8, 0x3f,
0xff, 0xfe, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00,
0x10, 0xfc, 0x00, 0x00, 0x00, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x30, 0xff,
0x80, 0x00, 0x00, 0xf0, 0xff, 0xc3, 0xc3, 0xc3, 0xf0, 0xff, 0xc3, 0xc3,
0xc3, 0xf0, 0xff, 0xc3, 0xc3, 0xc3, 0xf0, 0xff, 0xc3, 0xc3, 0xc3, 0xf0,
0xff, 0xe7, 0xe7, 0xe7, 0xf0 };

View File

@ -0,0 +1,255 @@
// Created by ttf2gfx utility
const uint8_t monomaniacone12ptBitmaps[] = {
// Bitmap Data:
0x00 // ' '
,0x01,0x8C,0x63,0x18,0xC6,0x31,0x88,0x00,0x10,0xC0 // '!'
,0x00,0xC9,0x90,0x00 // '"'
,0x00,0x00,0x32,0x01,0x90,0x09,0x80,0xCC,0x06,0x60,0xFF,0x83,0xF8,0x0D,0x81
,0xFE,0x0F,0xF8,0x33,0x01,0x90,0x0D,0x80,0x4C,0x00,0x00 // '#'
,0x00,0x00,0xF0,0x3F,0xC2,0x66,0x66,0x66,0x60,0x26,0x03,0xE0,0x1E,0x00,0x7C
,0x07,0xE0,0x66,0x06,0x66,0x66,0x26,0x63,0xFC,0x0F,0x00,0x20,0x00,0x00 // '$'
,0x00,0x00,0x3C,0x10,0x66,0x30,0x66,0x20,0x66,0x60,0x66,0x40,0x3C,0xC0,0x00
,0x80,0x01,0x80,0x01,0x1C,0x03,0x3E,0x02,0x36,0x06,0x36,0x0C,0x36,0x0C,0x3C
,0x00,0x08 // '%'
,0x08,0x03,0xE0,0x23,0x06,0x30,0x63,0x02,0x30,0x3E,0x01,0xC4,0x3C,0xC3,0xC8
,0x67,0x86,0x38,0x63,0x82,0x38,0x3F,0xC0,0x80 // '&'
,0x06,0x60 // '''
,0x08,0xE2,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x60,0x83,0x82 // '('
,0x21,0xE0,0x82,0x08,0x20,0x82,0x08,0x20,0x82,0x08,0x27,0x88 // ')'
,0x00,0x06,0xC1,0xE0,0xFE,0x7F,0x87,0x81,0xF0,0x44,0x00,0x00 // '*'
,0x00,0x04,0x02,0x07,0xC7,0xF0,0x60,0x20,0x00 // '+'
,0x00,0x0C,0x62,0x00 // ','
,0x00,0x3F,0x8F,0x80 // '-'
,0x01,0x1C,0x00 // '.'
,0x00,0x00,0x0C,0x00,0xC0,0x18,0x01,0x80,0x30,0x03,0x00,0x60,0x04,0x00,0xC0
,0x08,0x01,0x80,0x10,0x03,0x00,0x20,0x00,0x00 // '/'
,0x0F,0x03,0xFC,0x20,0xE6,0x0E,0x61,0xE6,0x1E,0x63,0x66,0x26,0x66,0x66,0x46
,0x7C,0x67,0x86,0x78,0x63,0x86,0x3F,0xC0,0xF0 // '0'
,0x00,0xE7,0x9E,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x80 // '1'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x00,0x60,0x06,0x00,0xE0,0x7C,0x1E,0x03,0x80
,0x20,0x06,0x00,0x60,0x02,0x00,0x3F,0xE0,0xFC // '2'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x20,0x60,0x06,0x00,0x60,0xFE,0x1F,0xE0,0x06
,0x00,0x60,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // '3'
,0x00,0x00,0x18,0x01,0x80,0x98,0x19,0x81,0x18,0x31,0x83,0x18,0x61,0x86,0x18
,0x61,0x87,0xFE,0x3F,0xC0,0x18,0x01,0x80,0x00 // '4'
,0x3F,0xC7,0xFE,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x07,0xFC,0x3F,0xE0,0x06
,0x00,0x66,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // '5'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x06,0x00,0x60,0x07,0xFC,0x7F,0xE6,0x06
,0x60,0x66,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // '6'
,0x3F,0xC7,0xFE,0x60,0x66,0x06,0x00,0x60,0x06,0x00,0x40,0x0C,0x00,0x80,0x18
,0x01,0x80,0x10,0x03,0x00,0x30,0x02,0x00,0x00 // '7'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x66,0x06,0x20,0x63,0xFE,0x3F,0xE6,0x06
,0x60,0x66,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // '8'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x66,0x06,0x60,0x62,0x06,0x3F,0xE0,0xFE
,0x00,0x60,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // '9'
,0x01,0x0C,0x00,0x00,0x86,0x00 // ':'
,0x00,0x0C,0x62,0x00 // ','
,0x00,0x00,0x0C,0x00,0xC0,0x18,0x01,0x80,0x30,0x03,0x00,0x60,0x04,0x00,0xC0
,0x08,0x01,0x80,0x10,0x03,0x00,0x20,0x00,0x00 // '/'
,0x00,0x00,0x3C,0x10,0x66,0x30,0x66,0x20,0x66,0x60,0x66,0x40,0x3C,0xC0,0x00
,0x80,0x01,0x80,0x01,0x1C,0x03,0x3E,0x02,0x36,0x06,0x36,0x0C,0x36,0x0C,0x3C
,0x00,0x08 // '%'
,0x00,0x3C,0x26,0x66,0x66,0x66,0x66,0x26,0x3C,0x00 // '⁰'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x60,0x06,0x00,0xE0,0x3C,0x02,0x00,0x60
,0x06,0x00,0x00,0x00,0x00,0x60,0x06,0x00,0x00 // '?'
,0x0F,0xE0,0x7F,0xF0,0x80,0x33,0x00,0x66,0x10,0xCC,0xFD,0x99,0xB3,0x33,0x66
,0x66,0xCC,0xCD,0x99,0x9F,0xF3,0x08,0x86,0x00,0x04,0x00,0x0F,0xFC,0x07,0xF0 // '@'
,0x00,0x00,0x18,0x01,0xC0,0x0F,0x00,0x78,0x02,0x40,0x33,0x01,0x18,0x08,0x40
,0xC3,0x07,0xF8,0x3F,0xC3,0x03,0x18,0x18,0x80,0x40,0x00 // 'A'
,0x3F,0x07,0xFC,0x60,0x46,0x04,0x60,0x46,0x04,0x60,0x47,0xFC,0x7F,0xC6,0x06
,0x60,0x66,0x06,0x60,0x66,0x04,0x7F,0xC3,0xF0 // 'B'
,0x0F,0x03,0xFC,0x20,0x46,0x06,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00
,0x60,0x06,0x00,0x60,0x62,0x04,0x3F,0xC0,0xF0 // 'C'
,0x3F,0x07,0xFC,0x60,0x46,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06
,0x60,0x66,0x06,0x60,0x66,0x04,0x7F,0xC3,0xF0 // 'D'
,0x3F,0xCF,0xF9,0x80,0x30,0x06,0x00,0xC0,0x18,0x03,0xFC,0x7F,0xCC,0x01,0x80
,0x30,0x06,0x00,0xC0,0x1F,0xF1,0xFE // 'E'
,0x3F,0xCF,0xF9,0x80,0x30,0x06,0x00,0xC0,0x18,0x03,0xFC,0x7F,0xCC,0x01,0x80
,0x30,0x06,0x00,0xC0,0x18,0x00,0x00 // 'F'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x06,0x00,0x60,0x06,0x1C,0x63,0xE6,0x06
,0x60,0x66,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // 'G'
,0x00,0x06,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x67,0xFE,0x7F,0xE6,0x06
,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x60,0x00 // 'H'
,0x06,0x66,0x66,0x66,0x66,0x66,0x66,0x60 // 'I'
,0x00,0x00,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06
,0x00,0x66,0x06,0x60,0x62,0x04,0x3F,0xC0,0xF0 // 'J'
,0x00,0x4C,0x19,0x86,0x31,0x86,0x60,0xCC,0x1F,0x03,0xC0,0x78,0x0F,0x81,0x98
,0x33,0x06,0x30,0xC3,0x18,0x30,0x02 // 'K'
,0x00,0x0C,0x01,0x80,0x30,0x06,0x00,0xC0,0x18,0x03,0x00,0x60,0x0C,0x01,0x80
,0x30,0x06,0x00,0xC0,0x1F,0xF1,0xFE // 'L'
,0x00,0x01,0x80,0x67,0x03,0x9C,0x0E,0x78,0x79,0xE1,0xE7,0xCF,0x9B,0x36,0x67
,0x99,0x9E,0x66,0x31,0x98,0xC6,0x60,0x19,0x80,0x66,0x01,0x80,0x00 // 'M'
,0x00,0x06,0x06,0x70,0x67,0x86,0x78,0x67,0xC6,0x6C,0x66,0x66,0x62,0x66,0x36
,0x61,0xE6,0x1E,0x60,0xE6,0x0E,0x60,0x60,0x00 // 'N'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06
,0x60,0x66,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // 'O'
,0x3F,0x07,0xFC,0x60,0x46,0x06,0x60,0x66,0x06,0x60,0x67,0xFC,0x7F,0xC6,0x00
,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x00,0x00 // 'P'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06
,0x62,0x66,0x36,0x61,0xE2,0x1E,0x3F,0xE0,0xFC // 'Q'
,0x3F,0x07,0xFC,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x67,0xFC,0x7F,0xC6,0x18
,0x61,0x86,0x08,0x60,0xC6,0x04,0x60,0x60,0x00 // 'R'
,0x0F,0x03,0xFC,0x20,0x66,0x06,0x60,0x02,0x00,0x38,0x01,0xE0,0x07,0xC0,0x0E
,0x00,0x60,0x06,0x60,0x62,0x06,0x3F,0xC0,0xF0 // 'S'
,0x3F,0xC7,0xFE,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60
,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x00 // 'T'
,0x00,0x06,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06,0x60,0x66,0x06
,0x60,0x66,0x06,0x60,0x62,0x04,0x3F,0xC0,0xF0 // 'U'
,0x00,0x01,0x01,0x8C,0x0C,0x60,0x61,0x06,0x0C,0x30,0x61,0x81,0x08,0x0C,0xC0
,0x66,0x01,0x20,0x0F,0x00,0x78,0x03,0x80,0x0C,0x00,0x00 // 'V'
,0x00,0x00,0x10,0x01,0x88,0x00,0x86,0x10,0xC3,0x08,0x61,0x8E,0x30,0x47,0x10
,0x33,0x88,0x19,0xCC,0x0D,0xF6,0x03,0xDF,0x01,0xC7,0x00,0xE3,0x80,0x71,0xC0
,0x38,0x60,0x08,0x00 // 'W'
,0x00,0x02,0x0C,0x30,0xC1,0x18,0x19,0x80,0xF0,0x0F,0x00,0x60,0x06,0x00,0xF0
,0x0F,0x01,0x98,0x11,0x83,0x0C,0x20,0xC0,0x00 // 'X'
,0x00,0x01,0x81,0x8C,0x08,0x30,0xC1,0x8C,0x06,0x60,0x1E,0x00,0xE0,0x03,0x00
,0x18,0x00,0xC0,0x06,0x00,0x30,0x01,0x80,0x0C,0x00,0x00 // 'Y'
,0x3F,0xC3,0xFC,0x00,0xC0,0x08,0x01,0x80,0x10,0x03,0x00,0x60,0x06,0x00,0xC0
,0x0C,0x01,0x80,0x10,0x03,0x00,0x3F,0xC3,0xFC // 'Z'
,0x39,0xE6,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x87,0x8E // '['
,0x00,0x02,0x00,0x30,0x01,0x00,0x18,0x00,0x80,0x0C,0x00,0x60,0x06,0x00,0x30
,0x03,0x00,0x18,0x01,0x80,0x0C,0x00,0xC0,0x00 // '\'
,0x39,0xE0,0x82,0x08,0x20,0x82,0x08,0x20,0x82,0x08,0x27,0x8E // ']'
,0x00,0x18,0x3C,0x66,0x00 // '^'
,0x00,0x1F,0xE3,0xF8 // '_'
,0x01,0x0C,0x00 // '`'
,0x0C,0x07,0xC0,0x18,0x06,0x01,0x8F,0xE3,0xF9,0x86,0x61,0x98,0x63,0xF0,0x30 // 'a'
,0x00,0x18,0x06,0x01,0x80,0x7C,0x1F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x88,0x63,0xF0,0x30 // 'b'
,0x0C,0x0F,0xC6,0x19,0x86,0x60,0x18,0x06,0x01,0x80,0x61,0x98,0x63,0xF0,0x30 // 'c'
,0x00,0x00,0x60,0x18,0x06,0x0F,0x8F,0xE6,0x19,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x98,0x63,0xF0,0x30 // 'd'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x9F,0xE7,0xF1,0x80,0x60,0x18,0x03,0xE0,0x30 // 'e'
,0x0C,0x3E,0x60,0x60,0x7C,0x7E,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60
,0x00 // 'f'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x63,0xF8,0x3E
,0x01,0x80,0x61,0xF0,0x30 // 'g'
,0x00,0x18,0x06,0x01,0x80,0x7C,0x1F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x98,0x66,0x18,0x00 // 'h'
,0x01,0x88,0x00,0x18,0xC6,0x31,0x8C,0x63,0x18,0xC0 // 'i'
,0x00,0x61,0x80,0x00,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x67,0x08 // 'j'
,0x00,0x18,0x06,0x01,0x80,0x61,0x18,0xC6,0x61,0xB0,0x78,0x1E,0x07,0x81,0xF0
,0x66,0x18,0xC6,0x30,0x00 // 'k'
,0x01,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x83,0x80 // 'l'
,0x08,0x81,0xFF,0x18,0x8C,0xC4,0x66,0x23,0x31,0x19,0x88,0xCC,0x46,0x62,0x33
,0x11,0x98,0x8C,0x00,0x00 // 'm'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x18,0x00 // 'n'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x63,0xF0,0x30 // 'o'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x67,0xF1,0xF0
,0x60,0x18,0x06,0x00,0x00 // 'p'
,0x0C,0x0F,0xC6,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x63,0xF8,0x3E
,0x01,0x80,0x60,0x18,0x00 // 'q'
,0x0C,0x3E,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00 // 'r'
,0x0C,0x0F,0xC6,0x19,0x86,0x20,0x0F,0x00,0xF0,0x06,0x61,0x98,0x63,0xF0,0x30 // 's'
,0x00,0x60,0x60,0x60,0x7C,0x7E,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x20,0x3E
,0x0C // 't'
,0x00,0x18,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x63,0xF0,0x30 // 'u'
,0x00,0x08,0x63,0x10,0xC4,0x33,0x04,0xC1,0xE0,0x78,0x0E,0x03,0x00,0xC0,0x00 // 'v'
,0x00,0x01,0x11,0x09,0xC8,0x6E,0xC3,0xFE,0x1F,0xF0,0x7F,0x03,0xF8,0x1D,0xC0
,0xEE,0x06,0x30,0x00,0x00 // 'w'
,0x00,0x11,0x8C,0x83,0xC1,0xC0,0x60,0x30,0x38,0x1E,0x19,0x08,0xC0,0x00 // 'x'
,0x00,0x11,0x8C,0xC6,0x63,0x20,0xF0,0x78,0x38,0x1C,0x06,0x03,0x01,0x00,0x80
,0xC1,0xC0,0x00 // 'y'
,0x1E,0x1F,0x81,0x80,0xC0,0x40,0x60,0x20,0x30,0x10,0x18,0x0F,0xC7,0xC0 // 'z'
};
const GFXglyph monomaniacone12ptGlyphs[] = {
// bitmapOffset, width, height, xAdvance, xOffset, yOffset
{ 0, 1, 1, 6, 0, 0 }, // '
{ 1, 5, 16, 6, 0, -16 }, // '!
{ 11, 7, 4, 9, 0, -16 }, // '"
{ 15, 13, 16, 14, 0, -16 }, // '#
{ 41, 12, 19, 13, 0, -17 }, // '$
{ 70, 16, 16, 17, 0, -16 }, // '%
{ 102, 12, 16, 13, 0, -16 }, // '&
{ 126, 4, 4, 6, 0, -16 }, // ''
{ 128, 6, 16, 8, 0, -16 }, // '(
{ 140, 6, 16, 8, 0, -16 }, // ')
{ 152, 10, 9, 12, 0, -16 }, // '*
{ 164, 9, 8, 10, 0, -10 }, // '+
{ 173, 5, 6, 6, 0, -4 }, // ',
{ 177, 9, 3, 10, 0, -8 }, // '-
{ 181, 5, 4, 6, 0, -4 }, // '.
{ 184, 12, 16, 13, 0, -16 }, // '/
{ 208, 12, 16, 13, 0, -16 }, // '0
{ 232, 6, 16, 13, 3, -16 }, // '1
{ 244, 12, 16, 13, 0, -16 }, // '2
{ 268, 12, 16, 13, 0, -16 }, // '3
{ 292, 12, 16, 13, 0, -16 }, // '4
{ 316, 12, 16, 13, 0, -16 }, // '5
{ 340, 12, 16, 13, 0, -16 }, // '6
{ 364, 12, 16, 13, 0, -16 }, // '7
{ 388, 12, 16, 13, 0, -16 }, // '8
{ 412, 12, 16, 13, 0, -16 }, // '9
{ 436, 5, 9, 6, 0, -11 }, // ':
{ 442, 5, 6, 6, 0, -4 }, // ',
{ 446, 12, 16, 13, 0, -16 }, // '/
{ 470, 16, 16, 17, 0, -16 }, // '%
{ 502, 8, 10, 9, 0, -16 }, // '⁰
{ 512, 12, 16, 13, 0, -16 }, // '?
{ 536, 15, 16, 17, 0, -16 }, // '@
{ 566, 13, 16, 15, 0, -16 }, // 'A
{ 592, 12, 16, 13, 0, -16 }, // 'B
{ 616, 12, 16, 13, 0, -16 }, // 'C
{ 640, 12, 16, 13, 0, -16 }, // 'D
{ 664, 11, 16, 13, 0, -16 }, // 'E
{ 686, 11, 16, 13, 0, -16 }, // 'F
{ 708, 12, 16, 13, 0, -16 }, // 'G
{ 732, 12, 16, 13, 0, -16 }, // 'H
{ 756, 4, 16, 6, 0, -16 }, // 'I
{ 764, 12, 16, 13, 0, -16 }, // 'J
{ 788, 11, 16, 13, 0, -16 }, // 'K
{ 810, 11, 16, 13, 0, -16 }, // 'L
{ 832, 14, 16, 15, 0, -16 }, // 'M
{ 860, 12, 16, 13, 0, -16 }, // 'N
{ 884, 12, 16, 13, 0, -16 }, // 'O
{ 908, 12, 16, 13, 0, -16 }, // 'P
{ 932, 12, 16, 13, 0, -16 }, // 'Q
{ 956, 12, 16, 13, 0, -16 }, // 'R
{ 980, 12, 16, 13, 0, -16 }, // 'S
{ 1004, 12, 16, 13, 0, -16 }, // 'T
{ 1028, 12, 16, 13, 0, -16 }, // 'U
{ 1052, 13, 16, 15, 0, -16 }, // 'V
{ 1078, 17, 16, 18, 0, -16 }, // 'W
{ 1112, 12, 16, 13, 0, -16 }, // 'X
{ 1136, 13, 16, 15, 0, -16 }, // 'Y
{ 1162, 12, 16, 13, 0, -16 }, // 'Z
{ 1186, 6, 16, 8, 0, -16 }, // '[
{ 1198, 12, 16, 13, 0, -16 }, // '\'
{ 1222, 6, 16, 8, 0, -16 }, // ']
{ 1234, 8, 5, 9, 0, -16 }, // '^
{ 1239, 10, 3, 12, 0, -3 }, // '_
{ 1243, 5, 4, 6, 0, -16 }, // '`
{ 1246, 10, 12, 11, 0, -12 }, // 'a
{ 1261, 10, 16, 11, 0, -16 }, // 'b
{ 1281, 10, 12, 11, 0, -12 }, // 'c
{ 1296, 10, 16, 11, 0, -16 }, // 'd
{ 1316, 10, 12, 11, 0, -12 }, // 'e
{ 1331, 8, 16, 9, 0, -16 }, // 'f
{ 1347, 10, 16, 11, 0, -12 }, // 'g
{ 1367, 10, 16, 11, 0, -16 }, // 'h
{ 1387, 5, 16, 6, 0, -16 }, // 'i
{ 1397, 6, 20, 8, 0, -16 }, // 'j
{ 1412, 10, 16, 11, 0, -16 }, // 'k
{ 1432, 6, 16, 7, 0, -16 }, // 'l
{ 1444, 13, 12, 14, 0, -12 }, // 'm
{ 1464, 10, 12, 11, 0, -12 }, // 'n
{ 1479, 10, 12, 11, 0, -12 }, // 'o
{ 1494, 10, 16, 11, 0, -12 }, // 'p
{ 1514, 10, 16, 11, 0, -12 }, // 'q
{ 1534, 8, 12, 10, 0, -12 }, // 'r
{ 1546, 10, 12, 11, 0, -12 }, // 's
{ 1561, 8, 16, 10, 0, -16 }, // 't
{ 1577, 10, 12, 11, 0, -12 }, // 'u
{ 1592, 10, 12, 11, 0, -12 }, // 'v
{ 1607, 13, 12, 14, 0, -12 }, // 'w
{ 1627, 9, 12, 11, 0, -12 }, // 'x
{ 1641, 9, 16, 11, 0, -12 }, // 'y
{ 1659, 9, 12, 11, 0, -12 } // 'z
};
const GFXfont monomaniacone12pt = {
(uint8_t *)monomaniacone12ptBitmaps,
(GFXglyph *)monomaniacone12ptGlyphs,
0x20,
0x7A,
35
};

View File

@ -0,0 +1,276 @@
// Created by ttf2gfx utility
const uint8_t monomaniacone14ptBitmaps[] = {
// Bitmap Data:
0x00 // ' '
,0x03,0x18,0xC6,0x31,0x8C,0x63,0x18,0xC6,0x00,0x0C,0x60,0x00 // '!'
,0x04,0x6E,0x6E,0x64,0x00 // '"'
,0x00,0x00,0x19,0x80,0x66,0x03,0x98,0x0C,0x60,0x33,0x83,0xFF,0x1F,0xFC,0x3F
,0xE0,0x73,0x07,0xFE,0x1F,0xFC,0x3F,0xE0,0x66,0x03,0x98,0x0C,0xE0,0x33,0x00
,0x00,0x00 // '#'
,0x00,0x00,0x30,0x03,0xE0,0x7F,0xC7,0xFF,0x33,0x19,0x98,0xCC,0xC0,0x66,0x03
,0xF0,0x0F,0xC0,0x0F,0x80,0x7E,0x03,0x18,0x18,0xCC,0xC6,0x66,0x33,0xFF,0x8F
,0xF8,0x1F,0x00,0x60,0x00,0x00 // '$'
,0x10,0x00,0x1F,0x03,0x07,0xE1,0x81,0x98,0x60,0x66,0x30,0x19,0x9C,0x07,0xE6
,0x01,0xF3,0x80,0x10,0xC0,0x00,0x61,0x00,0x19,0xF0,0x0C,0x7E,0x03,0x3B,0x81
,0x8E,0xE0,0x63,0xB8,0x30,0x7E,0x1C,0x1F,0x02,0x01,0x00 // '%'
,0x08,0x01,0xF8,0x1F,0xC0,0xC6,0x06,0x38,0x31,0x81,0x9C,0x07,0xC0,0x3C,0x61
,0xE6,0x1F,0xB0,0xCF,0x86,0x38,0x31,0xC1,0x8F,0x0F,0xFC,0x3F,0x60,0x40,0x00 // '&'
,0x06,0x66,0x00 // '''
,0x00,0xE7,0x98,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x1E,0x38,0x00 // '('
,0x01,0xC7,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x9E,0x70,0x00 // ')'
,0x00,0x06,0x70,0x7C,0x0F,0x87,0xFC,0xFF,0x8F,0xE0,0xF8,0x33,0x00,0x00 // '*'
,0x00,0x0C,0x07,0x07,0xC7,0xF3,0xF8,0x70,0x30,0x00,0x00 // '+'
,0x03,0x1C,0xC6,0x00 // ','
,0x00,0x3F,0x9F,0xC7,0xC0 // '-'
,0x00,0x18,0xC0,0x00 // '.'
,0x00,0x00,0x01,0x80,0x1C,0x00,0xC0,0x0C,0x00,0x60,0x06,0x00,0x30,0x03,0x00
,0x18,0x01,0x80,0x1C,0x00,0xC0,0x0E,0x00,0x60,0x07,0x00,0x30,0x00,0x00,0x00 // '/'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC1,0xE6,0x0F,0x30,0xF9,0x87,0xCC,0x66,0x67,0x33
,0x31,0x9B,0x8C,0xF8,0x67,0x83,0x3C,0x19,0xE0,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '0'
,0x08,0x79,0xF3,0xE4,0xC1,0x83,0x06,0x0C,0x18,0x30,0x60,0xC1,0x83,0x06,0x0C
,0x00 // '1'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x00,0x18,0x00,0xC0,0x1C,0x07,0xC1
,0xF8,0x1E,0x00,0xC0,0x06,0x00,0x30,0x01,0x80,0x0F,0xFC,0x3F,0xF0,0x7F,0x00 // '2'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x64,0x03,0x00,0x18,0x00,0xC1,0xFE,0x1F,0xE0
,0xFF,0x00,0x0C,0x00,0x60,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '3'
,0x00,0x00,0x06,0x00,0x30,0x11,0x81,0x8C,0x1C,0x60,0xC3,0x0E,0x18,0x60,0xC3
,0x06,0x18,0x30,0xFF,0xC7,0xFF,0x3F,0xF8,0x03,0x00,0x18,0x00,0xC0,0x00,0x00 // '4'
,0x3F,0xE3,0xFF,0x9F,0xF8,0xC0,0x06,0x00,0x30,0x01,0x80,0x0F,0xF8,0x7F,0xE1
,0xFF,0x80,0x0C,0x00,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '5'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x01,0x80,0x0F,0xF8,0x7F,0xE3
,0xFF,0x98,0x0C,0xC0,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '6'
,0x3F,0xE3,0xFF,0x9F,0xFC,0xC0,0x66,0x03,0x00,0x18,0x01,0x80,0x0C,0x00,0x60
,0x06,0x00,0x30,0x03,0x00,0x18,0x00,0xC0,0x0C,0x00,0x60,0x06,0x00,0x00,0x00 // '7'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x7F,0xE3
,0xFF,0x98,0x0C,0xC0,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '8'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x19,0x80,0xCC,0x06,0x7F,0xF3
,0xFF,0x87,0xFC,0x00,0x60,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // '9'
,0x03,0x18,0x00,0x00,0x0C,0x60,0x00 // ':'
,0x03,0x1C,0xC6,0x00 // ','
,0x00,0x00,0x01,0x80,0x1C,0x00,0xC0,0x0C,0x00,0x60,0x06,0x00,0x30,0x03,0x00
,0x18,0x01,0x80,0x1C,0x00,0xC0,0x0E,0x00,0x60,0x07,0x00,0x30,0x00,0x00,0x00 // '/'
,0x10,0x00,0x1F,0x03,0x07,0xE1,0x81,0x98,0x60,0x66,0x30,0x19,0x9C,0x07,0xE6
,0x01,0xF3,0x80,0x10,0xC0,0x00,0x61,0x00,0x19,0xF0,0x0C,0x7E,0x03,0x3B,0x81
,0x8E,0xE0,0x63,0xB8,0x30,0x7E,0x1C,0x1F,0x02,0x01,0x00 // '%'
,0x10,0x7C,0x7E,0x66,0x66,0x66,0x66,0x7E,0x7C,0x10 // '⁰'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x18,0x00,0xC0,0x1C,0x03,0xC0
,0x38,0x01,0x80,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0x00,0x00,0x00 // '?'
,0x0F,0xF0,0x1F,0xFF,0x1F,0xFF,0x8C,0x00,0x66,0x10,0x33,0x3F,0x99,0x9F,0xCC
,0xCC,0xC6,0x66,0x63,0x33,0x31,0x99,0x98,0xCC,0xFF,0xE6,0x7F,0xE3,0x08,0xC1
,0x80,0x00,0xFF,0xF0,0x3F,0xF8,0x07,0xF8,0x00 // '@'
,0x00,0x00,0x01,0x80,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x07,0xE0,0x06,0x60,0x06
,0x60,0x0E,0x30,0x0C,0x30,0x0C,0x30,0x1F,0xF8,0x1F,0xF8,0x1F,0xF8,0x38,0x0C
,0x30,0x0C,0x30,0x0C,0x00,0x04 // 'A'
,0x3F,0x03,0xFE,0x1F,0xF8,0xC0,0xC6,0x06,0x30,0x31,0x81,0x8F,0xFC,0x7F,0xE3
,0xFF,0x18,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCF,0xFC,0x7F,0xE1,0xF8,0x00 // 'B'
,0x0F,0x01,0xFF,0x1F,0xF8,0xC0,0xE6,0x02,0x30,0x01,0x80,0x0C,0x00,0x60,0x03
,0x00,0x18,0x00,0xC0,0x06,0x00,0x30,0x11,0x81,0xCF,0xFC,0x3F,0xE0,0x78,0x00 // 'C'
,0x3F,0x03,0xFF,0x1F,0xF8,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCC,0x0E,0x60,0x73
,0x03,0x98,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCF,0xFC,0x7F,0xE1,0xF8,0x00 // 'D'
,0x3F,0xC7,0xFE,0x7F,0xE6,0x00,0x60,0x06,0x00,0x60,0x07,0xF8,0x7F,0xC7,0xFC
,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x07,0xFE,0x7F,0xE3,0xFC // 'E'
,0x3F,0xC7,0xFE,0x7F,0xE6,0x00,0x60,0x06,0x00,0x60,0x07,0xF8,0x7F,0xC7,0xFC
,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x00,0x00 // 'F'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x01,0x80,0x0C,0x3C,0x63,0xF3
,0x0F,0x98,0x0C,0xC0,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // 'G'
,0x00,0x23,0x03,0x98,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCF,0xFE,0x7F,0xF3
,0xFF,0x98,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCC,0x0E,0x60,0x70,0x01,0x00 // 'H'
,0x06,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x60 // 'I'
,0x00,0x20,0x03,0x80,0x1C,0x00,0xE0,0x07,0x00,0x38,0x01,0xC0,0x0E,0x00,0x70
,0x03,0x80,0x1C,0x00,0xE6,0x07,0x30,0x39,0x81,0xCF,0xFC,0x3F,0xE0,0x78,0x00 // 'J'
,0x00,0x06,0x06,0x60,0xC6,0x18,0x63,0x06,0x60,0x7E,0x07,0xC0,0x78,0x07,0x80
,0x7C,0x07,0xC0,0x66,0x06,0x30,0x61,0x86,0x0C,0x60,0x60,0x00 // 'K'
,0x00,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x06,0x00
,0x60,0x06,0x00,0x60,0x06,0x00,0x60,0x07,0xFE,0x7F,0xE3,0xFC // 'L'
,0x00,0x00,0xC0,0x19,0x80,0x73,0x80,0xE7,0x03,0xCF,0x07,0x9E,0x1F,0x3E,0x3E
,0x6C,0xCC,0xCF,0x99,0x9E,0x33,0x1C,0x66,0x30,0xCC,0x21,0x98,0x03,0x30,0x06
,0x60,0x0C,0x00,0x00 // 'M'
,0x00,0x03,0x01,0x9C,0x0C,0xE0,0x67,0x83,0x3C,0x19,0xF0,0xCD,0x86,0x66,0x33
,0x19,0x98,0xCC,0xC3,0xE6,0x1F,0x30,0x79,0x83,0xCC,0x0E,0x60,0x30,0x00,0x00 // 'N'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x19,0x80,0xCC,0x06,0x60,0x33
,0x01,0x98,0x0C,0xC0,0x66,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // 'O'
,0x3F,0x03,0xFF,0x1F,0xF8,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCC,0x0E,0x7F,0xE3
,0xFF,0x1F,0xC0,0xC0,0x06,0x00,0x30,0x01,0x80,0x0C,0x00,0x60,0x00,0x00,0x00 // 'P'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x19,0x80,0xCC,0x06,0x60,0x33
,0x01,0x98,0x0C,0xC4,0x66,0x33,0x30,0xF9,0x87,0xCF,0xFE,0x3F,0xF0,0x7F,0x00 // 'Q'
,0x3F,0x03,0xFF,0x1F,0xF8,0xC0,0x66,0x03,0x30,0x19,0x80,0xCC,0x06,0x7F,0xE3
,0xFF,0x1F,0xF0,0xC3,0x86,0x0C,0x30,0x61,0x81,0x8C,0x0C,0x60,0x30,0x00,0x00 // 'R'
,0x0F,0x81,0xFF,0x1F,0xFC,0xC0,0x66,0x03,0x30,0x01,0x80,0x0F,0x00,0x3F,0x00
,0x3E,0x00,0x38,0x00,0x60,0x03,0x30,0x19,0x80,0xCF,0xFE,0x3F,0xE0,0x7C,0x00 // 'S'
,0x3F,0xE3,0xFF,0x9F,0xF8,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00
,0x30,0x01,0x80,0x0C,0x00,0x60,0x03,0x00,0x18,0x00,0xC0,0x06,0x00,0x00,0x00 // 'T'
,0x00,0x23,0x03,0x98,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCC,0x0E,0x60,0x73
,0x03,0x98,0x1C,0xC0,0xE6,0x07,0x30,0x39,0x81,0xCF,0xFC,0x3F,0xE0,0x78,0x00 // 'U'
,0x00,0x04,0x30,0x0C,0x30,0x0C,0x38,0x0C,0x18,0x18,0x18,0x18,0x1C,0x18,0x0C
,0x30,0x0C,0x30,0x0E,0x30,0x06,0x60,0x06,0x60,0x07,0xE0,0x03,0xC0,0x03,0xC0
,0x03,0xC0,0x01,0x80,0x00,0x00 // 'V'
,0x00,0x00,0x0C,0x00,0x31,0x80,0x06,0x30,0x00,0xC7,0x0C,0x18,0x61,0x86,0x0C
,0x30,0xC1,0x8F,0x18,0x31,0xE3,0x03,0x3C,0xE0,0x6F,0xD8,0x0F,0x9F,0x01,0xF3
,0xE0,0x3E,0x7C,0x03,0x87,0x00,0x70,0xE0,0x0E,0x1C,0x00,0x80,0x00 // 'W'
,0x00,0x01,0x81,0x8E,0x1C,0x30,0xC1,0xCC,0x06,0x60,0x3E,0x00,0xF0,0x07,0x00
,0x38,0x01,0xE0,0x1F,0x00,0xCC,0x0E,0x60,0x61,0x87,0x0E,0x30,0x30,0x00,0x00 // 'X'
,0x00,0x00,0x30,0x0C,0x38,0x1C,0x18,0x18,0x0C,0x30,0x0E,0x30,0x06,0x60,0x03
,0xE0,0x03,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80
,0x01,0x80,0x01,0x80,0x00,0x00 // 'Y'
,0x1F,0xF0,0xFF,0xC3,0xFF,0x00,0x18,0x00,0x60,0x03,0x00,0x1C,0x00,0x60,0x03
,0x00,0x0C,0x00,0x60,0x01,0x80,0x0C,0x00,0x70,0x01,0x80,0x0F,0xFC,0x3F,0xF0
,0x7F,0x80 // 'Z'
,0x31,0xE7,0x98,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x1E,0x78,0xC0 // '['
,0x00,0x01,0x80,0x0E,0x00,0x30,0x01,0xC0,0x06,0x00,0x38,0x00,0xC0,0x03,0x00
,0x18,0x00,0x60,0x03,0x00,0x0C,0x00,0x60,0x01,0x80,0x0E,0x00,0x30,0x00,0x00 // '\'
,0x31,0xE7,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x9E,0x78,0xC0 // ']'
,0x00,0x18,0x3C,0x7E,0x46,0x00 // '^'
,0x00,0x0F,0xF9,0xFF,0x1F,0xC0 // '_'
,0x00,0x83,0x0C,0x00 // '`'
,0x1E,0x0F,0xE1,0xF8,0x06,0x01,0x87,0xE7,0xF9,0xFE,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x87,0x80 // 'a'
,0x00,0x18,0x06,0x01,0x80,0x7E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x98,0x66,0x19,0xFE,0x7F,0x87,0x80 // 'b'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x06,0x01,0x80,0x60,0x18,0x66,0x19,0xFE
,0x7F,0x87,0x80 // 'c'
,0x00,0x00,0x60,0x18,0x06,0x1F,0x9F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x98,0x66,0x19,0xFE,0x7F,0x87,0x80 // 'd'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x67,0xF9,0xFE,0x7E,0x18,0x06,0x01,0xF8
,0x7F,0x07,0x80 // 'e'
,0x1C,0x7E,0x7E,0x60,0x7C,0x7E,0x7E,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60
,0x60,0x60,0x00 // 'f'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x87,0xE0,0x18,0x7E,0x3F,0x87,0x80 // 'g'
,0x00,0x18,0x06,0x01,0x80,0x7E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x98,0x66,0x19,0x86,0x61,0x80,0x00 // 'h'
,0x03,0x18,0x02,0x31,0x8C,0x63,0x18,0xC6,0x31,0x8C,0x60,0x00 // 'i'
,0x00,0x61,0x80,0x00,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x86,0x18,0x61,0x9E
,0x70,0x00 // 'j'
,0x00,0x18,0x06,0x01,0x80,0x60,0x18,0xE6,0x71,0x98,0x7C,0x1E,0x07,0x81,0xE0
,0x7C,0x1F,0x86,0x61,0x8C,0x61,0x80,0x00 // 'k'
,0x03,0x18,0xC6,0x31,0x8C,0x63,0x18,0xC6,0x31,0x8E,0x70,0x00 // 'l'
,0x18,0xC1,0xFF,0xC7,0xFF,0x98,0xCE,0x63,0x39,0x8C,0xE6,0x33,0x98,0xCE,0x63
,0x39,0x8C,0xE6,0x33,0x98,0xCE,0x63,0x38,0x00,0x00 // 'm'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0x86
,0x61,0x80,0x00 // 'n'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x87,0x80 // 'o'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x9F,0x86,0x01,0x80,0x60,0x00,0x00 // 'p'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x87,0xE0,0x18,0x06,0x01,0x80,0x00 // 'q'
,0x1E,0x3F,0x9F,0x8C,0x06,0x03,0x01,0x80,0xC0,0x60,0x30,0x18,0x0C,0x06,0x00
,0x00 // 'r'
,0x1E,0x1F,0xE7,0xF9,0x86,0x61,0x9C,0x03,0xE0,0x7C,0x03,0x98,0x66,0x19,0xFE
,0x7F,0x87,0x80 // 's'
,0x00,0x30,0x18,0x0C,0x07,0xE3,0xF9,0xF8,0xC0,0x60,0x30,0x18,0x0C,0x06,0x03
,0x01,0x80,0xFC,0x7F,0x0F,0x00 // 't'
,0x00,0x18,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0x86,0x61,0x98,0x66,0x19,0xFE
,0x7F,0x87,0x80 // 'u'
,0x00,0x43,0x0C,0x30,0xC3,0x0C,0x19,0xC1,0x98,0x19,0x81,0xF8,0x0F,0x00,0xF0
,0x0F,0x00,0x70,0x06,0x00,0x00 // 'v'
,0x00,0x08,0x63,0x38,0xCE,0x61,0x9C,0xC3,0x39,0x83,0xFF,0x07,0xFC,0x0F,0xF8
,0x1F,0xF0,0x3D,0xE0,0x39,0xC0,0x73,0x00,0xC6,0x00,0x00,0x00 // 'w'
,0x00,0x86,0x30,0xC6,0x0D,0xC1,0xF0,0x1E,0x03,0x80,0x70,0x0E,0x03,0xE0,0x6C
,0x18,0xC3,0x18,0x01,0x00 // 'x'
,0x00,0x86,0x38,0xC6,0x18,0xC1,0x98,0x36,0x07,0xC0,0xF8,0x0F,0x01,0xC0,0x38
,0x07,0x00,0xE0,0x18,0x03,0x01,0xE0,0x38,0x00,0x00 // 'y'
,0x1F,0x87,0xF0,0xFE,0x01,0x80,0x30,0x0E,0x01,0x80,0x70,0x0C,0x03,0x80,0x60
,0x1F,0xC3,0xF8,0x3E,0x00 // 'z'
};
const GFXglyph monomaniacone14ptGlyphs[] = {
// bitmapOffset, width, height, xAdvance, xOffset, yOffset
{ 0, 1, 1, 7, 0, 0 }, // '
{ 1, 5, 18, 7, 1, -18 }, // '!
{ 13, 8, 5, 10, 1, -18 }, // '"
{ 18, 14, 18, 16, 1, -18 }, // '#
{ 50, 13, 22, 16, 1, -20 }, // '$
{ 86, 18, 18, 20, 1, -18 }, // '%
{ 127, 13, 18, 15, 1, -18 }, // '&
{ 157, 4, 5, 6, 1, -18 }, // ''
{ 160, 6, 18, 9, 1, -18 }, // '(
{ 174, 6, 18, 9, 1, -18 }, // ')
{ 188, 11, 10, 14, 1, -18 }, // '*
{ 202, 9, 9, 12, 1, -12 }, // '+
{ 213, 5, 6, 7, 1, -4 }, // ',
{ 217, 9, 4, 12, 1, -9 }, // '-
{ 222, 5, 5, 7, 1, -5 }, // '.
{ 226, 13, 18, 15, 0, -18 }, // '/
{ 256, 13, 18, 16, 1, -18 }, // '0
{ 286, 7, 18, 16, 4, -18 }, // '1
{ 302, 13, 18, 16, 1, -18 }, // '2
{ 332, 13, 18, 16, 1, -18 }, // '3
{ 362, 13, 18, 16, 1, -18 }, // '4
{ 392, 13, 18, 16, 1, -18 }, // '5
{ 422, 13, 18, 16, 1, -18 }, // '6
{ 452, 13, 18, 16, 1, -18 }, // '7
{ 482, 13, 18, 16, 1, -18 }, // '8
{ 512, 13, 18, 16, 1, -18 }, // '9
{ 542, 5, 10, 7, 1, -12 }, // ':
{ 549, 5, 6, 7, 1, -4 }, // ',
{ 553, 13, 18, 15, 0, -18 }, // '/
{ 583, 18, 18, 20, 1, -18 }, // '%
{ 624, 8, 10, 10, 1, -18 }, // '⁰
{ 634, 13, 18, 16, 1, -18 }, // '?
{ 664, 17, 18, 19, 1, -18 }, // '@
{ 703, 16, 18, 17, 0, -18 }, // 'A
{ 739, 13, 18, 15, 1, -18 }, // 'B
{ 769, 13, 18, 15, 1, -18 }, // 'C
{ 799, 13, 18, 15, 1, -18 }, // 'D
{ 829, 12, 18, 15, 1, -18 }, // 'E
{ 856, 12, 18, 15, 1, -18 }, // 'F
{ 883, 13, 18, 16, 1, -18 }, // 'G
{ 913, 13, 18, 15, 1, -18 }, // 'H
{ 943, 4, 18, 6, 1, -18 }, // 'I
{ 952, 13, 18, 15, 1, -18 }, // 'J
{ 982, 12, 18, 15, 1, -18 }, // 'K
{ 1009, 12, 18, 15, 1, -18 }, // 'L
{ 1036, 15, 18, 18, 1, -18 }, // 'M
{ 1070, 13, 18, 16, 1, -18 }, // 'N
{ 1100, 13, 18, 16, 1, -18 }, // 'O
{ 1130, 13, 18, 15, 1, -18 }, // 'P
{ 1160, 13, 18, 16, 1, -18 }, // 'Q
{ 1190, 13, 18, 16, 1, -18 }, // 'R
{ 1220, 13, 18, 16, 1, -18 }, // 'S
{ 1250, 13, 18, 15, 1, -18 }, // 'T
{ 1280, 13, 18, 15, 1, -18 }, // 'U
{ 1310, 16, 18, 17, 0, -18 }, // 'V
{ 1346, 19, 18, 21, 1, -18 }, // 'W
{ 1389, 13, 18, 15, 0, -18 }, // 'X
{ 1419, 16, 18, 17, 0, -18 }, // 'Y
{ 1455, 14, 18, 15, 0, -18 }, // 'Z
{ 1487, 6, 18, 9, 1, -18 }, // '[
{ 1501, 13, 18, 15, 0, -18 }, // '\'
{ 1531, 6, 18, 9, 1, -18 }, // ']
{ 1545, 8, 6, 10, 1, -19 }, // '^
{ 1551, 11, 4, 14, 1, -4 }, // '_
{ 1557, 6, 5, 7, 0, -19 }, // '`
{ 1561, 10, 14, 13, 1, -14 }, // 'a
{ 1579, 10, 18, 13, 1, -18 }, // 'b
{ 1602, 10, 14, 13, 1, -14 }, // 'c
{ 1620, 10, 18, 13, 1, -18 }, // 'd
{ 1643, 10, 14, 13, 1, -14 }, // 'e
{ 1661, 8, 18, 11, 1, -18 }, // 'f
{ 1679, 10, 18, 13, 1, -14 }, // 'g
{ 1702, 10, 18, 13, 1, -18 }, // 'h
{ 1725, 5, 18, 7, 1, -18 }, // 'i
{ 1737, 6, 22, 9, 1, -18 }, // 'j
{ 1754, 10, 18, 13, 1, -18 }, // 'k
{ 1777, 5, 18, 8, 1, -18 }, // 'l
{ 1789, 14, 14, 16, 1, -14 }, // 'm
{ 1814, 10, 14, 13, 1, -14 }, // 'n
{ 1832, 10, 14, 13, 1, -14 }, // 'o
{ 1850, 10, 18, 13, 1, -14 }, // 'p
{ 1873, 10, 18, 13, 1, -14 }, // 'q
{ 1896, 9, 14, 11, 1, -14 }, // 'r
{ 1912, 10, 14, 13, 1, -14 }, // 's
{ 1930, 9, 18, 11, 1, -18 }, // 't
{ 1951, 10, 14, 13, 1, -14 }, // 'u
{ 1969, 12, 14, 13, 0, -14 }, // 'v
{ 1990, 15, 14, 16, 0, -14 }, // 'w
{ 2017, 11, 14, 12, 0, -14 }, // 'x
{ 2037, 11, 18, 12, 0, -14 }, // 'y
{ 2062, 11, 14, 12, 0, -14 } // 'z
};
const GFXfont monomaniacone14pt = {
(uint8_t *)monomaniacone14ptBitmaps,
(GFXglyph *)monomaniacone14ptGlyphs,
0x20,
0x7A,
40
};

View File

@ -10,11 +10,11 @@ const uint8_t monomaniacone20ptBitmaps[] = {
,0x07,0x9E,0x00,0x79,0xE0,0x3F,0xFF,0x87,0xFF,0xFC,0x7F,0xFF,0x81,0xFF,0xF0 ,0x07,0x9E,0x00,0x79,0xE0,0x3F,0xFF,0x87,0xFF,0xFC,0x7F,0xFF,0x81,0xFF,0xF0
,0x0F,0x3C,0x00,0xE3,0xC0,0x0E,0x38,0x01,0xE3,0x80,0x1E,0x78,0x01,0xE7,0x80 ,0x0F,0x3C,0x00,0xE3,0xC0,0x0E,0x38,0x01,0xE3,0x80,0x1E,0x78,0x01,0xE7,0x80
,0x1C,0x78,0x00,0x80,0x00 // '#' ,0x1C,0x78,0x00,0x80,0x00 // '#'
,0x00,0x00,0x00,0x1C,0x00,0x03,0x80,0x01,0xFC,0x01,0xFF,0xF0,0x7F,0xFF,0x0F ,0x00,0x40,0x00,0x1C,0x00,0x0F,0xE0,0x0F,0xFF,0x83,0xFF,0xF8,0x7F,0xFF,0x1E
,0xFF,0xE3,0xC7,0x1E,0x78,0xE3,0xCF,0x1C,0x79,0xE3,0x80,0x3C,0x70,0x07,0x8E ,0x38,0xF3,0xC7,0x1E,0x78,0xE3,0xCF,0x1C,0x01,0xE3,0x80,0x3C,0x70,0x03,0xFE
,0x00,0x7F,0xC0,0x0F,0xF8,0x00,0x7F,0xC0,0x03,0xFE,0x00,0x1F,0xF0,0x03,0xFE ,0x00,0x7F,0xC0,0x03,0xFE,0x00,0x1F,0xF0,0x00,0xFF,0x80,0x1F,0xF0,0x03,0x8F
,0x00,0x71,0xE0,0x0E,0x3C,0x01,0xC7,0x9E,0x38,0xF3,0xC7,0x1E,0x78,0xE3,0xC7 ,0x00,0x71,0xE0,0x0E,0x3C,0xF1,0xC7,0x9E,0x38,0xF3,0xC7,0x1E,0x3F,0xFF,0x87
,0xFF,0xF0,0xFF,0xFE,0x0F,0xFF,0x80,0x3F,0x80,0x01,0xC0,0x00,0x10,0x00 // '$' ,0xFF,0xF0,0x7F,0xFC,0x01,0xFC,0x00,0x0E,0x00,0x01,0xC0,0x00,0x00,0x00 // '$'
,0x06,0x00,0x00,0x07,0xE0,0x1E,0x03,0xFC,0x07,0x01,0xFF,0x03,0xC0,0x79,0xE0 ,0x06,0x00,0x00,0x07,0xE0,0x1E,0x03,0xFC,0x07,0x01,0xFF,0x03,0xC0,0x79,0xE0
,0xE0,0x1E,0x78,0x78,0x07,0x9E,0x1C,0x01,0xE7,0x8F,0x00,0x7F,0xE7,0x80,0x1F ,0xE0,0x1E,0x78,0x78,0x07,0x9E,0x1C,0x01,0xE7,0x8F,0x00,0x7F,0xE7,0x80,0x1F
,0xF1,0xE0,0x03,0xFC,0xF0,0x00,0x7E,0x3C,0x00,0x00,0x1E,0x00,0x00,0x07,0x80 ,0xF1,0xE0,0x03,0xFC,0xF0,0x00,0x7E,0x3C,0x00,0x00,0x1E,0x00,0x00,0x07,0x80
@ -59,7 +59,7 @@ const uint8_t monomaniacone20ptBitmaps[] = {
,0xF8,0x0F,0xFF,0x00,0xFF,0xF0,0x00,0x1E,0x00,0x03,0xC0,0x00,0x78,0xC0,0x0F ,0xF8,0x0F,0xFF,0x00,0xFF,0xF0,0x00,0x1E,0x00,0x03,0xC0,0x00,0x78,0xC0,0x0F
,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00 ,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00
,0x7F,0x00 // '3' ,0x7F,0x00 // '3'
,0x00,0x00,0x00,0x03,0xC0,0x00,0x78,0x00,0x0F,0x00,0x21,0xE0,0x0F,0x3C,0x03 ,0x00,0x00,0x00,0x03,0xC0,0x00,0x78,0x00,0x0F,0x00,0x01,0xE0,0x0E,0x3C,0x03
,0xC7,0x80,0x78,0xF0,0x1E,0x1E,0x03,0xC3,0xC0,0xF0,0x78,0x1E,0x0F,0x07,0x81 ,0xC7,0x80,0x78,0xF0,0x1E,0x1E,0x03,0xC3,0xC0,0xF0,0x78,0x1E,0x0F,0x07,0x81
,0xE0,0xF0,0x3C,0x1E,0x07,0x83,0xC0,0xF0,0x78,0x1E,0x0F,0xFF,0xF9,0xFF,0xFF ,0xE0,0xF0,0x3C,0x1E,0x07,0x83,0xC0,0xF0,0x78,0x1E,0x0F,0xFF,0xF9,0xFF,0xFF
,0x3F,0xFF,0xE1,0xFF,0xF0,0x00,0x3C,0x00,0x07,0x80,0x00,0xF0,0x00,0x1E,0x00 ,0x3F,0xFF,0xE1,0xFF,0xF0,0x00,0x3C,0x00,0x07,0x80,0x00,0xF0,0x00,0x1E,0x00
@ -85,20 +85,24 @@ const uint8_t monomaniacone20ptBitmaps[] = {
,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00 ,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00
,0x7F,0x00 // '8' ,0x7F,0x00 // '8'
,0x03,0xF8,0x03,0xFF,0xE0,0xFF,0xFE,0x1F,0xFF,0xC7,0x80,0x3C,0xF0,0x07,0x9E ,0x03,0xF8,0x03,0xFF,0xE0,0xFF,0xFE,0x1F,0xFF,0xC7,0x80,0x3C,0xF0,0x07,0x9E
,0x00,0xF3,0xC0,0x1E,0x78,0x03,0xCF,0x00,0x79,0xE0,0x0F,0x3C,0x01,0xE3,0xFF ,0x00,0xF3,0xC0,0x1E,0x78,0x03,0xCF,0x00,0x79,0xE0,0x0F,0x3C,0x01,0xE7,0xFF
,0xFC,0x7F,0xFF,0x87,0xFF,0xF0,0x1F,0xFE,0x00,0x03,0xC0,0x00,0x78,0xC0,0x0F ,0xFC,0x7F,0xFF,0x8F,0xFF,0xF0,0x7F,0xFE,0x00,0x03,0xC0,0x00,0x78,0x00,0x0F
,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00 ,0x3C,0x01,0xE7,0x80,0x3C,0xF0,0x07,0x8F,0xFF,0xE1,0xFF,0xFC,0x1F,0xFF,0x00
,0x7F,0x00 // '9' ,0x7F,0x00 // '9'
,0x00,0x71,0xF3,0xE3,0x80,0x00,0x00,0x00,0x71,0xF3,0xE3,0x80,0x00 // ':' ,0x00,0x71,0xF3,0xE3,0x80,0x00,0x00,0x00,0x71,0xF3,0xE3,0x80,0x00 // ':'
,0x00,0x71,0xF3,0xE3,0x80,0x00,0x00,0x38,0xF9,0xF3,0xE3,0x87,0x1E,0x00 // ';' ,0x00,0x71,0xF3,0xE7,0xC7,0x0E,0x3C,0x00 // ','
,0x00,0x20,0x01,0xE0,0x0F,0x80,0x7C,0x03,0xE0,0x1E,0x00,0xF0,0x07,0x80,0x3C ,0x00,0x00,0x00,0x01,0xE0,0x00,0x78,0x00,0x3C,0x00,0x0F,0x00,0x07,0x80,0x01
,0x01,0xF0,0x07,0xC0,0x0F,0x00,0x1E,0x00,0x3C,0x00,0x78,0x00,0xF0,0x01,0xE0 ,0xC0,0x00,0xF0,0x00,0x38,0x00,0x1E,0x00,0x0F,0x00,0x03,0xC0,0x01,0xE0,0x00
,0x03,0xC0,0x07,0x80,0x08 // '<' ,0x78,0x00,0x3C,0x00,0x0F,0x00,0x07,0x80,0x01,0xC0,0x00,0xF0,0x00,0x38,0x00
,0x00,0x03,0xFF,0x9F,0xFC,0xFF,0xE1,0xFE,0x00,0x00,0x00,0x0F,0xFE,0x7F,0xF3 ,0x1E,0x00,0x0F,0x00,0x03,0xC0,0x01,0xE0,0x00,0x78,0x00,0x00,0x00,0x00 // '/'
,0xFF,0x87,0xF8 // '=' ,0x06,0x00,0x00,0x07,0xE0,0x1E,0x03,0xFC,0x07,0x01,0xFF,0x03,0xC0,0x79,0xE0
,0x10,0x01,0xE0,0x07,0xC0,0x0F,0x80,0x1F,0x00,0x3E,0x00,0x3C,0x00,0x78,0x00 ,0xE0,0x1E,0x78,0x78,0x07,0x9E,0x1C,0x01,0xE7,0x8F,0x00,0x7F,0xE7,0x80,0x1F
,0xF0,0x03,0xE0,0x0F,0x80,0x3C,0x01,0xE0,0x0F,0x00,0x78,0x03,0xC0,0x1E,0x00 ,0xF1,0xE0,0x03,0xFC,0xF0,0x00,0x7E,0x3C,0x00,0x00,0x1E,0x00,0x00,0x07,0x80
,0xF0,0x07,0x80,0x04,0x00 // '>' ,0x00,0x03,0xC7,0xE0,0x00,0xE3,0xFC,0x00,0x78,0xFF,0x00,0x1C,0x7F,0xE0,0x0F
,0x1E,0x78,0x07,0x87,0x9E,0x01,0xE1,0xE7,0x80,0xF0,0x79,0xE0,0x3C,0x1F,0xF8
,0x1E,0x03,0xFC,0x07,0x80,0x7E,0x00,0x00,0x06,0x00 // '%'
,0x06,0x01,0xF8,0x3F,0xC7,0xFC,0x79,0xE7,0x9E,0x79,0xE7,0x9E,0x79,0xE7,0x9E
,0x79,0xE7,0xFC,0x3F,0xC1,0xF8,0x06,0x00 // '⁰'
,0x03,0xF8,0x03,0xFF,0xE0,0xFF,0xFE,0x1F,0xFF,0xC7,0x80,0x3C,0xF0,0x07,0x9E ,0x03,0xF8,0x03,0xFF,0xE0,0xFF,0xFE,0x1F,0xFF,0xC7,0x80,0x3C,0xF0,0x07,0x9E
,0x00,0xF3,0xC0,0x1E,0x70,0x03,0xC0,0x00,0x78,0x00,0x3E,0x00,0x1F,0xC0,0x07 ,0x00,0xF3,0xC0,0x1E,0x70,0x03,0xC0,0x00,0x78,0x00,0x3E,0x00,0x1F,0xC0,0x07
,0xE0,0x01,0xF0,0x00,0x38,0x00,0x07,0x00,0x00,0xE0,0x00,0x1C,0x00,0x00,0x00 ,0xE0,0x01,0xF0,0x00,0x38,0x00,0x07,0x00,0x00,0xE0,0x00,0x1C,0x00,0x00,0x00
@ -297,7 +301,7 @@ const uint8_t monomaniacone20ptBitmaps[] = {
,0xC0,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xE0,0x0F,0x00,0x78,0x03,0xC0,0x1E ,0xC0,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xE0,0x0F,0x00,0x78,0x03,0xC0,0x1E
,0x00,0x00,0x00 // 'r' ,0x00,0x00,0x00 // 'r'
,0x07,0xC0,0x3F,0xF0,0xFF,0xF3,0xFF,0xE7,0x83,0xCF,0x03,0x9E,0x07,0x3C,0x00 ,0x07,0xC0,0x3F,0xF0,0xFF,0xF3,0xFF,0xE7,0x83,0xCF,0x03,0x9E,0x07,0x3C,0x00
,0x3F,0x00,0x3F,0xC0,0x3F,0xE0,0x0F,0xE0,0x03,0xCE,0x03,0x9E,0x07,0x3C,0x1E ,0x3F,0x80,0x7F,0xC0,0x3F,0xE0,0x0F,0xE0,0x03,0xCE,0x03,0x9E,0x07,0x3C,0x1E
,0x7F,0xFC,0x7F,0xF8,0x7F,0xE0,0x3E,0x00 // 's' ,0x7F,0xFC,0x7F,0xF8,0x7F,0xE0,0x3E,0x00 // 's'
,0x00,0x03,0xC0,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xFF,0x0F,0xFE,0x7F,0xF3 ,0x00,0x03,0xC0,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xFF,0x0F,0xFE,0x7F,0xF3
,0xFF,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xE0,0x0F,0x00,0x78,0x03,0xC0,0x1E ,0xFF,0x1E,0x00,0xF0,0x07,0x80,0x3C,0x01,0xE0,0x0F,0x00,0x78,0x03,0xC0,0x1E
@ -329,7 +333,7 @@ const GFXglyph monomaniacone20ptGlyphs[] = {
{ 1, 7, 26, 10, 1, -26 }, // '! { 1, 7, 26, 10, 1, -26 }, // '!
{ 24, 11, 7, 14, 1, -26 }, // '" { 24, 11, 7, 14, 1, -26 }, // '"
{ 34, 20, 26, 23, 1, -26 }, // '# { 34, 20, 26, 23, 1, -26 }, // '#
{ 99, 19, 31, 22, 1, -29 }, // '$ { 99, 19, 31, 22, 1, -28 }, // '$
{ 173, 26, 26, 29, 1, -26 }, // '% { 173, 26, 26, 29, 1, -26 }, // '%
{ 258, 19, 26, 21, 1, -26 }, // '& { 258, 19, 26, 21, 1, -26 }, // '&
{ 320, 6, 7, 9, 1, -26 }, // '' { 320, 6, 7, 9, 1, -26 }, // ''
@ -352,70 +356,70 @@ const GFXglyph monomaniacone20ptGlyphs[] = {
{ 984, 19, 26, 22, 1, -26 }, // '8 { 984, 19, 26, 22, 1, -26 }, // '8
{ 1046, 19, 26, 22, 1, -26 }, // '9 { 1046, 19, 26, 22, 1, -26 }, // '9
{ 1108, 7, 14, 10, 1, -17 }, // ': { 1108, 7, 14, 10, 1, -17 }, // ':
{ 1121, 7, 16, 10, 1, -16 }, // '; { 1121, 7, 9, 10, 1, -6 }, // ',
{ 1135, 14, 20, 17, 1, -20 }, // '< { 1129, 18, 26, 21, 1, -26 }, // '/
{ 1170, 13, 11, 17, 1, -17 }, // '= { 1188, 26, 26, 29, 1, -26 }, // '%
{ 1188, 14, 20, 17, 1, -20 }, // '> { 1273, 12, 15, 15, 1, -26 }, // '⁰
{ 1223, 19, 26, 22, 1, -26 }, // '? { 1296, 19, 26, 22, 1, -26 }, // '?
{ 1285, 24, 26, 28, 1, -26 }, // '@ { 1358, 24, 26, 28, 1, -26 }, // '@
{ 1363, 21, 26, 24, 1, -26 }, // 'A { 1436, 21, 26, 24, 1, -26 }, // 'A
{ 1432, 18, 26, 22, 1, -26 }, // 'B { 1505, 18, 26, 22, 1, -26 }, // 'B
{ 1491, 18, 26, 22, 1, -26 }, // 'C { 1564, 18, 26, 22, 1, -26 }, // 'C
{ 1550, 18, 26, 22, 1, -26 }, // 'D { 1623, 18, 26, 22, 1, -26 }, // 'D
{ 1609, 18, 26, 21, 1, -26 }, // 'E { 1682, 18, 26, 21, 1, -26 }, // 'E
{ 1668, 18, 26, 21, 1, -26 }, // 'F { 1741, 18, 26, 21, 1, -26 }, // 'F
{ 1727, 19, 26, 22, 1, -26 }, // 'G { 1800, 19, 26, 22, 1, -26 }, // 'G
{ 1789, 18, 26, 22, 1, -26 }, // 'H { 1862, 18, 26, 22, 1, -26 }, // 'H
{ 1848, 6, 26, 9, 1, -26 }, // 'I { 1921, 6, 26, 9, 1, -26 }, // 'I
{ 1868, 18, 26, 22, 1, -26 }, // 'J { 1941, 18, 26, 22, 1, -26 }, // 'J
{ 1927, 18, 26, 21, 1, -26 }, // 'K { 2000, 18, 26, 21, 1, -26 }, // 'K
{ 1986, 18, 26, 21, 1, -26 }, // 'L { 2059, 18, 26, 21, 1, -26 }, // 'L
{ 2045, 22, 26, 25, 1, -26 }, // 'M { 2118, 22, 26, 25, 1, -26 }, // 'M
{ 2117, 19, 26, 22, 1, -26 }, // 'N { 2190, 19, 26, 22, 1, -26 }, // 'N
{ 2179, 19, 26, 22, 1, -26 }, // 'O { 2252, 19, 26, 22, 1, -26 }, // 'O
{ 2241, 18, 26, 22, 1, -26 }, // 'P { 2314, 18, 26, 22, 1, -26 }, // 'P
{ 2300, 19, 26, 22, 1, -26 }, // 'Q { 2373, 19, 26, 22, 1, -26 }, // 'Q
{ 2362, 19, 26, 22, 1, -26 }, // 'R { 2435, 19, 26, 22, 1, -26 }, // 'R
{ 2424, 19, 26, 22, 1, -26 }, // 'S { 2497, 19, 26, 22, 1, -26 }, // 'S
{ 2486, 18, 26, 22, 1, -26 }, // 'T { 2559, 18, 26, 22, 1, -26 }, // 'T
{ 2545, 18, 26, 22, 1, -26 }, // 'U { 2618, 18, 26, 22, 1, -26 }, // 'U
{ 2604, 21, 26, 24, 1, -26 }, // 'V { 2677, 21, 26, 24, 1, -26 }, // 'V
{ 2673, 27, 26, 30, 1, -26 }, // 'W { 2746, 27, 26, 30, 1, -26 }, // 'W
{ 2761, 18, 26, 21, 1, -26 }, // 'X { 2834, 18, 26, 21, 1, -26 }, // 'X
{ 2820, 21, 26, 24, 1, -26 }, // 'Y { 2893, 21, 26, 24, 1, -26 }, // 'Y
{ 2889, 19, 26, 22, 1, -26 }, // 'Z { 2962, 19, 26, 22, 1, -26 }, // 'Z
{ 2951, 9, 26, 13, 1, -26 }, // '[ { 3024, 9, 26, 13, 1, -26 }, // '[
{ 2981, 18, 26, 21, 1, -26 }, // '\ { 3054, 18, 26, 21, 1, -26 }, // '\'
{ 3040, 9, 26, 12, 1, -26 }, // '] { 3113, 9, 26, 12, 1, -26 }, // ']
{ 3070, 12, 8, 15, 1, -26 }, // '^ { 3143, 12, 8, 15, 1, -26 }, // '^
{ 3082, 16, 5, 19, 1, -5 }, // '_ { 3155, 16, 5, 19, 1, -5 }, // '_
{ 3092, 7, 7, 10, 1, -27 }, // '` { 3165, 7, 7, 10, 1, -27 }, // '`
{ 3099, 15, 20, 18, 1, -20 }, // 'a { 3172, 15, 20, 18, 1, -20 }, // 'a
{ 3137, 15, 26, 18, 1, -26 }, // 'b { 3210, 15, 26, 18, 1, -26 }, // 'b
{ 3186, 15, 20, 18, 1, -20 }, // 'c { 3259, 15, 20, 18, 1, -20 }, // 'c
{ 3224, 15, 26, 18, 1, -26 }, // 'd { 3297, 15, 26, 18, 1, -26 }, // 'd
{ 3273, 15, 20, 18, 1, -20 }, // 'e { 3346, 15, 20, 18, 1, -20 }, // 'e
{ 3311, 12, 26, 15, 1, -26 }, // 'f { 3384, 12, 26, 15, 1, -26 }, // 'f
{ 3350, 15, 26, 18, 1, -20 }, // 'g { 3423, 15, 26, 18, 1, -20 }, // 'g
{ 3399, 15, 26, 18, 1, -26 }, // 'h { 3472, 15, 26, 18, 1, -26 }, // 'h
{ 3448, 7, 26, 10, 1, -26 }, // 'i { 3521, 7, 26, 10, 1, -26 }, // 'i
{ 3471, 9, 32, 13, 1, -26 }, // 'j { 3544, 9, 32, 13, 1, -26 }, // 'j
{ 3507, 15, 26, 18, 1, -26 }, // 'k { 3580, 15, 26, 18, 1, -26 }, // 'k
{ 3556, 8, 26, 11, 1, -26 }, // 'l { 3629, 8, 26, 11, 1, -26 }, // 'l
{ 3582, 20, 20, 23, 1, -20 }, // 'm { 3655, 20, 20, 23, 1, -20 }, // 'm
{ 3632, 15, 20, 18, 1, -20 }, // 'n { 3705, 15, 20, 18, 1, -20 }, // 'n
{ 3670, 15, 20, 18, 1, -20 }, // 'o { 3743, 15, 20, 18, 1, -20 }, // 'o
{ 3708, 15, 26, 18, 1, -20 }, // 'p { 3781, 15, 26, 18, 1, -20 }, // 'p
{ 3757, 15, 26, 18, 1, -20 }, // 'q { 3830, 15, 26, 18, 1, -20 }, // 'q
{ 3806, 13, 20, 16, 1, -20 }, // 'r { 3879, 13, 20, 16, 1, -20 }, // 'r
{ 3839, 15, 20, 18, 1, -20 }, // 's { 3912, 15, 20, 18, 1, -20 }, // 's
{ 3877, 13, 26, 16, 1, -26 }, // 't { 3950, 13, 26, 16, 1, -26 }, // 't
{ 3920, 15, 20, 18, 1, -20 }, // 'u { 3993, 15, 20, 18, 1, -20 }, // 'u
{ 3958, 16, 20, 19, 1, -20 }, // 'v { 4031, 16, 20, 19, 1, -20 }, // 'v
{ 3998, 20, 20, 23, 1, -20 }, // 'w { 4071, 20, 20, 23, 1, -20 }, // 'w
{ 4048, 14, 20, 17, 1, -20 }, // 'x { 4121, 14, 20, 17, 1, -20 }, // 'x
{ 4083, 14, 26, 17, 1, -20 }, // 'y { 4156, 14, 26, 17, 1, -20 }, // 'y
{ 4129, 14, 20, 17, 1, -20 } // 'z { 4202, 14, 20, 17, 1, -20 } // 'z
}; };
const GFXfont monomaniacone20pt = { const GFXfont monomaniacone20pt = {
(uint8_t *)monomaniacone20ptBitmaps, (uint8_t *)monomaniacone20ptBitmaps,

File diff suppressed because it is too large Load Diff

View File

@ -96,6 +96,7 @@ void LCD_Init(void) {
LCD_Write_Command(0x36); LCD_Write_Command(0x36);
LCD_Write_Data(0b00111100); LCD_Write_Data(0b00111100);
// Exit sleep // Exit sleep
LCD_Write_Command(0x11); LCD_Write_Command(0x11);
HAL_Delay(150); HAL_Delay(150);
@ -105,24 +106,24 @@ void LCD_Init(void) {
HAL_Delay(400); HAL_Delay(400);
// Fill white // Fill white
LCD_Fill_Screen(WHITE); // LCD_Fill_Screen(WHITE);
//
// Draw colors columns //// Draw colors columns
LCD_Set_Address(30, 30, LCD_WIDTH - 30, LCD_HEIGHT - 30); // LCD_Set_Address(30, 30, LCD_WIDTH - 30, LCD_HEIGHT - 30);
uint32_t size = (LCD_WIDTH - 59) * 20; // uint32_t size = (LCD_WIDTH - 59) * 20;
LCD_Draw_Colour_Burst(BLACK, size); // LCD_Draw_Colour_Burst(BLACK, size);
LCD_Draw_Colour_Burst(WHITE, size); // LCD_Draw_Colour_Burst(WHITE, size);
LCD_Draw_Colour_Burst(BLUE, size); // LCD_Draw_Colour_Burst(BLUE, size);
LCD_Draw_Colour_Burst(GREEN, size); // LCD_Draw_Colour_Burst(GREEN, size);
LCD_Draw_Colour_Burst(RED, size); // LCD_Draw_Colour_Burst(RED, size);
LCD_Draw_Colour_Burst(BLACK, 4 * size); // LCD_Draw_Colour_Burst(BLACK, 4 * size);
//
// Draw rectangles in the angles //// Draw rectangles in the angles
LCD_Draw_Rectangle(1, 1, 20, 20, RED); // LCD_Draw_Rectangle(1, 1, 20, 20, RED);
LCD_Draw_Rectangle(LCD_WIDTH - 21, 1, 20, 20, GREEN); // LCD_Draw_Rectangle(LCD_WIDTH - 21, 1, 20, 20, GREEN);
LCD_Draw_Rectangle(LCD_WIDTH - 21, LCD_HEIGHT - 21, 20, 20, // LCD_Draw_Rectangle(LCD_WIDTH - 21, LCD_HEIGHT - 21, 20, 20,
BLACK); // BLACK);
LCD_Draw_Rectangle(1, LCD_HEIGHT - 21, 20, 20, BLUE); // LCD_Draw_Rectangle(1, LCD_HEIGHT - 21, 20, 20, BLUE);
} }
@ -140,8 +141,11 @@ void LCD_Draw_Colour_Burst(uint16_t color, uint32_t size) {
} }
} }
void LCD_Fill_Screen(uint16_t color) { void LCD_Fill_Screen(uint16_t color, uint8_t full_screen) {
LCD_Draw_Rectangle(0, 0, LCD_WIDTH, LCD_HEIGHT, color); uint16_t height = full_screen ? LCD_FULL_HEIGHT : LCD_HEIGHT;
LCD_Set_Address(0, 0, LCD_WIDTH - 1, height - 1);
LCD_Draw_Colour_Burst(color, LCD_WIDTH * height);
} }
void LCD_Draw_Pixel(uint16_t x, uint16_t y, uint16_t color) { void LCD_Draw_Pixel(uint16_t x, uint16_t y, uint16_t color) {
@ -263,49 +267,6 @@ void LCD_Draw_Filled_Circle(
//TODO: https://stackoverflow.com/questions/1201200/fast-algorithm-for-drawing-filled-circles //TODO: https://stackoverflow.com/questions/1201200/fast-algorithm-for-drawing-filled-circles
} }
void LCD_Draw_Hollow_Rectangle_Coord(
uint16_t X0,
uint16_t Y0,
uint16_t X1,
uint16_t Y1,
uint16_t Colour) {
uint16_t X_length = 0;
uint16_t Y_length = 0;
uint8_t Negative_X = 0;
uint8_t Negative_Y = 0;
float Calc_Negative = 0;
Calc_Negative = X1 - X0;
if (Calc_Negative < 0) Negative_X = 1;
Calc_Negative = 0;
Calc_Negative = Y1 - Y0;
if (Calc_Negative < 0) Negative_Y = 1;
//DRAW HORIZONTAL!
if (!Negative_X) {
X_length = X1 - X0;
} else {
X_length = X0 - X1;
}
LCD_Draw_Horizontal_Line(X0, Y0, X_length, Colour);
LCD_Draw_Horizontal_Line(X0, Y1, X_length, Colour);
//DRAW VERTICAL!
if (!Negative_Y) {
Y_length = Y1 - Y0;
} else {
Y_length = Y0 - Y1;
}
LCD_Draw_Vertical_Line(X0, Y0, Y_length, Colour);
LCD_Draw_Vertical_Line(X1, Y0, Y_length, Colour);
if ((X_length > 0) || (Y_length > 0)) {
LCD_Draw_Pixel(X1, Y1, Colour);
}
}
void LCD_Draw_Filled_Rectangle_Coord( void LCD_Draw_Filled_Rectangle_Coord(
uint16_t X0, uint16_t X0,
uint16_t Y0, uint16_t Y0,
@ -330,7 +291,7 @@ void LCD_Draw_Filled_Rectangle_Coord(
//DRAW HORIZONTAL! //DRAW HORIZONTAL!
if (!Negative_X) { if (!Negative_X) {
X_length = X1 - X0; X_length = X1 - X0 + 1;
X0_true = X0; X0_true = X0;
} else { } else {
X_length = X0 - X1; X_length = X0 - X1;
@ -414,3 +375,260 @@ void LCD_Draw_Filled_Rectangle_Coord(
// while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame // while ((SPI3->SR & SPI_SR_BSY) != 0);//Attendre fin envoi trame
// CS_OFF; // CS_OFF;
//} //}
void LCD_DrawHollowRoundRect(
uint16_t x,
uint16_t y,
uint16_t w,
uint16_t h,
uint8_t radius_top,
uint8_t radius_bottom,
uint8_t border_width,
uint16_t color,
uint16_t fill_color,
uint8_t do_fill) {
uint8_t radius_top_lines = radius_top ? radius_top - 1 : 0;
uint8_t radius_bottom_lines = radius_bottom ? radius_bottom - 1 : 0;
// Fill interior if requested
if (do_fill) {
uint16_t x_inner, y_inner, w_inner, h_inner;
uint8_t radius_top_fill, radius_bottom_fill;
if (border_width == 0) {
// Full area fill (no border)
x_inner = x;
y_inner = y;
w_inner = w;
h_inner = h;
radius_top_fill = radius_top;
radius_bottom_fill = radius_bottom;
} else {
// Interior area (inside border)
x_inner = x + border_width;
y_inner = y + border_width;
w_inner = (w > 2 * border_width) ? w - 2 * border_width : 0;
h_inner = (h > 2 * border_width) ? h - 2 * border_width : 0;
radius_top_fill = (radius_top > border_width) ? radius_top - border_width : 0;
radius_bottom_fill = (radius_bottom > border_width) ? radius_bottom - border_width : 0;
}
// Draw filled interior (only if dimensions are valid)
if (w_inner > 0 && h_inner > 0) {
uint16_t x_central = x_inner + radius_top_fill;
uint16_t y_central = y;
uint16_t w_central = w_inner - 2*radius_top_fill;
uint16_t h_central = h;
LCD_Draw_Rectangle(x_central, y_central, w_central, h_central, fill_color);
uint16_t x_left = x;
uint16_t y_left = y_inner + radius_top_fill;
uint16_t w_left = x_inner + radius_top_fill + 1 - x;
uint16_t h_left = h_inner - radius_bottom_fill - radius_top_fill;
LCD_Draw_Rectangle(x_left, y_left, w_left, h_left, fill_color);
uint16_t x_right = x + w - w_left;
LCD_Draw_Rectangle(x_right, y_left, w_left, h_left, fill_color);
// Top-left rounded corner
if (radius_top_fill > 0) {
uint32_t r_sq = (uint32_t)radius_top_fill * radius_top_fill;
int16_t center_x = x_inner + radius_top_fill - 1;
int16_t center_y = y_inner + radius_top_fill - 1;
for (int16_t i = x_inner; i < x_inner + radius_top_fill; i++) {
for (int16_t j = y_inner; j < y_inner + radius_top_fill; j++) {
int16_t dx = center_x - i;
int16_t dy = center_y - j;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= r_sq) {
LCD_Draw_Pixel(i, j, fill_color);
}
}
}
}
// Top-right rounded corner
if (radius_top_fill > 0) {
uint32_t r_sq = (uint32_t)radius_top_fill * radius_top_fill;
int16_t center_x = x_inner + w_inner - radius_top_fill;
int16_t center_y = y_inner + radius_top_fill - 1;
for (int16_t i = x_inner + w_inner - radius_top_fill; i < x_inner + w_inner; i++) {
for (int16_t j = y_inner; j < y_inner + radius_top_fill; j++) {
int16_t dx = i - center_x;
int16_t dy = center_y - j;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= r_sq) {
LCD_Draw_Pixel(i, j, fill_color);
}
}
}
}
// Bottom-left rounded corner
if (radius_bottom_fill > 0) {
uint32_t r_sq = (uint32_t)radius_bottom_fill * radius_bottom_fill;
int16_t center_x = x_inner + radius_bottom_fill - 1;
int16_t center_y = y_inner + h_inner - radius_bottom_fill;
for (int16_t i = x_inner; i < x_inner + radius_bottom_fill; i++) {
for (int16_t j = y_inner + h_inner - radius_bottom_fill; j < y_inner + h_inner; j++) {
int16_t dx = center_x - i;
int16_t dy = j - center_y;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= r_sq) {
LCD_Draw_Pixel(i, j, fill_color);
}
}
}
}
// Bottom-right rounded corner
if (radius_bottom_fill > 0) {
uint32_t r_sq = (uint32_t)radius_bottom_fill * radius_bottom_fill;
int16_t center_x = x_inner + w_inner - radius_bottom_fill;
int16_t center_y = y_inner + h_inner - radius_bottom_fill;
for (int16_t i = x_inner + w_inner - radius_bottom_fill; i < x_inner + w_inner; i++) {
for (int16_t j = y_inner + h_inner - radius_bottom_fill; j < y_inner + h_inner; j++) {
int16_t dx = i - center_x;
int16_t dy = j - center_y;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= r_sq) {
LCD_Draw_Pixel(i, j, fill_color);
}
}
}
}
}
}
// Draw border only if requested (border_width > 0)
if (border_width > 0) {
// Top horizontal border segment
if (w > 2 * radius_top_lines) {
uint16_t x_top = x + radius_top_lines;
uint16_t y_top = y;
uint16_t w_top = w - 2 * radius_top_lines;
uint16_t h_top = border_width;
LCD_Draw_Rectangle(x_top, y_top, w_top, h_top, color);
}
// Bottom horizontal border segment
if (w > 2 * radius_bottom_lines) {
uint16_t x_bottom = x + radius_bottom_lines;
uint16_t y_bottom = y + h - border_width;
uint16_t w_bottom = w - 2 * radius_bottom_lines;
uint16_t h_bottom = border_width;
LCD_Draw_Rectangle(x_bottom, y_bottom, w_bottom, h_bottom, color);
}
// Left vertical border segment
if (h > radius_top_lines + radius_bottom_lines) {
uint16_t x_left = x;
uint16_t y_left = y + radius_top_lines;
uint16_t w_left = border_width;
uint16_t h_left = h - radius_top_lines - radius_bottom_lines;
LCD_Draw_Rectangle(x_left, y_left, w_left, h_left, color);
}
// Right vertical border segment
if (h > radius_top_lines + radius_bottom_lines) {
uint16_t x_right = x + w - border_width;
uint16_t y_right = y + radius_top_lines;
uint16_t w_right = border_width;
uint16_t h_right = h - radius_top_lines - radius_bottom_lines;
LCD_Draw_Rectangle(x_right, y_right, w_right, h_right, color);
}
// Top-left rounded corner
if (radius_top > 0) {
int16_t inner_radius = radius_top - border_width;
if (inner_radius < 0) inner_radius = 0;
uint32_t inner_sq = (uint32_t)inner_radius * inner_radius;
uint32_t outer_sq = (uint32_t)radius_top * radius_top;
int16_t center_x = x + radius_top - 1;
int16_t center_y = y + radius_top - 1;
for (int16_t i = x; i < x + radius_top; i++) {
for (int16_t j = y; j < y + radius_top; j++) {
int16_t dx = center_x - i;
int16_t dy = center_y - j;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= outer_sq && dist_sq > inner_sq) {
LCD_Draw_Pixel(i, j, color);
}
}
}
}
// Top-right rounded corner
if (radius_top > 0) {
int16_t inner_radius = radius_top - border_width;
if (inner_radius < 0) inner_radius = 0;
uint32_t inner_sq = (uint32_t)inner_radius * inner_radius;
uint32_t outer_sq = (uint32_t)radius_top * radius_top;
int16_t center_x = x + w - radius_top;
int16_t center_y = y + radius_top - 1;
for (int16_t i = x + w - radius_top; i < x + w; i++) {
for (int16_t j = y; j < y + radius_top; j++) {
int16_t dx = i - center_x;
int16_t dy = center_y - j;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= outer_sq && dist_sq > inner_sq) {
LCD_Draw_Pixel(i, j, color);
}
}
}
}
// Bottom-left rounded corner
if (radius_bottom > 0) {
int16_t inner_radius = radius_bottom - border_width;
if (inner_radius < 0) inner_radius = 0;
uint32_t inner_sq = (uint32_t)inner_radius * inner_radius;
uint32_t outer_sq = (uint32_t)radius_bottom * radius_bottom;
int16_t center_x = x + radius_bottom - 1;
int16_t center_y = y + h - radius_bottom;
for (int16_t i = x; i < x + radius_bottom; i++) {
for (int16_t j = y + h - radius_bottom; j < y + h; j++) {
int16_t dx = center_x - i;
int16_t dy = j - center_y;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= outer_sq && dist_sq > inner_sq) {
LCD_Draw_Pixel(i, j, color);
}
}
}
}
// Bottom-right rounded corner
if (radius_bottom > 0) {
int16_t inner_radius = radius_bottom - border_width;
if (inner_radius < 0) inner_radius = 0;
uint32_t inner_sq = (uint32_t)inner_radius * inner_radius;
uint32_t outer_sq = (uint32_t)radius_bottom * radius_bottom;
int16_t center_x = x + w - radius_bottom;
int16_t center_y = y + h - radius_bottom;
for (int16_t i = x + w - radius_bottom; i < x + w; i++) {
for (int16_t j = y + h - radius_bottom; j < y + h; j++) {
int16_t dx = i - center_x;
int16_t dy = j - center_y;
uint32_t dist_sq = (uint32_t)dx * dx + (uint32_t)dy * dy;
if (dist_sq <= outer_sq && dist_sq > inner_sq) {
LCD_Draw_Pixel(i, j, color);
}
}
}
}
}
}

View File

@ -1,5 +1,7 @@
#include "dashboard.h" #include "dashboard.h"
#include "font.h" #include "font.h"
#include "monomaniacone12pt.h"
#include "monomaniacone14pt.h"
#include "monomaniacone20pt.h" #include "monomaniacone20pt.h"
#include "monomaniacone72pt.h" #include "monomaniacone72pt.h"
@ -14,24 +16,7 @@ void run_dashboard_loop() {
void init() { void init() {
LCD_Init(); LCD_Init();
draw_init();
// draw base
// Test drawing text
//char text[] = "test bro";
//LCD_Draw_Text(&text, 30, 100, WHITE, 20, RED);
GFX_DrawChar(40, 40, '!', &monomaniacone20pt, BLACK, WHITE);
GFX_DrawChar(60, 40, '2', &monomaniacone20pt, BLACK, WHITE);
GFX_DrawChar(80, 40, '3', &monomaniacone20pt, BLACK, WHITE);
GFX_DrawChar(100, 40, '4', &monomaniacone20pt, BLACK, WHITE);
GFX_DrawChar(120, 40, '5', &monomaniacone20pt, BLACK, WHITE);
GFX_DrawText(470/2, 150, "BONJOUR !", &monomaniacone20pt, RED, BLACK, 1);
GFX_DrawText(470/2, 250, "01234", &monomaniacone72pt, ORANGE, BLACK, 1);
} }
void update_values() { void update_values() {
// UART send 0201 04 4084 03 // UART send 0201 04 4084 03
@ -42,3 +27,50 @@ void update_values_setup() {
void update_adc() { void update_adc() {
// UART send 0201 20 2462 03 // UART send 0201 20 2462 03
} }
void LCD_DrawHollowRoundRect(
uint16_t x,
uint16_t y,
uint16_t w,
uint16_t h,
uint8_t radius_top,
uint8_t radius_bottom,
uint8_t border_width,
uint16_t color,
uint16_t fill_color,
uint8_t do_fill);
void draw_init() {
LCD_Fill_Screen(COLOR_OFF, 1);
LCD_Fill_Screen(COLOR_BG, 0);
GFX_DrawChar(40, 40, '!', &monomaniacone20pt, COLOR_PRIMARY, COLOR_BG);
GFX_DrawChar(60, 40, '2', &monomaniacone20pt, COLOR_PRIMARY, COLOR_BG);
GFX_DrawChar(80, 40, '3', &monomaniacone20pt, COLOR_SECONDARY, COLOR_BG);
GFX_DrawChar(100, 40, '4', &monomaniacone20pt, COLOR_SECONDARY, COLOR_BG);
GFX_DrawChar(120, 40, '5', &monomaniacone20pt, COLOR_ERROR, COLOR_BG);
GFX_DrawText(LCD_WIDTH / 2, 50, "Bonjour Monsieur !", &monomaniacone12pt,
COLOR_SECONDARY, COLOR_BG, 1, -2);
GFX_DrawText(LCD_WIDTH / 2, 70, "Bonjour Monsieur !", &monomaniacone14pt,
COLOR_SECONDARY, COLOR_BG, 1, -2);
GFX_DrawText(LCD_WIDTH / 2, 100, "Bonjour MONSieur !", &monomaniacone20pt,
COLOR_SUCCESS, COLOR_BG, 1, -2);
GFX_DrawText(LCD_WIDTH / 2, 26+95, "12", &monomaniacone72pt, COLOR_FG, COLOR_BG, 1, -5);
// Draw a rectangle with different top/bottom radii
LCD_DrawHollowRoundRect(10, 10, 100, 50, 10, 0, 4, BLACK, COLOR_PRIMARY, 1);
// Draw a pill-shaped rectangle (same radius for all corners)
LCD_DrawHollowRoundRect(20, 70, 80, 30, 15, 15, 2, COLOR_SUCCESS, 0, 0);
// Draw a square with rounded corners
LCD_DrawHollowRoundRect(50, 100, 60, 60, 10, 10, 6, COLOR_ERROR, 0, 0);
LCD_DrawHollowRoundRect(130, 100, 60, 60, 10, 10, 0, 0, COLOR_ERROR, 1);
LCD_DrawHollowRoundRect(136, 106, 48, 48, 4, 4, 0, 0, COLOR_PRIMARY, 1);
uint16_t bar_width = LCD_WIDTH - 12;
LCD_DrawHollowRoundRect(4, LCD_HEIGHT - 30, bar_width+4, 26, 8, 8, 2,
COLOR_FG, COLOR_SUCCESS, 0);
LCD_DrawHollowRoundRect(4+2, LCD_HEIGHT - 30 + 2, 0.75 * bar_width, 22, 6, 6, 0,
COLOR_FG, COLOR_SUCCESS, 1);
}

View File

@ -22,7 +22,8 @@ void GFX_DrawChar(
if (startX + glyph->width <= 0 || startX >= LCD_WIDTH) return; if (startX + glyph->width <= 0 || startX >= LCD_WIDTH) return;
if (startY + glyph->height <= 0 || startY >= LCD_HEIGHT) return; if (startY + glyph->height <= 0 || startY >= LCD_HEIGHT) return;
LCD_Set_Address(startX, startY, startX + glyph->width - 1, startY + glyph->height - 1); LCD_Set_Address(startX, startY, startX + glyph->width - 1,
startY + glyph->height - 1);
uint16_t pendingPixelCount = 0; uint16_t pendingPixelCount = 0;
uint8_t pendingPixelBit = 0; uint8_t pendingPixelBit = 0;
@ -37,7 +38,8 @@ void GFX_DrawChar(
pendingPixelCount++; pendingPixelCount++;
} else { } else {
if (pendingPixelCount != 0) { if (pendingPixelCount != 0) {
LCD_Draw_Colour_Burst(pendingPixelBit ? fg_color : bg_color, pendingPixelCount); LCD_Draw_Colour_Burst(pendingPixelBit ? fg_color : bg_color,
pendingPixelCount);
pendingPixelCount = 1; pendingPixelCount = 1;
} }
pendingPixelBit = pixelBit; pendingPixelBit = pixelBit;
@ -57,17 +59,19 @@ void GFX_DrawChar(
} }
} }
if (pendingPixelCount != 0) { if (pendingPixelCount != 0) {
LCD_Draw_Colour_Burst(pendingPixelBit ? fg_color : bg_color, pendingPixelCount); LCD_Draw_Colour_Burst(pendingPixelBit ? fg_color : bg_color,
pendingPixelCount);
} }
} }
uint16_t GFX_GetTextWidth(const char *text, const GFXfont *font) { uint16_t GFX_GetTextWidth(const char *text, const GFXfont *font, int8_t letter_spacing) {
uint16_t width = 0; uint16_t width = 0;
while (*text != '\0') { while (*text != '\0') {
if (*text >= font->firstChar && *text <= font->lastChar) { if (*text >= font->firstChar && *text <= font->lastChar) {
uint16_t glyphIndex = *text - font->firstChar; uint16_t glyphIndex = *text - font->firstChar;
width += font->glyphs[glyphIndex].advance; width += font->glyphs[glyphIndex].advance;
width += letter_spacing;
} else { } else {
// Default advance for unsupported characters // Default advance for unsupported characters
width += 10; width += 10;
@ -78,17 +82,23 @@ uint16_t GFX_GetTextWidth(const char *text, const GFXfont *font) {
return width; return width;
} }
void GFX_DrawText(
void GFX_DrawText(uint16_t x, uint16_t y, const char *text, const GFXfont *font, uint16_t x,
uint16_t fg_color, uint16_t bg_color, uint8_t alignment) { uint16_t y,
const char *text,
const GFXfont *font,
uint16_t fg_color,
uint16_t bg_color,
uint8_t alignment,
int8_t letter_spacing) {
// Adjust x position based on alignment // Adjust x position based on alignment
switch (alignment) { switch (alignment) {
case 1:// Center case 1:// Center
x -= GFX_GetTextWidth(text, font) / 2; x -= GFX_GetTextWidth(text, font, letter_spacing) / 2;
break; break;
case 2:// Right case 2:// Right
x -= GFX_GetTextWidth(text, font); x -= GFX_GetTextWidth(text, font, letter_spacing);
break; break;
// Default: Left alignment (no adjustment) // Default: Left alignment (no adjustment)
} }
@ -104,9 +114,10 @@ void GFX_DrawText(uint16_t x, uint16_t y, const char *text, const GFXfont *font,
if (*text >= font->firstChar && *text <= font->lastChar) { if (*text >= font->firstChar && *text <= font->lastChar) {
uint16_t glyphIndex = *text - font->firstChar; uint16_t glyphIndex = *text - font->firstChar;
cursorX += font->glyphs[glyphIndex].advance; cursorX += font->glyphs[glyphIndex].advance;
cursorX += letter_spacing;
} else { } else {
// Default advance for unsupported characters // Default advance for unsupported characters
cursorX += 10; cursorX += 10 + letter_spacing;
} }
text++; text++;