Skip to content

Commit 5989586

Browse files
committed
possible fix for wifi not starting when not autoloading i2c devices
1 parent a480e71 commit 5989586

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Flux/spSpark.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,14 @@ bool flxFlux::start()
6565

6666
writeBanner();
6767

68+
// Init the I2c bus - 3/2024 - found that the bus wasn't initialized and
69+
// auto-load wasn't called, wifi wouldn't connect -- related to i2c bus being *on*?
70+
71+
flxBusI2C thei2cBus = i2cDriver();
72+
6873
// Build drivers for the registered devices connected to the system
6974
if (_deviceAutoload)
70-
flxDeviceFactory::get().buildDevices(i2cDriver());
75+
flxDeviceFactory::get().buildDevices(thei2cBus);
7176

7277
if (_theApplication)
7378
_theApplication->onDeviceLoad();

0 commit comments

Comments
 (0)