From ff48d8a2418312fd80d66cd16efcac05e9dff650 Mon Sep 17 00:00:00 2001 From: Metaln00b Date: Wed, 1 Dec 2021 23:40:10 +0100 Subject: [PATCH] 7_SEG: Add additional weather icons --- examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp | 6 +-- examples/WatchFaces/7_SEG/icons.h | 45 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp index 7389f14..f009756 100644 --- a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp +++ b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp @@ -132,15 +132,15 @@ void Watchy7SEG::drawWeather(){ }else if(weatherConditionCode == 800){//Clear weatherIcon = sunny; }else if(weatherConditionCode >=700){//Atmosphere - weatherIcon = cloudy; + weatherIcon = atmosphere; }else if(weatherConditionCode >=600){//Snow weatherIcon = snow; }else if(weatherConditionCode >=500){//Rain weatherIcon = rain; }else if(weatherConditionCode >=300){//Drizzle - weatherIcon = rain; + weatherIcon = drizzle; }else if(weatherConditionCode >=200){//Thunderstorm - weatherIcon = rain; + weatherIcon = thunderstorm; }else return; display.drawBitmap(145, 158, weatherIcon, WEATHER_ICON_WIDTH, WEATHER_ICON_HEIGHT, DARKMODE ? GxEPD_WHITE : GxEPD_BLACK); diff --git a/examples/WatchFaces/7_SEG/icons.h b/examples/WatchFaces/7_SEG/icons.h index 82fa6e0..b94e793 100644 --- a/examples/WatchFaces/7_SEG/icons.h +++ b/examples/WatchFaces/7_SEG/icons.h @@ -105,6 +105,51 @@ const unsigned char sunny [] PROGMEM = { 0xc0, 0x00, 0x00, 0x18, 0x20, 0x10, 0x60, 0x00, 0x00, 0x00, 0x21, 0x08, 0x00, 0x00, 0x00, 0x00, 0x41, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 }; +// 'atmosphere', 48x32px +const unsigned char atmosphere[] PROGMEM = { + 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x03, 0x81, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x07, 0x80, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x07, 0xff, 0xf8, 0xf0, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x60, 0x00, 0x9f, 0x1f, 0xff, 0xfc, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0xff, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +// 'drizzle', 48x32px +const unsigned char drizzle[] PROGMEM = { + 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x03, 0x81, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x07, 0x80, 0x00, 0xc0, 0x00, 0x00, + 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x80, + 0x00, 0x00, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x08, 0x00, 0x00 +}; +// 'thunderstorm', 48x32px +const unsigned char thunderstorm[] PROGMEM = { + 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x03, 0x81, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x30, + 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, + 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00, 0x07, 0x80, 0x00, 0xc0, 0x0f, 0x80, + 0x00, 0xc0, 0x03, 0x00, 0x0f, 0x80, 0x00, 0x20, 0x02, 0x00, 0x1f, 0x00, 0x00, 0x10, 0x04, 0x00, + 0x1e, 0x00, 0x00, 0x18, 0x04, 0x00, 0x3e, 0x00, 0x00, 0x08, 0x08, 0x00, 0x3c, 0x00, 0x00, 0x08, + 0x08, 0x00, 0x7c, 0x00, 0x00, 0x08, 0x04, 0x00, 0x78, 0x00, 0x00, 0x08, 0x04, 0x00, 0xf8, 0x00, + 0x00, 0x08, 0x04, 0x00, 0xff, 0x00, 0x00, 0x10, 0x02, 0x00, 0x1f, 0x00, 0x00, 0x30, 0x01, 0x80, + 0x1e, 0x00, 0x00, 0x60, 0x00, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; // 'steps', 19x23px const unsigned char steps [] PROGMEM = { 0x00, 0x03, 0xc0, 0x00, 0x07, 0xe0, 0x00, 0x07, 0xe0, 0x00, 0x0f, 0xe0, 0x78, 0x0f, 0xe0, 0xfc,