mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 17:49:33 +00:00
Move SBUS RC declaration to the top
This commit is contained in:
parent
b2100d10da
commit
dcfe39f8c9
@ -6,6 +6,8 @@
|
|||||||
#include <SBUS.h>
|
#include <SBUS.h>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
SBUS RC(Serial2); // NOTE: Use RC(Serial2, 16, 17) if you use the old UART2 pins
|
||||||
|
|
||||||
// RC channels mapping:
|
// RC channels mapping:
|
||||||
int rollChannel = 0;
|
int rollChannel = 0;
|
||||||
int pitchChannel = 1;
|
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 channelNeutral[16] = {NAN}; // first element NAN means not calibrated
|
||||||
float channelMax[16];
|
float channelMax[16];
|
||||||
|
|
||||||
SBUS RC(Serial2); // NOTE: Use RC(Serial2, 16, 17) if you use the old UART2 pins
|
|
||||||
|
|
||||||
void setupRC() {
|
void setupRC() {
|
||||||
Serial.println("Setup RC");
|
Serial.println("Setup RC");
|
||||||
RC.begin();
|
RC.begin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user