diff Small_CPU/Src/compass.c @ 104:22a1094545f3 kittz

Tested and alive.
author Dmitry Romanov <kitt@bk.ru>
date Mon, 24 Dec 2018 16:15:02 +0300
parents 6a6116d7b5bb
children 14e4c83a7559
line wrap: on
line diff
--- a/Small_CPU/Src/compass.c	Wed Nov 28 09:36:33 2018 +0300
+++ b/Small_CPU/Src/compass.c	Mon Dec 24 16:15:02 2018 +0300
@@ -1853,7 +1853,6 @@
     while((ticks) < 60 * 1000)
     {
 				compass_read();
-
 				acceleration_read();
 				compass_calc_roll_pitch_only();
 			
@@ -1873,15 +1872,16 @@
 				}
 
 				copyCompassDataDuringCalibration(compass_DX_f,compass_DY_f,compass_DZ_f);
-        compass_add_calibration(&g);
+				compass_add_calibration(&g);
 				HAL_Delay(1);
 				lasttick = HAL_GetTick();
 				if(lasttick == 0)
 				{
 					 tickstart = -ticks;
 				}	
+				HAL_Delay(1);
 				ticks = lasttick - tickstart;
-		}
+    }
         
     compass_solve_calibration(&g);