Screen changes and fixes (#1651)

* Fixed bluetooth reinit bug

* Remove screen transition ms

* Whoops

* hasScreen is smarter now

* Oops
This commit is contained in:
Ben Meadors
2022-08-25 11:25:05 -05:00
committed by GitHub
parent d7e5eb4d22
commit 1013aff9b6
7 changed files with 9 additions and 21 deletions

View File

@@ -159,7 +159,12 @@ void NodeDB::installDefaultConfig()
// FIXME: Default to bluetooth capability of platform as default
config.bluetooth.enabled = true;
config.bluetooth.fixed_pin = defaultBLEPin;
config.bluetooth.mode = screen_found ? Config_BluetoothConfig_PairingMode_RandomPin : Config_BluetoothConfig_PairingMode_FixedPin;
#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER)
bool hasScreen = true;
#else
bool hasScreen = screen_found;
#endif
config.bluetooth.mode = hasScreen ? Config_BluetoothConfig_PairingMode_RandomPin : Config_BluetoothConfig_PairingMode_FixedPin;
// for backward compat, default position flags are ALT+MSL
config.position.position_flags = (Config_PositionConfig_PositionFlags_POS_ALTITUDE | Config_PositionConfig_PositionFlags_POS_ALT_MSL);
}