File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -154,14 +154,15 @@ WipperSnapper_Component_I2C::scanAddresses() {
154
154
155
155
// Scan all I2C addresses between 0x08 and 0x7F inclusive and return a list of
156
156
// those that respond.
157
- WS_DEBUG_PRINTLN (" EXEC: I2C Scan " );
157
+ WS_DEBUG_PRINTLN (" [i2c]: Scanning I2C Bus for Devices... " );
158
158
for (uint8_t address = 1 ; address < 127 ; ++address) {
159
+ WS_DEBUG_PRINT (" [i2c] Scanning Address: 0x" );
160
+ WS_DEBUG_PRINTLN (address, HEX);
159
161
_i2c->beginTransmission (address);
160
162
uint8_t endTransmissionRC = _i2c->endTransmission ();
161
163
162
164
if (endTransmissionRC == 0 ) {
163
- WS_DEBUG_PRINT (" Found I2C Device at 0x" );
164
- WS_DEBUG_PRINTLN (address);
165
+ WS_DEBUG_PRINT (" [i2c] Found Device" );
165
166
scanResp.addresses_found [scanResp.addresses_found_count ] =
166
167
(uint32_t )address;
167
168
scanResp.addresses_found_count ++;
@@ -208,8 +209,9 @@ WipperSnapper_Component_I2C::scanAddresses() {
208
209
WS.feedWDT ();
209
210
#endif
210
211
211
- WS_DEBUG_PRINT (" I2C Devices Found: " )
212
- WS_DEBUG_PRINTLN (scanResp.addresses_found_count );
212
+ WS_DEBUG_PRINT (" [i2c] Scan Complete! Found: " )
213
+ WS_DEBUG_PRINT (scanResp.addresses_found_count );
214
+ WS_DEBUG_PRINTLN (" Devices on bus." );
213
215
214
216
scanResp.bus_response = wippersnapper_i2c_v1_BusResponse_BUS_RESPONSE_SUCCESS;
215
217
return scanResp;
You can’t perform that action at this time.
0 commit comments