Skip to content

Commit

Permalink
fixes yaw/pitch inversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Hirsch committed Apr 19, 2017
1 parent 73c3f4f commit 4d6263e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flybrix-A7105-receiver.ino
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,9 @@ void loop() {
if (packet[0] == 0x20) {
// converts [0;255] to [-1;1] fixed point num
channel_usec[0] = 1116 + 3 * packet[8]; //ROLL
channel_usec[1] = 1116 + 3 * packet[6]; //PITCH
channel_usec[1] = 1884 - 3 * packet[6]; //PITCH --REVERSED
channel_usec[2] = 1116 + 3 * packet[2]; //THROTTLE
channel_usec[3] = 1116 + 3 * packet[4]; //YAW
channel_usec[3] = 1884 - 3 * packet[4]; //YAW --REVERSED
channel_usec[4] = (packet[9] & 0x04) ? 1881 : 1116; //AUX1 (left trim hold)
channel_usec[5] = (packet[9] & 0x08) ? 1116 : 1881; //AUX2 (left stick press)
if (missed_cycles) {
Expand Down

0 comments on commit 4d6263e

Please sign in to comment.