Update to simplfy code a bit, and bypass changes if not compiled in.
still to resolve: targets/sky9x/adc_driver.cpp:42:61: warning: character constant too long for its type [enabled by default]
This commit is contained in:
@@ -37,8 +37,12 @@
|
||||
#include "../opentx.h"
|
||||
|
||||
volatile uint16_t Analog_values[NUMBER_ANALOG];
|
||||
const char ana_direction[NUMBER_ANALOG] = {'STICK_AIL_DIR', 'STICK_RUD_DIR', 0, 'STICK_ELE_DIR' ,0 , 'STICK_THR_DIR',0};
|
||||
|
||||
#if defined(STICK_RUD_REV) || defined(STICK_AIL_REV) || defined(STICK_ELE_REV) || defined(STICK_THR_REV)
|
||||
const char ana_direction[NUMBER_ANALOG] = {'STICK_AIL_REV', 'STICK_RUD_REV', 0, 'STICK_ELE_REV' ,0 , 'STICK_THR_REV',0};
|
||||
#else
|
||||
const char ana_direction[NUMBER_ANALOG] = {0, 0, 0, 0 ,0 ,0 ,0};
|
||||
#endif
|
||||
|
||||
|
||||
// Settings for mode register ADC_MR
|
||||
|
||||
@@ -174,31 +174,6 @@ void disable_ssc();
|
||||
#define init_dsm2(port) init_main_ppm(5000, 0); init_ssc()
|
||||
#define disable_dsm2(port) disable_ssc()
|
||||
|
||||
// Stick Directions
|
||||
#if defined(STICK_AIL_REV)
|
||||
#define STICK_AIL_DIR = 1;
|
||||
#else
|
||||
#define STICK_AIL_DIR = 0;
|
||||
#endif
|
||||
|
||||
#if defined(STICK_ELE_REV)
|
||||
#define STICK_ELE_DIR = 1;
|
||||
#else
|
||||
#define STICK_ELE_DIR = 0;
|
||||
#endif
|
||||
|
||||
#if defined(STICK_RUD_REV)
|
||||
#define STICK_RUD_DIR = 1;
|
||||
#else
|
||||
#define STICK_RUD_DIR = 0;
|
||||
#endif
|
||||
|
||||
#if defined(STICK_THR_REV)
|
||||
#define STICK_THR_DIR = 1;
|
||||
#else
|
||||
#define STICK_THR_DIR = 0;
|
||||
#endif
|
||||
|
||||
|
||||
// SD driver
|
||||
#if defined(SIMU)
|
||||
|
||||
Reference in New Issue
Block a user