|
| 1 | +/* |
| 2 | + This file is part of the Arduino_GroveI2C_Ultrasonic library. |
| 3 | + Copyright (c) 2023 Arduino SA. All rights reserved. |
| 4 | +
|
| 5 | + This library is free software; you can redistribute it and/or |
| 6 | + modify it under the terms of the GNU Lesser General Public |
| 7 | + License as published by the Free Software Foundation; either |
| 8 | + version 2.1 of the License, or (at your option) any later version. |
| 9 | +
|
| 10 | + This library is distributed in the hope that it will be useful, |
| 11 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | + Lesser General Public License for more details. |
| 14 | +
|
| 15 | + You should have received a copy of the GNU Lesser General Public |
| 16 | + License along with this library; if not, write to the Free Software |
| 17 | + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | +*/ |
| 19 | + |
1 | 20 | #include "Arduino_Robot_Firmware.h" |
2 | 21 | #include "sensor_line.h" |
3 | 22 | #include "sensor_tof_matrix.h" |
@@ -103,7 +122,7 @@ void loop(){ |
103 | 122 | break; |
104 | 123 | case 3: |
105 | 124 | tof.update(); |
106 | | - msg_size = packeter.packetC7I('f', tof.get_min_range_top_mm(), tof.get_min_range_top_mm(), tof.get_min_range_top_mm(), tof.get_min_range_top_mm(), tof.get_min_range_top_mm(), tof.get_min_range_top_mm(), tof.get_min_range_top_mm()); |
| 125 | + msg_size = packeter.packetC7I('f', tof.getLeft(), tof.getCenterLeft(), tof.getCenter(), tof.getCenterRight(), tof.getRight(), tof.get_min_range_top_mm(), tof.get_max_range_bottom_mm()); |
107 | 126 | robot.serial->write(packeter.msg,msg_size); |
108 | 127 | break; |
109 | 128 | case 4: |
|
0 commit comments