Skip to content

Commit 519a300

Browse files
authored
Merge pull request #19 from dhebbeker/feature/debug-sensor-identification
Pretty up sensor identification output for debugging.
2 parents 938ace1 + 1ade845 commit 519a300

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vl53l1_class.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ class VL53L1 : public RangeSensor {
341341
#ifdef DEBUG_MODE
342342
uint8_t byteData;
343343
uint16_t wordData;
344-
status = VL53L1_RdByte(Dev, 0x010F, &byteData);
344+
status = VL53L1_RdByte(Dev, VL53L1_IDENTIFICATION__MODEL_ID, &byteData);
345345
Serial.println("VL53L1 Model_ID: " + String(byteData));
346-
status = VL53L1_RdByte(Dev, 0x0110, &byteData);
346+
status = VL53L1_RdByte(Dev, VL53L1_IDENTIFICATION__MODULE_TYPE, &byteData);
347347
Serial.println("VL53L1 Module_Type: " + String(byteData));
348-
status = VL53L1_RdWord(Dev, 0x010F, &wordData);
349-
Serial.println("VL53L1: " + String(wordData));
348+
status = VL53L1_RdWord(Dev, VL53L1_IDENTIFICATION__MODULE_ID, &wordData);
349+
Serial.println("VL53L1 Module_ID: " + String(wordData));
350350
#endif
351351

352352
if (status == VL53L1_ERROR_NONE) {

0 commit comments

Comments
 (0)