From 86c7eefc914dd4ddc15fd1cfe9d6d8c3682cbfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 9 Sep 2022 12:55:31 +0200 Subject: [PATCH] add missing files --- src/platform/nrf52/NRF52Bluetooth.cpp | 6 +++--- src/platform/nrf52/main-nrf52.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index 93a486d45..bfa3887ed 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -167,7 +167,7 @@ void setupMeshService(void) // any characteristic(s) within that service definition.. Calling .begin() on // a BLECharacteristic will cause it to be added to the last BLEService that // was 'begin()'ed! - auto secMode = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_NoPin ? SECMODE_OPEN : SECMODE_ENC_NO_MITM; + auto secMode = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_NO_PIN ? SECMODE_OPEN : SECMODE_ENC_NO_MITM; fromNum.setProperties(CHR_PROPS_NOTIFY | CHR_PROPS_READ); fromNum.setPermission(secMode, SECMODE_NO_ACCESS); // FIXME, secure this!!! @@ -221,8 +221,8 @@ void NRF52Bluetooth::setup() Bluefruit.Advertising.clearData(); Bluefruit.ScanResponse.clearData(); - if (config.bluetooth.mode != Config_BluetoothConfig_PairingMode_NoPin) { - configuredPasskey = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_FixedPin ? + if (config.bluetooth.mode != Config_BluetoothConfig_PairingMode_NO_PIN) { + configuredPasskey = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_FIXED_PIN ? config.bluetooth.fixed_pin : random(100000, 999999); auto pinString = std::to_string(configuredPasskey); DEBUG_MSG("Bluetooth pin set to '%i'\n", configuredPasskey); diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index 589e4ae59..254ab695b 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -108,7 +108,7 @@ void checkSDEvents() while (NRF_SUCCESS == sd_evt_get(&evt)) { switch (evt) { case NRF_EVT_POWER_FAILURE_WARNING: - RECORD_CRITICALERROR(CriticalErrorCode_Brownout); + RECORD_CRITICALERROR(CriticalErrorCode_BROWNOUT); break; default: @@ -118,7 +118,7 @@ void checkSDEvents() } } else { if (NRF_POWER->EVENTS_POFWARN) - RECORD_CRITICALERROR(CriticalErrorCode_Brownout); + RECORD_CRITICALERROR(CriticalErrorCode_BROWNOUT); } }