Divers ajouts et correctifs

ajout sauvegarde en flash
et ajout écran de veille
This commit is contained in:
2026-05-22 00:35:39 +02:00
parent 71753703e8
commit 41fdaaa1ae
8 changed files with 357 additions and 108 deletions

View File

@@ -63,6 +63,9 @@ const char * _finish_=
const char * _logo_ = "Star Trek:o=5,d=16,b=63,b=63:8f.,a#,4d#6.,8d6,a#.,g.,c6.,4f6";
const char * _neon_ =
"Neonligh:d=4,o=5,b=100:8e#7,16p,16d#7,8d#7,8p,16c#7,8c#6,16a#6,8e#7,16p,16d#7,8d#7,8p,8c#7,16a#6,8e#7,16p,16a#6,8a#6,8p,16c#7,8d#7,16e#7,8e#7,16p,8d#7";
const char * _com_ = "Communic:d=4,o=5,b=100:16g#7,8a#7,16a#7,16a#7,8f#7";
const char * _pop_ = "Popcorn:d=1,o=5,b=800:8c6,8a#,8c6,8g,8d#,8g,c6";
const char * _clk_ = "clock:d=16,o=8,b=420:b7,32p,c";
void playRTTTL (screen_t itune){
//#ifdef SOUND_ON
@@ -71,32 +74,42 @@ void playRTTTL (screen_t itune){
return;
case sLOGO : anyrtttl::blocking::play(PIEZO, _logo_); break;
case sTITRE : ; break; //rtune = _missip1_
case sCHOIX : anyrtttl::blocking::play(PIEZO, _neon_); break;
case sCHOIX : anyrtttl::blocking::play(PIEZO, _com_); break;
case sEXPOS : anyrtttl::blocking::play(PIEZO, _finish_); break;
case sREGLE : ; break; //tune = _count_
default : ; break;
}
}
void playPop(){ anyrtttl::blocking::play(PIEZO, _pop_);}
void playClk(){ anyrtttl::blocking::play(PIEZO, _clk_);}
// Snooze screen saver
#define SNOOZE_HEIGHT 16
#define SNOOZE_WIDTH 16
#define XPOS 0 // Indexes into the 'icons' array in function below
#define YPOS 1
#define DELTAY 2
#define _DISPLAYWIDTH 128
#define _DISPLAYHEIGHT 32
#define FLOCONS 4 // snowflakes in animation
const unsigned char flake_bmp [] PROGMEM = {
0x01, 0x80, 0xc3, 0xc3, 0xe3, 0xc7, 0xfb, 0xdf, 0x7f, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0,
0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe, 0xfb, 0xdf, 0xe3, 0xc7, 0xc3, 0xc3, 0x01, 0x80
};
// 'smiley', 16x16px
const unsigned char smiley_bmp [] PROGMEM = {
0x07, 0xc0, 0x1f, 0xf0, 0x3f, 0xf8, 0x7f, 0xfc, 0x63, 0x8c, 0xdd, 0x76, 0xd3, 0x96, 0xe7, 0xce,
0xff, 0xfe, 0xfd, 0x7e, 0x6f, 0xec, 0x73, 0x9c, 0x3c, 0x78, 0x1f, 0xf0, 0x07, 0xc0, 0x00, 0x00
};
// 'frown', 16x16px
const unsigned char frown_bmp [] PROGMEM = {
0x07, 0xc0, 0x1f, 0xf0, 0x3f, 0xf8, 0x67, 0xcc, 0x53, 0x94, 0xdd, 0x76, 0xd9, 0x36, 0xe1, 0x0e,
0xff, 0xfe, 0xff, 0xfe, 0x78, 0x3c, 0x73, 0x9c, 0x37, 0xd8, 0x1f, 0xf0, 0x07, 0xc0, 0x00, 0x00
};
//sprite_t smiley = { 6, 16, 16, 0, 1, 2, smiley_bmp };
//sprite_t frown = { unsigned short c6, 16, 16, 0, 1, 2, frown_bmp };
/*
// flower
static const unsigned char PROGMEM flower_bmp[] = {
0b00000000, 0b11000000,
0b00000001, 0b11000000,
0b00000001, 0b11000000,
0b00000011, 0b11100000,
0b11110011, 0b11100000,
0b11111110, 0b11111000,
0b01111110, 0b11111111,
0b00110011, 0b10011111,
0b00011111, 0b11111100,
0b00001101, 0b01110000,
0b00011011, 0b10100000,
0b00111111, 0b11100000,
0b00111111, 0b11110000,
0b01111100, 0b11110000,
0b01110000, 0b01110000,
0b00000000, 0b00110000 };
*/
#endif // _INSOLAB_BITMAP_H_