Skip to content

Commit 476a6ad

Browse files
committed
Fix PAN and remove some debugging
1 parent 3e54fc3 commit 476a6ad

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/HeadTracker/IMUBase.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ bool IMUBase::updateCalibration(FusionVector &g)
127127
c = 0;
128128
eSample = 0;
129129
L++;
130+
#ifdef DEBUG_LOG
130131
DBGLN("Finished loop iteration %d", L);
131132
Serial.printf("%6.2f %6.2f %6.2f\r\n", imuCalibration[0], imuCalibration[1], imuCalibration[2]);
133+
#endif
132134
}
133135
return L == Loops;
134136
}

src/module_base.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ModuleBase::Loop(uint32_t now)
7171

7272
// convert from degrees to servo positions
7373

74-
int pan = -map(fyaw*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000);
74+
int pan = map(-fyaw*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000);
7575
int tilt = map(fpitch*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000);
7676
int roll = map(froll*100, -180*100, 180*100, CRSF_CHANNEL_VALUE_1000, CRSF_CHANNEL_VALUE_2000);
7777
mspPacket_t packet;
@@ -86,7 +86,7 @@ ModuleBase::Loop(uint32_t now)
8686
packet.addByte(tilt >> 8);
8787
sendMSPViaEspnow(&packet);
8888
lastSend = now;
89-
Serial.printf("%6.2f, %d\r\n",fpitch, tilt);
89+
// Serial.printf("%d, %d, %d\r\n",pan, tilt, roll);
9090
}
9191
#endif
9292
}

0 commit comments

Comments
 (0)