Skip to content

Commit 7634506

Browse files
committed
re-enabled print in tof, added dependecies
1 parent d82f77a commit 7634506

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ version=0.0.3
33
author=Arduino, Giovanni di Dio Bruno, Lucio Rossi
44
maintainer=Arduino <[email protected]>
55
sentence=Library and firmware for Arduino Robot
6-
paragraph=Robot Robot Robot
7-
category=Firmware
6+
paragraph=This library is used to build the firmware used by Arduino Alvik, examples show you how to customize the firmware.
7+
category=Robotics
88
url=https://github.com/gbr1/Arduino_Robot_Firmware
99
includes=Arduino_Robot_Firmware.h
10-
depends=Arduino_APDS9960, Arduino_MAX17332
10+
depends=Arduino_APDS9960, Arduino_MAX17332, STM32duino_LSM6DSO, STM32duino_MotionFX, STM32duino_VL53L7CX, AT42QT, ucPack

src/sensor_tof_matrix.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class SensorTofMatrix{
7171
return out;
7272
}
7373

74-
/*
74+
7575
void print(){
7676
VL53L7CX_ResultsData Results;
7777
uint8_t NewDataReady = 0;
@@ -92,7 +92,7 @@ class SensorTofMatrix{
9292
Serial.println();
9393
}
9494
}
95-
*/
95+
9696

9797
bool update() {
9898
uint8_t NewDataReady = 0;
@@ -359,6 +359,16 @@ class SensorTofMatrix{
359359
int getBottom(){
360360
return bottom;
361361
}
362+
363+
364+
int test_center(){
365+
if ((results.distance_mm[9]<150)||(results.distance_mm[10]<150)){
366+
return max(results.distance_mm[1],results.distance_mm[2]);
367+
}
368+
else{
369+
return (results.distance_mm[5]+results.distance_mm[6])/2;
370+
}
371+
}
362372
};
363373

364374
#endif

0 commit comments

Comments
 (0)