@@ -656,9 +656,8 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
656656 wippersnapper_i2c_I2cDeviceDescriptor device_descriptor =
657657 _i2c_model->GetI2cDeviceAddOrReplaceMsg ()->i2c_device_description ;
658658
659-
660659 // Did the driver initialize correctly?
661- if ( IsDriverInitialized (device_descriptor)) {
660+ if (IsDriverInitialized (device_descriptor)) {
662661 WS_DEBUG_PRINTLN (" [i2c] Driver already initialized, skipping..." );
663662 return true ;
664663 }
@@ -817,7 +816,8 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
817816 " the correct value for"
818817 " i2cDeviceAddress?" );
819818 }
820- return true ; // don't cause an error during runtime if the device is not found
819+ return true ; // don't cause an error during runtime if the device is not
820+ // found
821821 }
822822 WS_DEBUG_PRINTLN (" [i2c] Driver successfully initialized!" );
823823 }
@@ -858,7 +858,7 @@ bool I2cController::Handle_I2cDeviceAddOrReplace(pb_istream_t *stream) {
858858bool I2cController::ScanI2cBus (bool default_bus = true ) {
859859 _i2c_bus_default->InitBus (default_bus);
860860 _scan_results = wippersnapper_i2c_I2cBusScanned_init_zero;
861- if (! default_bus)
861+ if (!default_bus)
862862 return _i2c_bus_alt->ScanBus (&_scan_results);
863863 return _i2c_bus_default->ScanBus (&_scan_results);
864864}
@@ -877,7 +877,7 @@ bool I2cController::WasDeviceScanned(uint32_t address) {
877877 if (num_found_devices == 0 )
878878 return false ; // no devices found on bus, or scan was not performed
879879
880- // Check if the device was found on the bus
880+ // Check if the device was found on the bus
881881 for (pb_size_t i; i < num_found_devices; i++) {
882882 if (_scan_results.i2c_bus_found_devices [i].i2c_device_address == address)
883883 return true ; // device found on bus!
0 commit comments