Move SBUS RC declaration to the top

This commit is contained in:
Oleg Kalachev 2025-01-24 12:10:48 +03:00
parent b2100d10da
commit dcfe39f8c9

View File

@ -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;
@ -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();