mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-18 16:52:27 +00:00
Refactor i2cScan.h To Handle 2 Bus (#2337)
* Break i2cScan out into a set of classes for scanning i2c * refactor i2cscan addresses to be structs that allow addressing by port + address * build whoopsies * trunk fmt * trunk fmt * lost some build fixes from the merge * more cleaning for build safety, RTC behavior
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "configuration.h"
|
||||
|
||||
#include "../detect/ScanI2C.h"
|
||||
#include "Channels.h"
|
||||
#include "CryptoEngine.h"
|
||||
#include "FSCommon.h"
|
||||
@@ -181,7 +182,7 @@ void NodeDB::installDefaultConfig()
|
||||
#if defined(ST7735_CS) || defined(USE_EINK) || defined(ILI9341_DRIVER)
|
||||
bool hasScreen = true;
|
||||
#else
|
||||
bool hasScreen = screen_found;
|
||||
bool hasScreen = screen_found.port != ScanI2C::I2CPort::NO_I2C;
|
||||
#endif
|
||||
config.bluetooth.mode = hasScreen ? meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN
|
||||
: meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN;
|
||||
|
||||
Reference in New Issue
Block a user