Skip to content

Commit

Permalink
Move SBUS RC declaration to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Jan 24, 2025
1 parent b2100d1 commit dcfe39f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flix/rc.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <SBUS.h>
#include "util.h"

SBUS RC(Serial2); // NOTE: Use RC(Serial2, 16, 17) if you use the old UART2 pins

// RC channels mapping:
int rollChannel = 0;
int pitchChannel = 1;
Expand All @@ -18,8 +20,6 @@ double controlsTime; // time of the last controls update
float channelNeutral[16] = {NAN}; // first element NAN means not calibrated
float channelMax[16];

SBUS RC(Serial2); // NOTE: Use RC(Serial2, 16, 17) if you use the old UART2 pins

void setupRC() {
Serial.println("Setup RC");
RC.begin();
Expand Down

0 comments on commit dcfe39f

Please sign in to comment.