diff --git a/lib/HeadTracker/IMUBase.cpp b/lib/HeadTracker/IMUBase.cpp index c47bdb0..6c6280d 100644 --- a/lib/HeadTracker/IMUBase.cpp +++ b/lib/HeadTracker/IMUBase.cpp @@ -127,8 +127,10 @@ bool IMUBase::updateCalibration(FusionVector &g) c = 0; eSample = 0; L++; +#ifdef DEBUG_LOG DBGLN("Finished loop iteration %d", L); Serial.printf("%6.2f %6.2f %6.2f\r\n", imuCalibration[0], imuCalibration[1], imuCalibration[2]); +#endif } return L == Loops; } diff --git a/src/module_base.cpp b/src/module_base.cpp index 702416e..989eb4e 100644 --- a/src/module_base.cpp +++ b/src/module_base.cpp @@ -71,7 +71,7 @@ ModuleBase::Loop(uint32_t now) // convert from degrees to servo positions - int pan = -map(fyaw*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000); + int pan = map(-fyaw*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000); int tilt = map(fpitch*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000); int roll = map(froll*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000); mspPacket_t packet; @@ -86,7 +86,7 @@ ModuleBase::Loop(uint32_t now) packet.addByte(tilt >> 8); sendMSPViaEspnow(&packet); lastSend = now; -Serial.printf("%6.2f, %d\r\n",fpitch, tilt); +// Serial.printf("%d, %d, %d\r\n",pan, tilt, roll); } #endif }