@brief Get a weather icon @param id Icon identifier/index @param isNight Use night icons (true) or not (false) @return String reference to icon
| 979 | /// @param isNight Use night icons (true) or not (false) |
| 980 | /// @return String reference to icon |
| 981 | const String getWeatherIcon(const uint8_t id, const bool isNight = false) { |
| 982 | const String weatherIcons[] = {"\uf00d", "\uf00c", "\uf002", "\uf013", "\uf013", "\uf014", "", "", "\uf014", "", "", |
| 983 | "\uf01a", "", "\uf01a", "", "\uf01a", "\uf017", "\uf017", "", "", "", |
| 984 | "\uf019", "", "\uf019", "", "\uf019", "\uf015", "\uf015", "", "", "", |
| 985 | "\uf01b", "", "\uf01b", "", "\uf01b", "", "\uf076", "", "", "\uf01a", |
| 986 | "\uf01a", "\uf01a", "", "", "\uf064", "\uf064", "", "", "", "", |
| 987 | "", "", "", "", "\uf01e", "\uf01d", "", "", "\uf01e"}; |
| 988 | if (isNight && id <= 2) { |
| 989 | const String nightIcons[] = {"\uf02e", "\uf083", "\uf086"}; |
| 990 | return nightIcons[id]; |
| 991 | } |
| 992 | return weatherIcons[id]; |
| 993 | } |
| 994 | |
| 995 | void drawWeatherContent(JsonDocument &doc, JsonDocument &loc, TFT_eSprite &spr, JsonObject &cfgobj, imgParam &imageParams, bool isForecast = false) { |
| 996 | const auto ¤tWeather = doc["current_weather"]; |
no outgoing calls
no test coverage detected