mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 01:42:15 +00:00
add missing files
This commit is contained in:
parent
f7b12f0695
commit
86c7eefc91
@ -167,7 +167,7 @@ void setupMeshService(void)
|
|||||||
// any characteristic(s) within that service definition.. Calling .begin() on
|
// any characteristic(s) within that service definition.. Calling .begin() on
|
||||||
// a BLECharacteristic will cause it to be added to the last BLEService that
|
// a BLECharacteristic will cause it to be added to the last BLEService that
|
||||||
// was 'begin()'ed!
|
// 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.setProperties(CHR_PROPS_NOTIFY | CHR_PROPS_READ);
|
||||||
fromNum.setPermission(secMode, SECMODE_NO_ACCESS); // FIXME, secure this!!!
|
fromNum.setPermission(secMode, SECMODE_NO_ACCESS); // FIXME, secure this!!!
|
||||||
@ -221,8 +221,8 @@ void NRF52Bluetooth::setup()
|
|||||||
Bluefruit.Advertising.clearData();
|
Bluefruit.Advertising.clearData();
|
||||||
Bluefruit.ScanResponse.clearData();
|
Bluefruit.ScanResponse.clearData();
|
||||||
|
|
||||||
if (config.bluetooth.mode != Config_BluetoothConfig_PairingMode_NoPin) {
|
if (config.bluetooth.mode != Config_BluetoothConfig_PairingMode_NO_PIN) {
|
||||||
configuredPasskey = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_FixedPin ?
|
configuredPasskey = config.bluetooth.mode == Config_BluetoothConfig_PairingMode_FIXED_PIN ?
|
||||||
config.bluetooth.fixed_pin : random(100000, 999999);
|
config.bluetooth.fixed_pin : random(100000, 999999);
|
||||||
auto pinString = std::to_string(configuredPasskey);
|
auto pinString = std::to_string(configuredPasskey);
|
||||||
DEBUG_MSG("Bluetooth pin set to '%i'\n", configuredPasskey);
|
DEBUG_MSG("Bluetooth pin set to '%i'\n", configuredPasskey);
|
||||||
|
@ -108,7 +108,7 @@ void checkSDEvents()
|
|||||||
while (NRF_SUCCESS == sd_evt_get(&evt)) {
|
while (NRF_SUCCESS == sd_evt_get(&evt)) {
|
||||||
switch (evt) {
|
switch (evt) {
|
||||||
case NRF_EVT_POWER_FAILURE_WARNING:
|
case NRF_EVT_POWER_FAILURE_WARNING:
|
||||||
RECORD_CRITICALERROR(CriticalErrorCode_Brownout);
|
RECORD_CRITICALERROR(CriticalErrorCode_BROWNOUT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -118,7 +118,7 @@ void checkSDEvents()
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (NRF_POWER->EVENTS_POFWARN)
|
if (NRF_POWER->EVENTS_POFWARN)
|
||||||
RECORD_CRITICALERROR(CriticalErrorCode_Brownout);
|
RECORD_CRITICALERROR(CriticalErrorCode_BROWNOUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user