Merge branch 'master' into master

This commit is contained in:
Thomas Göttgens
2022-09-09 21:39:29 +02:00
committed by GitHub
56 changed files with 780 additions and 820 deletions

View File

@@ -46,7 +46,7 @@
#if defined(TBEAM_V10)
#define HW_VENDOR HardwareModel_TBEAM
#elif defined(TBEAM_V07)
#define HW_VENDOR HardwareModel_TBEAM0p7
#define HW_VENDOR HardwareModel_TBEAM_V0P7
#elif defined(LILYGO_TBEAM_S3_CORE)
#define HW_VENDOR HardwareModel_LILYGO_TBEAM_S3_CORE
#elif defined(DIY_V1)
@@ -67,9 +67,9 @@
#elif defined(TLORA_V2)
#define HW_VENDOR HardwareModel_TLORA_V2
#elif defined(TLORA_V1_3)
#define HW_VENDOR HardwareModel_TLORA_V1_1p3
#define HW_VENDOR HardwareModel_TLORA_V1_1P3
#elif defined(TLORA_V2_1_16)
#define HW_VENDOR HardwareModel_TLORA_V2_1_1p6
#define HW_VENDOR HardwareModel_TLORA_V2_1_1P6
#elif defined(GENIEBLOCKS)
#define HW_VENDOR HardwareModel_GENIEBLOCKS
#elif defined(PRIVATE_HW)

View File

@@ -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);

View File

@@ -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);
}
}