|
@ -29,12 +29,12 @@ extern "C" { |
|
|
#include "main.h" |
|
|
#include "main.h" |
|
|
#include "passwords.h" |
|
|
#include "passwords.h" |
|
|
|
|
|
|
|
|
const char* server = "ingress.opensensemap.org"; |
|
|
const char* server PROGMEM = "ingress.opensensemap.org"; |
|
|
|
|
|
|
|
|
#define MQTT_MAX_PACKET_SIZE 512 |
|
|
#define MQTT_MAX_PACKET_SIZE 512 |
|
|
const char* mqttserver = "home.xd0.de"; |
|
|
const char* mqttserver PROGMEM = "home.xd0.de"; |
|
|
const char* mqttusername = "esp-weatherstation"; |
|
|
const char* mqttusername PROGMEM = "esp-weatherstation"; |
|
|
const char* mqttpassword = PWD_MQTT; |
|
|
const char* mqttpassword PROGMEM = PWD_MQTT; |
|
|
|
|
|
|
|
|
constexpr unsigned int postingInterval = 60000; //Uploadintervall in Millisekunden
|
|
|
constexpr unsigned int postingInterval = 60000; //Uploadintervall in Millisekunden
|
|
|
constexpr unsigned int dhcp_interval = 60*60*1000; |
|
|
constexpr unsigned int dhcp_interval = 60*60*1000; |
|
@ -121,7 +121,7 @@ unsigned long rtcMillis() { |
|
|
return ((uint64_t)(rtc_t*(uint64_t)cal) >> 12)/1000; |
|
|
return ((uint64_t)(rtc_t*(uint64_t)cal) >> 12)/1000; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void fpm_wakup_cb_func1(void) { |
|
|
void ICACHE_RAM_ATTR fpm_wakup_cb_func1(void) { |
|
|
//gpio_pin_wakeup_disable();
|
|
|
//gpio_pin_wakeup_disable();
|
|
|
//ESP.wdtFeed();
|
|
|
//ESP.wdtFeed();
|
|
|
//wifi_fpm_do_wakeup();
|
|
|
//wifi_fpm_do_wakeup();
|
|
@ -129,7 +129,7 @@ void fpm_wakup_cb_func1(void) { |
|
|
geiger_counts++; |
|
|
geiger_counts++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void lightsleep() { |
|
|
void inline lightsleep() { |
|
|
ESP.wdtFeed(); |
|
|
ESP.wdtFeed(); |
|
|
wifi_station_disconnect(); |
|
|
wifi_station_disconnect(); |
|
|
wifi_set_opmode(NULL_MODE); |
|
|
wifi_set_opmode(NULL_MODE); |
|
|