Skip to content

Commit e8a6c4a

Browse files
committed
fix: SensorTofMatrix.begin not returning an int
1 parent eef8b46 commit e8a6c4a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/sensor_tof_matrix.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ class SensorTofMatrix{
1717
}
1818

1919
int begin(){
20+
int out = 0;
2021
wire->begin();
21-
sensor->begin();
22-
sensor->init_sensor();
23-
sensor->vl53l7cx_set_resolution(VL53L7CX_RESOLUTION_4X4);
24-
sensor->vl53l7cx_start_ranging();
22+
out |= sensor->begin();
23+
out |= sensor->init_sensor();
24+
out |= sensor->vl53l7cx_set_resolution(VL53L7CX_RESOLUTION_4X4);
25+
out |= sensor->vl53l7cx_start_ranging();
26+
return out;
2527
}
2628

2729
void print(){

0 commit comments

Comments
 (0)