From a8015cd57d85c872a7aa9f312f0438c2864ec7d4 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sun, 6 Mar 2022 16:24:19 +0100 Subject: [PATCH] update main program to recent sdk --- src/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index cfea129..84ac414 100644 --- a/src/main.cpp +++ b/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"); }