From 192d09d40a1a52f513b70640a9f28245178a9295 Mon Sep 17 00:00:00 2001 From: Christian Baars Date: Thu, 2 Jun 2022 16:02:24 +0200 Subject: [PATCH] fix building without HomeKit --- tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino index ef705efa9..82bd6b24b 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino @@ -65,6 +65,9 @@ #include "include/xsns_62_esp32_mi.h" +#if USE_MI_HOMEKIT==0 + #undef USE_MI_HOMEKIT +#endif #ifdef USE_MI_HOMEKIT extern "C" void mi_homekit_main(void); extern "C" void mi_homekit_update_value(void* handle, float value, uint32_t type); @@ -1154,8 +1157,8 @@ bool MI32StartConnectionTask(){ void MI32ConnectionTask(void *pvParameters){ #if !defined(CONFIG_IDF_TARGET_ESP32C3) //needs more testing ... - NimBLEDevice::setOwnAddrType(BLE_OWN_ADDR_RANDOM,false); //seems to be important for i.e. xbox controller, hopefully not breaking other things - NimBLEDevice::setSecurityAuth(true, true, true); + // NimBLEDevice::setOwnAddrType(BLE_OWN_ADDR_RANDOM,false); //seems to be important for i.e. xbox controller, hopefully not breaking other things + // NimBLEDevice::setSecurityAuth(true, true, true); #endif //CONFIG_IDF_TARGET_ESP32C3 MI32.conCtx->error = MI32_CONN_NO_ERROR; if (MI32ConnectActiveSensor()){