Lidar RPLidar A2M8 - Testing program on L476RG

Revision:
1:cce1f1fab87f
Parent:
0:b57a1ecda8dd
--- a/main.cpp	Tue Apr 13 12:42:42 2021 +0000
+++ b/main.cpp	Sun Dec 12 12:36:57 2021 +0000
@@ -30,7 +30,7 @@
 DigitalOut          data_ok_q(D4);
  
 Serial              lidar(A0, A1, 115200);
-PwmOut              rotation(D14);
+PwmOut              rotation(PB_9);
  
 struct lidar_data   ld_current;
  
@@ -60,10 +60,10 @@
             debug_tour = !debug_tour;
         }
  
-        if(tour_ok == 4){
+        if(tour_ok == 6){
             int maxDistance, maxAngle;
             tour_ok = 0;
-            findMax(distance_scan_old, 360, &maxDistance, &maxAngle);
+            findMax(distance_scan_old, 0, 360, &maxDistance, &maxAngle);
             print_int("A", maxAngle);
         }
         /*