This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
weathersensors charset with nokia5110l
#1
hi!

i wasn't really satisfied with the automatically generated charset for the nokia display, so i modified charset.h manually to get the chars better readable. i attach it if anybody cares. made some small position adjustments and a wider wind arrow too.

thanx et kind regards...


   

Code:
// This file is generated by make_charset.py and modified

struct font_character {
   char c;
   uint8_t w, h, len;
   const unsigned char *data;
};
struct font {
   uint8_t n;
   const struct font_character *characters;
};
const PROGMEM unsigned char font0_30[] = {
0x1d, 0x85, 0x02, 0x85, 0x01, 0x82, 0x03, 0x84, 0x03, 0x84, 0x03, 0x84, 0x03, 0x84, 0x03, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font0_31[] = {
0x1d, 0x84, 0x03, 0x84, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x02, };
const PROGMEM unsigned char font0_32[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x82, 0x05, 0x82, 0x04, 0x83, 0x03, 0x83, 0x03, 0x83, 0x03, 0x8e };
const PROGMEM unsigned char font0_33[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x82, 0x04, 0x82, 0x04, 0x83, 0x04, 0x86, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font0_34[] = {
0x1f, 0x83, 0x04, 0x83, 0x03, 0x84, 0x02, 0x85, 0x02, 0x82, 0x01, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x8e, 0x04, 0x82, 0x01, };
const PROGMEM unsigned char font0_35[] = {
0x1c, 0x86, 0x01, 0x89, 0x05, 0x86, 0x01, 0x87, 0x05, 0x84, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font0_36[] = {
0x1d, 0x85, 0x02, 0x85, 0x01, 0x82, 0x05, 0x86, 0x01, 0x89, 0x03, 0x84, 0x03, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font0_37[] = {
0x1c, 0x8e, 0x04, 0x82, 0x05, 0x82, 0x04, 0x82, 0x05, 0x82, 0x04, 0x82, 0x05, 0x82, 0x05, 0x82, 0x03 };
const PROGMEM unsigned char font0_38[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x89, 0x01, 0x85, 0x01, 0x89, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font0_39[] = {
0x1d, 0x85, 0x01, 0x86, 0x01, 0x82, 0x03, 0x84, 0x03, 0x89, 0x01, 0x86, 0x05, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font0_43[] = {
0x21, 0x86, 0x02, 0x86, 0x01, 0x82, 0x04, 0x81, 0x01, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x04, 0x81, 0x02, 0x86, 0x02, 0x86, 0x01, };
const PROGMEM unsigned char font0_46[] = {
0x1d, 0x86, 0x01, 0x86, 0x01, 0x82, 0x05, 0x82, 0x05, 0x85, 0x02, 0x85, 0x02, 0x82, 0x05, 0x82, 0x05, 0x82, 0x04, };
const PROGMEM unsigned char font0_2e[] = {
0x21, 0x82, 0x01, 0x82, 0x01, };
const PROGMEM struct font_character font0[] = {
{48, 7, 13, 21, font0_30},
{49, 7, 13, 19, font0_31},
{50, 7, 13, 16, font0_32},
{51, 7, 13, 17, font0_33},
{52, 7, 13, 21, font0_34},
{53, 7, 13, 15, font0_35},
{54, 7, 13, 19, font0_36},
{55, 7, 13, 19, font0_37},
{56, 7, 13, 15, font0_38},
{57, 7, 13, 19, font0_39},
{67, 8, 13, 23, font0_43},
{70, 7, 13, 19, font0_46},
{46, 3, 13, 5, font0_2e},
};
const PROGMEM unsigned char font1_30[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font1_31[] = {
0x21, 0x84, 0x04, 0x84, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x06, 0x82, 0x03, };
const PROGMEM unsigned char font1_32[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x02, 0x81, 0x03, 0x82, 0x05, 0x83, 0x05, 0x82, 0x05, 0x82,0x05, 0x82, 0x05, 0x82, 0x05, 0x87, 0x01, 0x87, };
const PROGMEM unsigned char font1_33[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x02, 0x81, 0x03, 0x82, 0x04, 0x84, 0x03, 0x84, 0x05, 0x84, 0x02, 0x81, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x02, };
const PROGMEM unsigned char font1_34[] = {
0x25, 0x82, 0x05, 0x83, 0x04, 0x84, 0x03, 0x85, 0x02, 0x83, 0x01, 0x82, 0x01, 0x83, 0x02, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x90, 0x05, 0x82, 0x06, 0x82, 0x01, };
const PROGMEM unsigned char font1_35[] = {
0x20, 0x87, 0x01, 0x86, 0x02, 0x82, 0x06, 0x86, 0x02, 0x87, 0x06, 0x82, 0x06, 0x82, 0x02, 0x81, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x02, };
const PROGMEM unsigned char font1_36[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x06, 0x86, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x02, };
const PROGMEM unsigned char font1_37[] = {
0x20, 0x87, 0x01, 0x87, 0x06, 0x82, 0x05, 0x82, 0x06, 0x82, 0x05, 0x82, 0x06, 0x82, 0x05, 0x82, 0x06, 0x82, 0x05, 0x82, 0x06, 0x82, 0x01, };
const PROGMEM unsigned char font1_38[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x02, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x02, };
const PROGMEM unsigned char font1_39[] = {
0x21, 0x85, 0x02, 0x87, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x86, 0x06, 0x82, 0x01, 0x82, 0x03, 0x82, 0x01, 0x87, 0x02, 0x85, 0x02, };
const PROGMEM unsigned char font1_2d[] = {
0x28, 0x84, 0x10, };
const PROGMEM unsigned char font1_2e[] = {
0x28, 0x82, 0x01, 0x82, };
const PROGMEM struct font_character font1[] = {
{48, 8, 15, 37, font1_30},
{49, 8, 15, 23, font1_31},
{50, 8, 15, 27, font1_32},
{51, 8, 15, 31, font1_33},
{52, 8, 15, 27, font1_34},
{53, 8, 15, 27, font1_35},
{54, 8, 15, 31, font1_36},
{55, 8, 15, 23, font1_37},
{56, 8, 15, 36, font1_38},
{57, 8, 15, 31, font1_39},
{45, 4, 15, 3, font1_2d},
{46, 3, 15, 4, font1_2e},
};
const PROGMEM unsigned char font2_30[] = {
0x2f, 0x85, 0x03, 0x87, 0x02, 0x82, 0x03, 0x83, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x81, 0x05, 0x82, 0x01, 0x81, 0x05, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x03, 0x83, 0x01, 0x87, 0x03, 0x86, 0x01, };
const PROGMEM unsigned char font2_31[] = {
0x2e, 0x85, 0x04, 0x85, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x03, };
const PROGMEM unsigned char font2_32[] = {
0x2e, 0x86, 0x03, 0x87, 0x01, 0x83, 0x03, 0x82, 0x01, 0x82, 0x04, 0x82, 0x07, 0x82, 0x06, 0x83, 0x05, 0x83, 0x05, 0x83, 0x05, 0x83, 0x06, 0x82, 0x06, 0x83, 0x06, 0x88, };
const PROGMEM unsigned char font2_33[] = {
0x2e, 0x86, 0x03, 0x87, 0x02, 0x82, 0x03, 0x82, 0x02, 0x81, 0x04, 0x82, 0x05, 0x84, 0x04, 0x84, 0x06, 0x84, 0x07, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x83, 0x03, 0x82, 0x02, 0x87, 0x02, 0x86, 0x02, };
const PROGMEM unsigned char font2_34[] = {
0x32, 0x82, 0x06, 0x83, 0x05, 0x84, 0x05, 0x84, 0x04, 0x85, 0x04, 0x82, 0x01, 0x82, 0x03, 0x82, 0x02, 0x82, 0x02, 0x83, 0x02, 0x82, 0x02, 0x89, 0x05, 0x82, 0x07, 0x82, 0x07, 0x82, 0x02, };
const PROGMEM unsigned char font2_35[] = {
0x2f, 0x86, 0x02, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x87, 0x02, 0x87, 0x02, 0x82, 0x03, 0x82, 0x08, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x03, 0x82, 0x02, 0x87, 0x03, 0x86, 0x01, };
const PROGMEM unsigned char font2_36[] = {
0x2f, 0x86, 0x02, 0x87, 0x02, 0x82, 0x07, 0x82, 0x07, 0x87, 0x02, 0x87, 0x02, 0x82, 0x03, 0x83, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x03, 0x83, 0x01, 0x87, 0x03, 0x86, 0x01, };
const PROGMEM unsigned char font2_37[] = {
0x2d, 0x89, 0x06, 0x82, 0x06, 0x83, 0x06, 0x82, 0x06, 0x83, 0x06, 0x82, 0x06, 0x83, 0x06, 0x82, 0x07, 0x82, 0x07, 0x82, 0x07, 0x82, 0x06, 0x82, 0x05, };
const PROGMEM unsigned char font2_38[] = {
0x2e, 0x86, 0x03, 0x87, 0x02, 0x82, 0x03, 0x82, 0x02, 0x82, 0x03, 0x82, 0x02, 0x87, 0x03, 0x85, 0x03, 0x87, 0x01, 0x83, 0x03, 0x82, 0x01, 0x82, 0x05, 0x85, 0x03, 0x83, 0x01, 0x87, 0x02, 0x87, 0x01, };
const PROGMEM unsigned char font2_39[] = {
0x2e, 0x86, 0x03, 0x87, 0x01, 0x83, 0x03, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x82, 0x04, 0x82, 0x01, 0x83, 0x03, 0x82, 0x02, 0x87, 0x02, 0x87, 0x07, 0x82, 0x07, 0x82, 0x02, 0x87, 0x02, 0x86, 0x02, };
const PROGMEM struct font_character font2[] = {
{48, 9, 17, 41, font2_30},
{49, 9, 17, 25, font2_31},
{50, 9, 17, 28, font2_32},
{51, 9, 17, 33, font2_33},
{52, 9, 17, 31, font2_34},
{53, 9, 17, 31, font2_35},
{54, 9, 17, 33, font2_36},
{55, 9, 17, 25, font2_37},
{56, 9, 17, 33, font2_38},
{57, 9, 17, 33, font2_39},
};
const PROGMEM unsigned char font3_30[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x8c, 0x01, 0x84, 0x04, 0x84, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x84, 0x04, 0x84, 0x01, 0x8c, 0x02, 0x8a,
0x04, 0x88, 0x03 };
const PROGMEM unsigned char font3_31[] = {
0x79, 0x86, 0x06, 0x87, 0x06, 0x87, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x04, };
const PROGMEM unsigned char font3_32[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x8c, 0x01, 0x83, 0x05, 0x84, 0x01, 0x82, 0x07, 0x83, 0x09, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x08, 0x84, 0x09, 0x8c, 0x01, 0x8c, 0x01, 0x8c, 0x01, };
const PROGMEM unsigned char font3_33[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x8c, 0x01, 0x83, 0x05, 0x84, 0x01, 0x82, 0x07, 0x83, 0x09, 0x84, 0x07, 0x86, 0x06, 0x86, 0x07, 0x85, 0x09, 0x85, 0x0a, 0x84, 0x0a, 0x83, 0x01, 0x82, 0x07, 0x83, 0x01, 0x83, 0x05, 0x84, 0x01, 0x8c, 0x02, 0x8a, 0x04, 0x88, 0x03, };
const PROGMEM unsigned char font3_34[] = {
0x7d, 0x83, 0x09, 0x84, 0x08, 0x85, 0x08, 0x85, 0x07, 0x86, 0x06, 0x83, 0x01, 0x83, 0x05, 0x83, 0x02, 0x83, 0x05, 0x83, 0x02, 0x83, 0x04, 0x83, 0x03, 0x83, 0x03, 0x83, 0x04, 0x83, 0x02, 0x83, 0x05, 0x83, 0x02, 0xa7, 0x08, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x02, };
const PROGMEM unsigned char font3_35[] = {
0x75, 0x8c, 0x01, 0x8c, 0x01, 0x8c, 0x01, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x01, 0x84, 0x05, 0x8a, 0x03, 0x8b, 0x02, 0x83, 0x05, 0x84, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x0a, 0x83, 0x01, 0x83, 0x05, 0x84, 0x01, 0x8c, 0x02, 0x8a, 0x04, 0x88, 0x03, };
const PROGMEM unsigned char font3_36[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x8b, 0x02, 0x84, 0x09, 0x83, 0x0a, 0x83, 0x0a, 0x8a, 0x03, 0x8b, 0x02, 0x8c, 0x01, 0x84, 0x04, 0x84, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x84, 0x04, 0x84, 0x01, 0x8c, 0x02, 0x8a, 0x04, 0x88, 0x03, };
const PROGMEM unsigned char font3_37[] = {
0x76, 0x8b, 0x01, 0x8c, 0x01, 0x8c, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x09, 0x84, 0x09, 0x83, 0x07};
const PROGMEM unsigned char font3_38[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x84, 0x04, 0x84, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x02, 0x83, 0x04, 0x83, 0x04, 0x88, 0x04, 0x8a, 0x02, 0x8c, 0x01, 0x84, 0x04, 0x84, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x84, 0x04, 0x84, 0x01, 0x8c, 0x02, 0x8a, 0x04, 0x88, 0x03, };
const PROGMEM unsigned char font3_39[] = {
0x77, 0x88, 0x04, 0x8a, 0x02, 0x8c, 0x01, 0x84, 0x04, 0x84, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x83, 0x06, 0x83, 0x01, 0x84, 0x04, 0x84, 0x01, 0x8c, 0x02, 0x8b, 0x03, 0x8a, 0x0a, 0x83, 0x0a, 0x83, 0x09, 0x84, 0x02, 0x8b, 0x02, 0x8a, 0x04, 0x88, 0x03, };
const PROGMEM struct font_character font3[] = {
{48, 13, 26, 57, font3_30},
{49, 13, 26, 35, font3_31},
{50, 13, 26, 39, font3_32},
{51, 13, 26, 45, font3_33},
{52, 13, 26, 47, font3_34},
{53, 13, 26, 41, font3_35},
{54, 13, 26, 45, font3_36},
{55, 13, 26, 35, font3_37},
{56, 13, 26, 53, font3_38},
{57, 13, 26, 45, font3_39},
};
const PROGMEM unsigned char font4_61[] = {
0x25, 0x8b, 0x04, 0x82, 0x01, 0x97, };
const PROGMEM unsigned char font4_62[] = {
0x15, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x86, 0x01, 0x86, 0x01, 0x82, 0x03, 0x84, 0x03, 0x84, 0x03, 0x88, 0x01, 0x86, 0x01, };
const PROGMEM unsigned char font4_63[] = {
0x25, 0x8d, 0x03, 0x83, 0x04, 0x82, 0x03, 0x87, 0x01, 0x85, };
const PROGMEM unsigned char font4_64[] = {
0x19, 0x82, 0x05, 0x82, 0x05, 0x82, 0x02, 0x85, 0x02, 0x85, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x02, 0x85, 0x02, 0x85, 0x01,  };
const PROGMEM unsigned char font4_65[] = {
0x25, 0x8d, 0x02, 0x8a, 0x04, 0x86, 0x01, 0x85, };
const PROGMEM unsigned char font4_66[] = {
0x10, 0x84, 0x01, 0x83, 0x02, 0x82, 0x02, 0x84, 0x02, 0x82, 0x03, 0x82, 0x03, 0x82, 0x03, 0x82, 0x03, 0x82, 0x03, 0x82, 0x02, };
const PROGMEM unsigned char font4_67[] = {
0x2b, 0x85, 0x01, 0x86, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x86, 0x02, 0x85, 0x05, 0x82, 0x02, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font4_68[] = {
0x15, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x85, 0x02, 0x86, 0x01, 0x82, 0x01, 0x83, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, };
const PROGMEM unsigned char font4_69[] = {
0x09, 0x82, 0x07, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, };
const PROGMEM unsigned char font4_6a[] = {
0x0d, 0x81, 0x0b, 0x81, 0x03, 0x81, 0x03, 0x81, 0x03, 0x81, 0x03, 0x81, 0x03, 0x81, 0x03, 0x81, 0x03, 0x81, 0x02, 0x82, 0x02, 0x82, 0x02, };
const PROGMEM unsigned char font4_6b[] = {
0x12, 0x82, 0x04, 0x82, 0x04, 0x82, 0x04, 0x82, 0x02, 0x84, 0x01, 0x82, 0x01, 0x85, 0x01, 0x84, 0x02, 0x85, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x02, 0x82, };
const PROGMEM unsigned char font4_6c[] = {
0x0c, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, 0x01, 0x82, };
const PROGMEM unsigned char font4_6d[] = {
0x42, 0x89, 0x02, 0x8a, 0x01, 0x82, 0x02, 0x82, 0x01, 0x83, 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x01, };
const PROGMEM unsigned char font4_6e[] = {
0x2a, 0x85, 0x02, 0x86, 0x01, 0x82, 0x01, 0x83, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, };
const PROGMEM unsigned char font4_6f[] = {
0x2b, 0x85, 0x01, 0x89, 0x03, 0x84, 0x03, 0x84, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font4_70[] = {
0x2a, 0x86, 0x01, 0x86, 0x01, 0x82, 0x03, 0x84, 0x03, 0x84, 0x03, 0x88, 0x01, 0x86, 0x01, 0x82, 0x05, 0x82, 0x05, };
const PROGMEM unsigned char font4_71[] = {
0x2b, 0x85, 0x01, 0x86, 0x01, 0x82, 0x03, 0x81, 0x01, 0x82, 0x03, 0x81, 0x01, 0x82, 0x03, 0x81, 0x01, 0x86, 0x02, 0x85, 0x06, 0x81, 0x06, 0x81, 0x06, 0x81, 0x01, };
const PROGMEM unsigned char font4_72[] = {
0x18, 0x8a, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, };
const PROGMEM unsigned char font4_73[] = {
0x25, 0x8f, 0x03, 0x85, 0x04, 0x8e, };
const PROGMEM unsigned char font4_74[] = {
0x11, 0x82, 0x02, 0x82, 0x01, 0x84, 0x01, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x82, 0x02, 0x83, 0x01, 0x83, };
const PROGMEM unsigned char font4_75[] = {
0x2a, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x82, 0x02, 0x82, 0x02, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font4_76[] = {
0x24, 0x82, 0x02, 0x84, 0x02, 0x82, 0x01, 0x81, 0x01, 0x82, 0x02, 0x84, 0x02, 0x84, 0x03, 0x82, 0x04, 0x82, 0x02, };
const PROGMEM unsigned char font4_77[] = {
0x36, 0x82, 0x01, 0x83, 0x01, 0x84, 0x01, 0x83, 0x01, 0x84, 0x01, 0x83, 0x01, 0x82, 0x01, 0x83, 0x01, 0x81, 0x01, 0x81, 0x02, 0x83, 0x01, 0x83, 0x02, 0x83, 0x01, 0x83, 0x02, 0x83, 0x01, 0x83, 0x01, };
const PROGMEM unsigned char font4_78[] = {
0x24, 0x82, 0x02, 0x82, 0x01, 0x84, 0x02, 0x84, 0x03, 0x82, 0x03, 0x84, 0x01, 0x85, 0x01, 0x82, 0x02, 0x82, };
const PROGMEM unsigned char font4_79[] = {
0x24, 0x82, 0x02, 0x84, 0x02, 0x84, 0x02, 0x81, 0x02, 0x84, 0x02, 0x84, 0x03, 0x82, 0x04, 0x82, 0x04, 0x82, 0x02, 0x83, 0x03, 0x83, 0x03, };
const PROGMEM unsigned char font4_7a[] = {
0x24, 0x86, 0x03, 0x83, 0x02, 0x83, 0x03, 0x82, 0x03, 0x82, 0x03, 0x83, 0x03, 0x86, };
const PROGMEM unsigned char font4_30[] = {
0x1d, 0x85, 0x02, 0x85, 0x01, 0x82, 0x03, 0x84, 0x03, 0x84, 0x03, 0x84, 0x03, 0x84, 0x03, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font4_31[] = {
0x1d, 0x84, 0x03, 0x84, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x05, 0x82, 0x02, };
const PROGMEM unsigned char font4_32[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x82, 0x05, 0x82, 0x04, 0x83, 0x03, 0x83, 0x03, 0x83, 0x03, 0x8e };
const PROGMEM unsigned char font4_33[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x82, 0x04, 0x82, 0x04, 0x83, 0x04, 0x86, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font4_34[] = {
0x1f, 0x83, 0x04, 0x83, 0x03, 0x84, 0x02, 0x85, 0x02, 0x82, 0x01, 0x82, 0x01, 0x82, 0x02, 0x82, 0x01, 0x8e, 0x04, 0x82, 0x01, };
const PROGMEM unsigned char font4_35[] = {
0x1c, 0x86, 0x01, 0x89, 0x05, 0x86, 0x01, 0x87, 0x05, 0x84, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font4_36[] = {
0x1d, 0x85, 0x02, 0x85, 0x01, 0x82, 0x05, 0x86, 0x01, 0x89, 0x03, 0x84, 0x03, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font4_37[] = {
0x1c, 0x8e, 0x04, 0x82, 0x05, 0x82, 0x04, 0x82, 0x05, 0x82, 0x04, 0x82, 0x05, 0x82, 0x05, 0x82, 0x03 };
const PROGMEM unsigned char font4_38[] = {
0x1d, 0x85, 0x01, 0x89, 0x03, 0x89, 0x01, 0x85, 0x01, 0x89, 0x03, 0x89, 0x01, 0x85, 0x01, };
const PROGMEM unsigned char font4_39[] = {
0x1d, 0x85, 0x01, 0x86, 0x01, 0x82, 0x03, 0x84, 0x03, 0x89, 0x01, 0x86, 0x05, 0x82, 0x01, 0x85, 0x02, 0x85, 0x01, };
const PROGMEM unsigned char font4_20[] = {
0x27, };
const PROGMEM unsigned char font4_2b[] = {
0x2c, 0x82, 0x05, 0x82, 0x03, 0x86, 0x01, 0x86, 0x03, 0x82, 0x05, 0x82, 0x05, 0x82, 0x03, };
const PROGMEM unsigned char font4_2d[] = {
0x20, 0x88, 0x0c, };
const PROGMEM unsigned char font4_2e[] = {
0x21, 0x82, 0x01, 0x82, 0x01, };
const PROGMEM struct font_character font4[] = {
{97, 6, 13, 6, font4_61},
{98, 7, 13, 21, font4_62},
{99, 6, 13, 10, font4_63},
{100, 7, 13, 27, font4_64},
{101, 6, 13, 8, font4_65},
{102, 5, 13, 21, font4_66},
{103, 7, 16, 27, font4_67},
{104, 7, 13, 31, font4_68},
{105, 3, 13, 17, font4_69},
{106, 4, 16, 23, font4_6a},
{107, 6, 13, 26, font4_6b},
{108, 3, 13, 18, font4_6c},
{109, 11, 13, 35, font4_6d},
{110, 7, 13, 25, font4_6e},
{111, 7, 13, 13, font4_6f},
{112, 7, 16, 19, font4_70},
{113, 7, 16, 27, font4_71},
{114, 4, 13, 11, font4_72},
{115, 6, 13, 6, font4_73},
{116, 4, 13, 18, font4_74},
{117, 7, 13, 25, font4_75},
{118, 6, 13, 19, font4_76},
{119, 9, 13, 33, font4_77},
{120, 6, 13, 18, font4_78},
{121, 6, 16, 23, font4_79},
{122, 6, 13, 14, font4_7a},
{48, 7, 13, 21, font4_30},
{49, 7, 13, 19, font4_31},
{50, 7, 13, 16, font4_32},
{51, 7, 13, 17, font4_33},
{52, 7, 13, 21, font4_34},
{53, 7, 13, 15, font4_35},
{54, 7, 13, 19, font4_36},
{55, 7, 13, 19, font4_37},
{56, 7, 13, 15, font4_38},
{57, 7, 13, 19, font4_39},
{32, 3, 13, 1, font4_20},
{43, 7, 13, 15, font4_2b},
{45, 4, 13, 3, font4_2d},
{46, 3, 13, 5, font0_2e},
};
const PROGMEM unsigned char font5_30[] = {
0x7f, 0x31, 0x88, 0x08, 0x8a, 0x06, 0x84, 0x04, 0x84, 0x04, 0x84, 0x06, 0x83, 0x04, 0x83, 0x07, 0x84, 0x03, 0x83, 0x08, 0x83, 0x03, 0x82, 0x09, 0x83, 0x03, 0x82, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x03, 0x82, 0x09, 0x83, 0x03, 0x82, 0x09, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x07, 0x84, 0x03, 0x84, 0x06, 0x83, 0x05, 0x84, 0x04, 0x84, 0x06, 0x8a, 0x08, 0x88, 0x04, };
const PROGMEM unsigned char font5_31[] = {
0x7f, 0x30, 0x86, 0x09, 0x88, 0x09, 0x88, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x07, };
const PROGMEM unsigned char font5_32[] = {
0x7f, 0x30, 0x88, 0x08, 0x8a, 0x06, 0x84, 0x04, 0x84, 0x05, 0x83, 0x06, 0x83, 0x04, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0d, 0x84, 0x0c, 0x84, 0x0c, 0x84, 0x0c, 0x84, 0x0d, 0x83, 0x0d, 0x83, 0x0d, 0x84, 0x0c, 0x84, 0x0c, 0x84, 0x0d, 0x8e, 0x03, 0x8e, 0x01, };
const PROGMEM unsigned char font5_33[] = {
0x7f, 0x30, 0x88, 0x08, 0x8b, 0x05, 0x84, 0x04, 0x84, 0x05, 0x83, 0x06, 0x84, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0b, 0x86, 0x08, 0x88, 0x09, 0x89, 0x0d, 0x84, 0x0f, 0x83, 0x0e, 0x83, 0x03, 0x83, 0x09, 0x82, 0x03, 0x83, 0x09, 0x82, 0x03, 0x83, 0x08, 0x83, 0x03, 0x84, 0x07, 0x83, 0x04, 0x84, 0x04, 0x84, 0x06, 0x8b, 0x07, 0x89, 0x04, };
const PROGMEM unsigned char font5_34[] = {
0x7f, 0x36, 0x83, 0x0d, 0x84, 0x0d, 0x84, 0x0c, 0x85, 0x0b, 0x86, 0x0b, 0x83, 0x01, 0x82, 0x0a, 0x83, 0x02, 0x82, 0x09, 0x84, 0x02, 0x82, 0x09, 0x83, 0x03, 0x82, 0x08, 0x83, 0x04, 0x82, 0x07, 0x84, 0x04, 0x82, 0x07, 0x83, 0x05, 0x82, 0x06, 0x83, 0x06, 0x82, 0x06, 0x83, 0x06, 0x82, 0x05, 0x83, 0x07, 0x82, 0x05, 0x90, 0x01, 0x90, 0x0b, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x0f, 0x82, 0x04, };
const PROGMEM unsigned char font5_35[] = {
0x7f, 0x2f, 0x8c, 0x05, 0x8c, 0x05, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x82, 0x0f, 0x82, 0x0f, 0x8a, 0x06, 0x8c, 0x05, 0x85, 0x03, 0x85, 0x04, 0x83, 0x07, 0x83, 0x04, 0x83, 0x07, 0x83, 0x0f, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x07, 0x83, 0x04, 0x83, 0x07, 0x83, 0x05, 0x84, 0x04, 0x84, 0x05, 0x8b, 0x08, 0x88, 0x04, };
const PROGMEM unsigned char font5_36[] = {
0x7f, 0x32, 0x88, 0x07, 0x8a, 0x06, 0x85, 0x04, 0x82, 0x06, 0x83, 0x0d, 0x84, 0x0d, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x8b, 0x06, 0x8c, 0x05, 0x85, 0x04, 0x84, 0x04, 0x83, 0x07, 0x83, 0x04, 0x83, 0x08, 0x83, 0x03, 0x82, 0x09, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x04, 0x83, 0x06, 0x83, 0x05, 0x84, 0x04, 0x84, 0x06, 0x8a, 0x08, 0x88, 0x04, };
const PROGMEM unsigned char font5_37[] = {
0x7f, 0x2d, 0x8f, 0x02, 0x8f, 0x0d, 0x83, 0x0d, 0x83, 0x0d, 0x84, 0x0d, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x09, };
const PROGMEM unsigned char font5_38[] = {
0x7f, 0x30, 0x88, 0x08, 0x8b, 0x05, 0x84, 0x04, 0x84, 0x05, 0x83, 0x06, 0x84, 0x04, 0x83, 0x07, 0x83, 0x04, 0x82, 0x08, 0x83, 0x04, 0x82, 0x08, 0x83, 0x04, 0x83, 0x07, 0x83, 0x04, 0x84, 0x05, 0x84, 0x05, 0x8b, 0x07, 0x89, 0x07, 0x8b, 0x05, 0x84, 0x04, 0x85, 0x03, 0x84, 0x07, 0x83, 0x03, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x83, 0x09, 0x83, 0x02, 0x84, 0x07, 0x83, 0x04, 0x84, 0x05, 0x84, 0x04, 0x8c, 0x07, 0x89, 0x04, };
const PROGMEM unsigned char font5_39[] = {
0x7f, 0x30, 0x88, 0x08, 0x8a, 0x06, 0x84, 0x04, 0x84, 0x05, 0x83, 0x06, 0x83, 0x04, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x83, 0x08, 0x83, 0x03, 0x84, 0x06, 0x84, 0x04, 0x84, 0x04, 0x85, 0x05, 0x8c, 0x06, 0x87, 0x01, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0e, 0x83, 0x0d, 0x83, 0x06, 0x82, 0x05, 0x84, 0x06, 0x8a, 0x07, 0x89, 0x05, };
const PROGMEM struct font_character font5[] = {
{48, 17, 32, 82, font5_30},
{49, 17, 32, 46, font5_31},
{50, 17, 32, 56, font5_32},
{51, 17, 32, 64, font5_33},
{52, 17, 32, 66, font5_34},
{53, 17, 32, 60, font5_35},
{54, 17, 32, 68, font5_36},
{55, 17, 32, 46, font5_37},
{56, 17, 32, 76, font5_38},
{57, 17, 32, 72, font5_39},
};
const PROGMEM struct font fonts[] = {
{13, font0},
{12, font1},
{10, font2},
{10, font3},
{39, font4},
{10, font5},
};


Code:
--- weathersensors.ino    2021-05-14 09:36:11.286243140 +0100
+++ weathersensors_orig.ino    2021-05-14 09:38:58.320392812 +0100
@@ -39,8 +39,8 @@
#define NOKIA5110L 1
#define JLX12864G 2

-//#define LCD NONE
-#define LCD NOKIA5110L
+#define LCD NONE
+//#define LCD NOKIA5110L
//#define LCD JLX12864G

#if LCD == NOKIA5110L
@@ -861,7 +829,7 @@
        lcd.clear_lines(46, 83); // clear compass
        // draw wind speed
        lcd.setfont(3);
-        lcd.setpos(0, 37);
+        lcd.setpos(0, 38);
        lcd.print(status_buf[1]);
#endif

@@ -879,8 +847,8 @@


#else
-        lcd.setfont(1);
-        lcd.setpos(30, 42);
+        lcd.setfont(2);
+        lcd.setpos(29, 45);
        lcd.print(status_buf[1]);

        lcd.setfont(0);
@@ -888,7 +856,7 @@
        a = pressure_comp/1e2, r = pressure_comp - a*1e2;
        a = snprintf_P(status_buf[2], sizeof status_buf[2], PSTR("%d"), a);
        lcd.print(status_buf[2]);
-        lcd.rectangle(a*7+3, 72, a*7+4, 73, 255); // draw decimal
+        lcd.rectangle(a*7+3, 73, a*7+4, 73, 255); // draw decimal
        snprintf_P(status_buf[2], sizeof status_buf[2], PSTR("%02d"), r);
        lcd.setpos(a*7+6, 61);
        lcd.print(status_buf[2]);
@@ -929,7 +897,7 @@
        float wind_rad = wind_dir/180.0*M_PI;
        int x = r*sin(wind_rad);
        int y = -r*cos(wind_rad);
-        for(int s=1; s<6; s++) {
+        for(int s=1; s<3; s++) {
            int xp = s*cos(wind_rad);
            int yp = s*sin(wind_rad);
            lcd.line(xc+xp, yc+yp, xc+x, yc+y, 255);
@@ -943,21 +911,12 @@
        lcd.setfont(1);
#endif
        int xp, yp;
-        xp = -12.0*sin(wind_rad);
-        yp = 14.0*cos(wind_rad);
+        xp = -11.0*sin(wind_rad), yp = 10.0*cos(wind_rad);
        static float nxp = 0, nyp = 0;
-        nxp = (xp + 7*nxp)/8;
-        nyp = (yp + 7*nyp)/8;
-        xp = xc+nxp-13, yp = yc+nyp-8;
-
-        int xpw = 25;
-    if (wind_dir < 100 )
-          xpw = 17;
-        if(!eeprom_data.direction_type && wind_dir > 250)
-          xpw = 17;
-        if (xp < 1)
-          xp = 1;
-        lcd.rectangle(xp-1, yp+3, xp+xpw, yp+15, 0); // clear heading text are
+        nxp = (xp + 31*nxp)/32;
+        nyp = (yp + 31*nyp)/32;
+        xp = xc+nxp-12, yp = yc+nyp-8;
+        lcd.rectangle(xp-1, yp+3, xp+22, yp+14, 0); // clear heading text area
        lcd.setpos(xp, yp);
        lcd.print(status_buf[0]);
    }
@@ -1025,12 +984,12 @@
    case 1: lcd.print(F("plot 1h")); break;
    case 2: lcd.print(F("plot 1d")); break;
    }
-    lcd.setpos(0, 71);
+    lcd.setpos(0, 70);
    a = snprintf_P(status_buf[2], sizeof status_buf[2], PSTR("%d"), a);
    lcd.print(status_buf[2]);
-    lcd.rectangle( a*7+3, 82, a*7+4, 83, 255); // draw decimal
+    lcd.rectangle(0, a*7+3, 0, a*7+4, 255); // draw decimal
    snprintf_P(status_buf[2], sizeof status_buf[2], PSTR("%02d"), r);
-    lcd.setpos(a*7+6, 71);
+    lcd.setpos(a*7+6, 70);
    lcd.print(status_buf[2]);
#endif
Reply
#2
how did you regenerate it? With a different font file?
Reply
#3
(2021-05-17, 01:35 AM)seandepagnier Wrote: how did you regenerate it?   With a different font file?

i used font.ttf from pypilot_data/arduino/weathersensors/  and edited the generated header file from make_charset.py afterwards by hand (pixel after pixel).

kind regards...martin.
Reply
#4
Hi Martin,

Sort of semi-related to what you have done here (which is quite impressive btw), would you be able to provide some pointers to how I could rotate the displayed values 90 degrees?
As you can see here: http://guldburken.gote.org/maxi999/pypil....11.35.jpg, I am using an old Autohelm 2000 however I had to mount the display sideways. And it would obviously be better to have the text displayed with the correct orientation.
Reply
#5
there is no support for landscape output currently, however it would be possible to implement. the screen is not square so you can't just rotate things.

Did you have to mount the screen sideways ?
Reply
#6
I see. It would be quite welcome if you could consider implementing landscape mode.
I am unable to mount the screen in any other rotation and still have the pyilot board + the motor controller and associated circuits fit into the Autohelm 2000 box.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)