Skip to content

Commit

Permalink
Merge branch 'lmarzen:main' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottr-arch authored Apr 18, 2024
2 parents f27a432 + 2aef018 commit c8510b2
Show file tree
Hide file tree
Showing 14 changed files with 1,258 additions and 984 deletions.
9 changes: 6 additions & 3 deletions platformio/include/_locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <vector>
#include <Arduino.h>
#include <aqi.h>

// LC_TIME
extern const char *LC_D_T_FMT;
Expand Down Expand Up @@ -48,7 +49,8 @@ extern const char *TXT_WIND;
extern const char *TXT_HUMIDITY;
extern const char *TXT_UV_INDEX;
extern const char *TXT_PRESSURE;
extern const char *TXT_AIR_QUALITY_INDEX;
extern const char *TXT_AIR_QUALITY;
extern const char *TXT_AIR_POLLUTION;
extern const char *TXT_VISIBILITY;
extern const char *TXT_INDOOR_TEMPERATURE;
extern const char *TXT_INDOOR_HUMIDITY;
Expand Down Expand Up @@ -150,12 +152,13 @@ extern const std::vector<String> TERM_STRONG_WIND;

// AIR QUALITY INDEX
extern "C" {
extern const aqi_scale_t AQI_SCALE;
extern const char *AUSTRALIA_AQI_TXT[6];
extern const char *CANADA_AQHI_TXT[4];
extern const char *EUROPE_CAQI_TXT[5];
extern const char *EUROPEAN_UNION_CAQI_TXT[5];
extern const char *HONG_KONG_AQHI_TXT[5];
extern const char *INDIA_AQI_TXT[6];
extern const char *MAINLAND_CHINA_AQI_TXT[6];
extern const char *CHINA_AQI_TXT[6];
extern const char *SINGAPORE_PSI_TXT[5];
extern const char *SOUTH_KOREA_CAI_TXT[4];
extern const char *UNITED_KINGDOM_DAQI_TXT[4];
Expand Down
30 changes: 3 additions & 27 deletions platformio/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,6 @@
// #define UNITS_PRECIP_CENTIMETERS
// #define UNITS_PRECIP_INCHES

// AIR QUALITY INDEX
// Seemingly every country uses a different scale for Air Quality Index (AQI).
// I have written a library to calculate many of the most popular AQI scales.
// Feel free to request the addition of a new AQI scale by opening an Issue.
// https://github.com/lmarzen/pollutant-concentration-to-aqi
// Define your preferred AQI scale.
// AUSTRALIA_AQI CANADA_AQHI EUROPE_CAQI
// HONG_KONG_AQHI INDIA_AQI MAINLAND_CHINA_AQI
// SINGAPORE_PSI SOUTH_KOREA_CAI UNITED_KINGDOM_DAQI
// UNITED_STATES_AQI
#define UNITED_STATES_AQI

// Hypertext Transfer Protocol (HTTP)
// HTTP
// HTTP does not provide encryption or any security measures, making it highly
Expand All @@ -143,8 +131,8 @@
// 2030-12-31 23:59:59.
// (uncomment exactly one)
// #define USE_HTTP
#define USE_HTTPS_NO_CERT_VERIF
// #define USE_HTTPS_WITH_CERT_VERIF
// #define USE_HTTPS_NO_CERT_VERIF
#define USE_HTTPS_WITH_CERT_VERIF

// WIND DIRECTION INDICATOR
// Choose whether the wind direction indicator should be an arrow, number, or
Expand Down Expand Up @@ -231,7 +219,7 @@
#define STATUS_BAR_EXTRAS_WIFI_RSSI 0

// BATTERY MONITORING
// You may choose to power your whether display with or without a battery.
// You may choose to power your weather display with or without a battery.
// Low power behavior can be controlled in config.cpp.
// If you wish to disable battery monitoring set this macro to 0.
#define BATTERY_MONITORING 1
Expand Down Expand Up @@ -336,18 +324,6 @@ extern const unsigned long VERY_LOW_BATTERY_SLEEP_INTERVAL;
^ defined(UNITS_PRECIP_INCHES))
#error Invalid configuration. Exactly one precipitation measurement must be selected.
#endif
#if !( defined(AUSTRALIA_AQI) \
^ defined(CANADA_AQHI) \
^ defined(EUROPE_CAQI) \
^ defined(HONG_KONG_AQHI) \
^ defined(INDIA_AQI) \
^ defined(MAINLAND_CHINA_AQI) \
^ defined(SINGAPORE_PSI) \
^ defined(SOUTH_KOREA_CAI) \
^ defined(UNITED_KINGDOM_DAQI) \
^ defined(UNITED_STATES_AQI))
#error Invalid configuration. Exactly one air quality index scale must be selected.
#endif
#if !( defined(USE_HTTP) \
^ defined(USE_HTTPS_NO_CERT_VERIF) \
^ defined(USE_HTTPS_WITH_CERT_VERIF))
Expand Down
Loading

0 comments on commit c8510b2

Please sign in to comment.