Stub for platforms without screens

This commit is contained in:
Ben Meadors 2022-08-18 15:00:29 -05:00
parent fae59fa9c9
commit 710dbabd4e
2 changed files with 2 additions and 5 deletions

View File

@ -20,6 +20,7 @@ class Screen
void forceDisplay() {} void forceDisplay() {}
void startBluetoothPinScreen(uint32_t pin) {} void startBluetoothPinScreen(uint32_t pin) {}
void stopBluetoothPinScreen() {} void stopBluetoothPinScreen() {}
void startRebootScreen() {}
}; };
} }

View File

@ -137,11 +137,7 @@ void NimbleBluetooth::setup()
NimBLEDevice::setPower(ESP_PWR_LVL_P9); NimBLEDevice::setPower(ESP_PWR_LVL_P9);
// FIXME fails in iOS // FIXME fails in iOS
if (config.bluetooth.mode == Config_BluetoothConfig_PairingMode_NoPin) { if (config.bluetooth.mode != Config_BluetoothConfig_PairingMode_NoPin) {
NimBLEDevice::setSecurityIOCap(BLE_HS_IO_NO_INPUT_OUTPUT);
NimBLEDevice::setSecurityAuth(true, false, true);
}
else {
NimBLEDevice::setSecurityAuth(true, true, true); NimBLEDevice::setSecurityAuth(true, true, true);
NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY); NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY);
} }