Merge pull request #15732 from Staars/mi32

MI32 (legacy): fix building without HomeKit
This commit is contained in:
Theo Arends 2022-06-02 16:13:41 +02:00 committed by GitHub
commit 2370327395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -65,6 +65,9 @@
#include "include/xsns_62_esp32_mi.h" #include "include/xsns_62_esp32_mi.h"
#if USE_MI_HOMEKIT==0
#undef USE_MI_HOMEKIT
#endif
#ifdef USE_MI_HOMEKIT #ifdef USE_MI_HOMEKIT
extern "C" void mi_homekit_main(void); extern "C" void mi_homekit_main(void);
extern "C" void mi_homekit_update_value(void* handle, float value, uint32_t type); extern "C" void mi_homekit_update_value(void* handle, float value, uint32_t type);
@ -1154,8 +1157,8 @@ bool MI32StartConnectionTask(){
void MI32ConnectionTask(void *pvParameters){ void MI32ConnectionTask(void *pvParameters){
#if !defined(CONFIG_IDF_TARGET_ESP32C3) //needs more testing ... #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::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::setSecurityAuth(true, true, true);
#endif //CONFIG_IDF_TARGET_ESP32C3 #endif //CONFIG_IDF_TARGET_ESP32C3
MI32.conCtx->error = MI32_CONN_NO_ERROR; MI32.conCtx->error = MI32_CONN_NO_ERROR;
if (MI32ConnectActiveSensor()){ if (MI32ConnectActiveSensor()){