103 lines
4.3 KiB
C
103 lines
4.3 KiB
C
#ifndef __IMAGE__
|
|
#define __IMAGE__
|
|
|
|
#include <sys/pgmspace.h>
|
|
#include <SSD1306Wire.h>
|
|
#include <OLEDDisplayUi.h>
|
|
|
|
// wifi已连接图标 16*16
|
|
const unsigned char Wifi_Connected_Icon[] PROGMEM = {
|
|
0x18,0x00,0x0c,0x00,0x8c,0x01,0x86,0x01,0xc6,0x00,0xc3,0x18,0x63,0x18,0x63,0xcc,
|
|
0x63,0xcc,0x63,0x18,0xc3,0x18,0xc6,0x00,0x86,0x01,0x8c,0x01,0x0c,0x00,0x18,0x00
|
|
};
|
|
// wifi未连接图标 16*16
|
|
const unsigned char Wifi_Unconnected_Icon[] PROGMEM = {
|
|
0x18,0xc0,0x0c,0xe0,0x8c,0x71,0x86,0x39,0xc6,0x1c,0xc3,0x1e,0x63,0x1f,0xe3,0xcf,
|
|
0xe3,0xcd,0xe3,0x18,0xf3,0x18,0xfe,0x00,0x9e,0x01,0x8e,0x01,0x0f,0x00,0x1b,0x00
|
|
};
|
|
// 路由器图标 16*16
|
|
const unsigned char Router_Icon[] PROGMEM = {
|
|
0x38,0xfc,0x70,0x84,0xe0,0xb4,0xc0,0xa5,0x80,0xa7,0x00,0xa7,0x00,0x86,0x00,0x84,
|
|
0x00,0x84,0x00,0x86,0x00,0x87,0x80,0xb7,0xc0,0xb5,0xe0,0x84,0x70,0x84,0x38,0xfc,
|
|
};
|
|
// 板子图标 16*16
|
|
const unsigned char Board_Icon[] PROGMEM = {
|
|
0xff,0xff,0x01,0x80,0x3f,0x80,0x23,0x80,0x23,0x80,0x3f,0x80,0x01,0x80,0xff,0xff,
|
|
0x00,0x00,0x30,0x0c,0xe0,0x07,0x06,0x60,0x1c,0x38,0xf0,0x0f,0x00,0x00,0x00,0x00
|
|
};
|
|
|
|
// bilibili 24*24
|
|
const unsigned char Bilibilitv_Icon[] PROGMEM = {
|
|
0x00,0x00,0x02,0x00,0x00,0x03,0x30,0x00,0x01,0xe0,0x80,0x01,
|
|
0x80,0xc3,0x00,0x00,0xef,0x00,0xff,0xff,0xff,0x03,0x00,0xc0,
|
|
0xf9,0xff,0xdf,0x09,0x00,0xd0,0x09,0x00,0xd0,0x89,0xc1,0xd1,
|
|
0xe9,0x81,0xd3,0x69,0x00,0xd6,0x09,0x91,0xd0,0x09,0xdb,0xd0,
|
|
0x09,0x7e,0xd0,0x0d,0x00,0xd0,0x4d,0x89,0xdb,0xfb,0xff,0xdf,
|
|
0x03,0x00,0xc0,0xff,0xff,0xff,0x78,0x00,0x1e,0x30,0x00,0x0c
|
|
};
|
|
|
|
#define WiFi_Logo_width 60
|
|
#define WiFi_Logo_height 36
|
|
const uint8_t WiFi_Logo_bits[] PROGMEM = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF,
|
|
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
|
|
0xFF, 0x03, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
|
|
0x00, 0xFF, 0xFF, 0xFF, 0x07, 0xC0, 0x83, 0x01, 0x80, 0xFF, 0xFF, 0xFF,
|
|
0x01, 0x00, 0x07, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00,
|
|
0xC0, 0xFF, 0xFF, 0x7C, 0x00, 0x60, 0x0C, 0x00, 0xC0, 0x31, 0x46, 0x7C,
|
|
0xFC, 0x77, 0x08, 0x00, 0xE0, 0x23, 0xC6, 0x3C, 0xFC, 0x67, 0x18, 0x00,
|
|
0xE0, 0x23, 0xE4, 0x3F, 0x1C, 0x00, 0x18, 0x00, 0xE0, 0x23, 0x60, 0x3C,
|
|
0x1C, 0x70, 0x18, 0x00, 0xE0, 0x03, 0x60, 0x3C, 0x1C, 0x70, 0x18, 0x00,
|
|
0xE0, 0x07, 0x60, 0x3C, 0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C,
|
|
0xFC, 0x73, 0x18, 0x00, 0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00,
|
|
0xE0, 0x87, 0x70, 0x3C, 0x1C, 0x70, 0x18, 0x00, 0xE0, 0x8F, 0x71, 0x3C,
|
|
0x1C, 0x70, 0x18, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x08, 0x00,
|
|
0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x0C, 0x00, 0x80, 0xFF, 0xFF, 0x1F,
|
|
0x00, 0x00, 0x06, 0x00, 0x80, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x07, 0x00,
|
|
0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF8, 0xFF, 0xFF,
|
|
0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x01, 0x00, 0x00,
|
|
0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF,
|
|
0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x80, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
|
|
const uint8_t Active_Symbol_Icon[] PROGMEM = {
|
|
B00000000,
|
|
B00000000,
|
|
B00011000,
|
|
B00100100,
|
|
B01000010,
|
|
B01000010,
|
|
B00100100,
|
|
B00011000
|
|
};
|
|
|
|
const uint8_t Inactive_Symbol_Icon[] PROGMEM = {
|
|
B00000000,
|
|
B00000000,
|
|
B00000000,
|
|
B00000000,
|
|
B00011000,
|
|
B00011000,
|
|
B00000000,
|
|
B00000000
|
|
};
|
|
|
|
void oledWebFrame(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
|
|
void oledMQTTFrame(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
|
|
void oledBilibiliFrame(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
|
|
void oledOsFrame(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
|
|
|
|
extern int frameCount;
|
|
extern FrameCallback frames[];
|
|
|
|
void timeOverlay(OLEDDisplay *display, OLEDDisplayUiState* state);
|
|
|
|
extern int overlaysCount;
|
|
extern OverlayCallback overlays[];
|
|
|
|
#endif |