[patch] INFLIGHT_ACC_CALIBRATION with CALIB trigger bugfix

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
airborne
Posts: 1
Joined: Tue Oct 14, 2014 1:03 am

[patch] INFLIGHT_ACC_CALIBRATION with CALIB trigger bugfix

Post by airborne »

Hi,

I am new to this forum, so I would like to say hi.
I've been testing INFLIGHT_ACC_CALIBRATION with CALIB trigger and I found a bug.
The fix is below.
I would be grateful if you could integrate it into the trunk.

Code: Select all

+++ MultiWii.cpp   2014-10-14 01:50:22.593086661 +0200
@@ -938,10 +938,14 @@
       if (rcOptions[BOXCALIB]) {      // Use the Calib Option to activate : Calib = TRUE Meausrement started, Land and Calib = 0 measurement stored
         if (!AccInflightCalibrationActive && !AccInflightCalibrationMeasurementDone){
           InflightcalibratingA = 50;
+          AccInflightCalibrationActive = 1;
         }
-      }else if(AccInflightCalibrationMeasurementDone && !f.ARMED){
-        AccInflightCalibrationMeasurementDone = 0;
-        AccInflightCalibrationSavetoEEProm = 1;
+      }else{
+        if(AccInflightCalibrationMeasurementDone && !f.ARMED){
+          AccInflightCalibrationMeasurementDone = 0;
+          AccInflightCalibrationSavetoEEProm = 1;
+        }
+        AccInflightCalibrationActive = 0;
       }
     #endif


I hope it helps :D

Post Reply