Browse Source

update main program to recent sdk

main
Hendrik Langer 3 years ago
parent
commit
a8015cd57d
  1. 11
      src/main.cpp

11
src/main.cpp

@ -88,7 +88,7 @@ ADC_MODE(ADC_VCC);
ESP8266WiFiMulti wifiMulti;
HTTPClient httpclient;
WiFiClientSecure net;
BearSSL::WiFiClientSecure net;
MQTTClient mqttclient(MQTT_MAX_PACKET_SIZE);
os_timer_t Timer1;
@ -130,7 +130,7 @@ unsigned long rtcMillis() {
return ((uint64_t)(rtc_t*(uint64_t)cal) >> 12)/1000;
}
void ICACHE_RAM_ATTR fpm_wakup_cb_func1(void) {
void IRAM_ATTR fpm_wakup_cb_func1(void) {
//gpio_pin_wakeup_disable();
//ESP.wdtFeed();
geiger_counts++;
@ -380,9 +380,10 @@ void ICACHE_FLASH_ATTR sendValues() {
}
#if ESP_SDK_VERSION_NUMBER >= 0x020200
//net.setFingerprint(httpsFingerprint);
//#if ESP_SDK_VERSION_NUMBER >= 0x020200
net.setInsecure();
#endif
//#endif
mqttclient.begin(mqttserver, 8883, net);
constexpr unsigned int retry_delay = 500;
for (int tries=0; tries<5 && !mqttclient.connect(MQTT_USERNAME, MQTT_USERNAME, MQTT_PASSWORD); tries++ ) {
@ -419,7 +420,7 @@ void ICACHE_FLASH_ATTR sendValues() {
}
// geiger event when gpio pulled low (called vin on board)
void ICACHE_RAM_ATTR ISR_geiger_impulse() {
void IRAM_ATTR ISR_geiger_impulse() {
geiger_counts++;
//DEBUG_MSG("X\n");
}

Loading…
Cancel
Save