mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-05 20:26:31 +02:00
update: WiFiConnector Post To AirGradient
default checked and add explain text
This commit is contained in:
@ -21,7 +21,8 @@ void WifiConnector::setAirGradient(AirGradient *ag) { this->ag = ag; }
|
|||||||
* @param log Stream
|
* @param log Stream
|
||||||
* @param sm StateMachine
|
* @param sm StateMachine
|
||||||
*/
|
*/
|
||||||
WifiConnector::WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm,Configuration& config)
|
WifiConnector::WifiConnector(OledDisplay &disp, Stream &log, StateMachine &sm,
|
||||||
|
Configuration &config)
|
||||||
: PrintLog(log, "WifiConnector"), disp(disp), sm(sm), config(config) {}
|
: PrintLog(log, "WifiConnector"), disp(disp), sm(sm), config(config) {}
|
||||||
#else
|
#else
|
||||||
WifiConnector::WifiConnector(Stream &log) : PrintLog(log, "WiFiConnector") {}
|
WifiConnector::WifiConnector(Stream &log) : PrintLog(log, "WiFiConnector") {}
|
||||||
@ -62,8 +63,15 @@ bool WifiConnector::connect(void) {
|
|||||||
#endif
|
#endif
|
||||||
WIFI()->setConfigPortalTimeout(WIFI_CONNECT_COUNTDOWN_MAX);
|
WIFI()->setConfigPortalTimeout(WIFI_CONNECT_COUNTDOWN_MAX);
|
||||||
|
|
||||||
WiFiManagerParameter postToAg("chbPostToAg", "Post To AirGradient", "T", 2, "type=\"checkbox\" ", WFM_LABEL_AFTER);
|
WiFiManagerParameter postToAg("chbPostToAg", "Post To AirGradient", "T", 2,
|
||||||
|
"type=\"checkbox\" checked", WFM_LABEL_AFTER);
|
||||||
WIFI()->addParameter(&postToAg);
|
WIFI()->addParameter(&postToAg);
|
||||||
|
WiFiManagerParameter postToAgInfo(
|
||||||
|
"<p>Connect to AirGradient Cloud. Important: Only disable if you are "
|
||||||
|
"sure you don't want to use any AirGradient cloud features. Your data "
|
||||||
|
"will not be available for the AirGradient map and no automatic updates "
|
||||||
|
"will be received). </p>");
|
||||||
|
WIFI()->addParameter(&postToAgInfo);
|
||||||
|
|
||||||
WIFI()->autoConnect(ssid.c_str(), WIFI_HOTSPOT_PASSWORD_DEFAULT);
|
WIFI()->autoConnect(ssid.c_str(), WIFI_HOTSPOT_PASSWORD_DEFAULT);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user