From 5f129ecb8419cd7c84802eafdb7ba02c75c78b53 Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Wed, 29 Dec 2021 15:01:03 -0500 Subject: [PATCH] Updated because is gone and calls now. --- examples/WatchFaces/7_SEG/7_SEG.ino | 23 +++++++++++----------- examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/examples/WatchFaces/7_SEG/7_SEG.ino b/examples/WatchFaces/7_SEG/7_SEG.ino index 37c2e1d..ec51dc5 100644 --- a/examples/WatchFaces/7_SEG/7_SEG.ino +++ b/examples/WatchFaces/7_SEG/7_SEG.ino @@ -1,12 +1,11 @@ -#include "Watchy_7_SEG.h" - -Watchy7SEG watchy; - -void setup(){ - watchy.init(); -} - -void loop(){} - - - +#include "Watchy_7_SEG.h" + +Watchy7SEG watchy; + +void setup(){ + // initialise weather to New York City, Celsius temperature, 30-minute updates, English language, SQFMI's API key + watchy.setupWeather(5128581, true, 30, String("en"), String("f058fe1cad2afe8e2ddc5d063a64cecb") ); + watchy.init(); +} + +void loop(){} diff --git a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp index 275722d..d068680 100644 --- a/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp +++ b/examples/WatchFaces/7_SEG/Watchy_7_SEG.cpp @@ -124,7 +124,7 @@ void Watchy7SEG::drawWeather(){ display.setCursor(159 - w - x1, 136); } display.println(temperature); - display.drawBitmap(165, 110, strcmp(TEMP_UNIT, "metric") == 0 ? celsius : fahrenheit, 26, 20, DARKMODE ? GxEPD_WHITE : GxEPD_BLACK); + display.drawBitmap(165, 110, weatherCelsius == true ? celsius : fahrenheit, 26, 20, DARKMODE ? GxEPD_WHITE : GxEPD_BLACK); const unsigned char* weatherIcon; //https://openweathermap.org/weather-conditions