From dcfe39f8c9b6cf638357d4a58edc64267905b0e7 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 24 Jan 2025 12:10:48 +0300 Subject: [PATCH] Move SBUS RC declaration to the top --- flix/rc.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flix/rc.ino b/flix/rc.ino index 0899b82..8f13045 100644 --- a/flix/rc.ino +++ b/flix/rc.ino @@ -6,6 +6,8 @@ #include #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();