1 // OpenXsensor https://github.com/openXsensor/
2 // started by Rainer Schlosshan and maintained by Michel Strens
4 // This is version : 8.2.15 (27 Oct 2020)
6 //******************************************************************************************************************************************************* //
8 // ! IMPORTANT NOTE !!!!!!!!!! Another file in this project provides detailed explanations on how to set up this file (see oXs_config_description.h). //
10 //******************************************************************************************************************************************************* //
11 // Note: the oXs_config_basic.h and oXs_config_advanced.h files present on the GitHub site are not always meaningful.
12 // It could be that the combination of active/non active parameters is not consistent.
13 // This is just the result of many updates and tests in this document.
14 // So take always care to set up the files according to your needs and check carefully all options.
15 // For old version 2 and 3 of oXs, there was a program named "configurator" running on PC that allowed easier editing of a oXs_config.h file
16 // Still this configurator is not developped anymore. So this version request manual editing.
19 #ifndef OXS_CONFIG_BASIC_h
20 #define OXS_CONFIG_BASIC_h
22 // --------- 1 - Telemetry protocol ---------
23 #define PROTOCOL FRSKY_SPORT // select between FRSKY_SPORT , FRSKY_HUB , FRSKY_SPORT_HUB , MULTIPLEX , HOTT, JETI
25 // ***** 1.1 - Pin connected to Rx ************ See oXs_config_advanced.h (normally no need to change it) (default is arduino pin 4 connected to RX)
26 // ***** 1.2 - SPORT_SENSOR_ID (used only for Frsky Sport protocol) ***** See oXs_config_advanced.h (normally no need to change it)
28 // --------- 2 - Data to transmit --------- uncomment the lines below if you want to transmit some extra oXs measurements into some telemetry fields
29 // ***** 2.1 - Frsky data *****
30 #define VFAS_SOURCE VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
31 //#define FUEL_SOURCE ADS_VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
32 //#define A3_SOURCE ADS_VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
33 //#define A4_SOURCE ADS_VOLT_3 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
34 //#define ACCX_SOURCE TEST_1 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
35 //#define ACCY_SOURCE TEST_2 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
36 //#define ACCZ_SOURCE TEST_3 // select between TEST_1, TEST_2, TEST_3, GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, PITCH, ROLL , YAW, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
37 //#define T1_SOURCE TEST_1 // select between TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
38 //#define T2_SOURCE TEST_2 // select between TEST_1, TEST_2, TEST_3, , GLIDER_RATIO, SECONDS_SINCE_T0 ,AVERAGE_VSPEED_SINCE_TO , SENSITIVITY, PPM, VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
40 // ***** 2.2 - Hott data *****
41 //#define CELL_UNDERVOLTAGE_WARNING 3300 // Warning threshold in mV;
42 //#define BATTERY_1_SOURCE ADS_VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
43 //#define BATTERY_2_SOURCE ADS_VOLT_2 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
44 //#define MAIN_BATTERY_SOURCE ADS_VOLT_3 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, ADS_VOLT_1, ADS_VOLT_2, ADS_VOLT_3, ADS_VOLT_4
45 //#define TEMPERATURE_1_SOURCE VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY , PPM
46 //#define TEMPERATURE_2_SOURCE PPM // select between VOLT_1, VOLT_2, VOLT_3, VOLT_4, VOLT_5, VOLT_6, TEST_1, TEST_2, TEST_3 , GLIDER_RATIO , SENSITIVITY, PPM
48 // ***** 2.3 - Multiplex data *****
49 #define SETUP_MULTIPLEX_DATA_TO_SEND \
50 5 , REL_ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
51 6 , VERTICAL_SPEED , 1 , 1 , 0, -500 , 500 , \
52 7 , ALTIMETER_MAX , 1 , 1 , 0 , -16384 , 16383
53 // 8 , VOLT_1 , 1, 1 , 0 , -16384 , 16383
54 // 6 , CURRENTMA , 1 , 1, 0 , -16384 , 16383 ,\
55 // 7 , MILLIAH , 1 , 1, 0 , -16384 , 16383
56 // 7 , CELL_TOT , 1 , 1 , 0 , -16384 , 16383 , \
57 // 4 , VOLT_4 , 1 , 1 , 0 , -16384 , 16383 , \
58 // 9 , PPM , 1 , 1 , 0 , -16384 , 16383
59 // 3 , ALTIMETER , 1 , 1 , 0 , -16384 , 16383 , \
61 // ***** 2.4 - Jeti data *****
62 //#define VOLTAGE_SOURCE VOLT_1 // select between VOLT_1, VOLT_2, VOLT_3 , VOLT_4, VOLT_5 , VOLT_6
63 //#define TEMPERATURE_SOURCE NTC // select between MS5611 and NTC
65 // ***** 2.5 - How to fill TEST_1, TEST_2, TEST_3 ****** see oXs_config_advanced.h (required only when some measurements have to be filled in TEST_1, TEST_2 or TEST_3)
67 // --------- 3 - PPM settings --------- see oXs_config_advanced.h (default, this option is not active)
69 // --------- 4 - Vario settings ---------
70 // ***** 4.1 - Connecting 1 or 2 barometric sensor(s) *****
71 #define FIRST_BARO_SENSOR_USE MS5611 // select between NO_BARO , MS5611, GY86 , BMP085 , BMP180 , GY87, BMP280
72 // Note : when used, second sensor is to define in oXs_config_advanced.h
74 // ***** 4.2 - Type of Vspeed to transmit *****
75 #define VSPEED_SOURCE FIRST_BARO // select between FIRST_BARO, BARO_AND_IMU, SECOND_BARO , AVERAGE_FIRST_SECOND, AIRSPEED_COMPENSATED or PPM_SELECTION
77 // ***** 4.3 - Sensitivity predefined by program ***** see oXs_config_advanced.h (normally no need to change it)
78 // ***** 4.4 - Sensitivity adjusted from the TX ***** see oXs_config_advanced.h (normally no need to change it)
79 // ***** 4.5 - Hysteresis parameter & Alt compensation based on sensor temp ***** see oXs_config_advanced.h (normally no need to change it)
80 // ***** 4.6 - Vertical speeds calculations based on PPM **** see oXs_config_advanced.h (change only if PPM_SELECTION is used)
81 // ***** 4.7 - Analog vertical speed ***** see oXs_config_advanced.h (change if you want to activate it)
82 // ***** 4.8 - Calculating glider ratio, average sink/climb rate ************** see oXs_config_advanced.h (change if you want to get those measurement)
83 // --------- 5 - Airspeed settings --------- see oXs_config_advanced.h for additionnal parameters (normally no need to change them)
84 #define AIRSPEED_SENSOR_USE NO_AIRSPEED // select between NO_AIRSPEED , MS4525 , MPXV7002, SDP3X
86 // --------- 6 - Voltages & Current sensor settings ---------
88 // ***** 6.1 - Voltage Reference to measure voltages and current ***** see oXs_config_advanced.h when voltage reference is not Vcc and 5 volt
90 // ***** 6.2 - Voltage parameters ***** see oXs_config_advanced.h for additionnal parameters when YES
91 #define ARDUINO_MEASURES_VOLTAGES YES // select between YES , NO (When NO, following line is discarded)
93 // ***** 6.3 - Max number of Lipo cells to measure (and transmit to Tx) *****
94 #define NUMBEROFCELLS 0 // Put this line as comment or set value to 0 (zero) if you do not want to transmit cell voltages.
96 // ***** 6.4 - Convert voltage to temperature (° Celcius) ***** see oXs_config_advanced.h if you want to measure temperature(s) with thermistor
98 // ***** 6.5 - Current parameters ***** see also oXs_config_advanced.h for additionnal parameters if you want to measure current with a current sensor
99 #define ARDUINO_MEASURES_A_CURRENT NO // select between YES , NO
101 // ***** 6.6 - Ads1115 parameters ***** see oXs_config_advanced.h for additional parameters when AN_ADS1115_IS_CONNECTED is YES
102 #define AN_ADS1115_IS_CONNECTED NO // select between YES , NO
104 // --------- 7 - RPM (rotations per minute) settings --------- see oXs_config_advanced.h for additional parameter about the number of pulses per rotation
105 #define CALCULATE_RPM NO // select between YES , NO
107 // --------- 8 - Persistent memory settings --------- ( see also oXs_config_advanced.h - used mainly when a flow sensor is connected )
108 #define SAVE_TO_EEPROM NO
110 // --------- 9 - GPS --------------- see oXs_config_advanced.h for additionnal parameters (normally no need to change them)
111 #define A_GPS_IS_CONNECTED NO // select between YES , NO
113 // --------- 10 - IMU 6050 --- (accelerometer + gyro) and HMC5883 (magnetometer) -- see oXs_config_advanced.h for additionnal parameters e.g. about calibration
114 // ***** 10.1 - IMU 6050 *****
115 #define A_MPU6050_IS_CONNECTED NO // select between YES , NO
117 // ***** 10.2 - HMC5883 *****
118 #define CALCULATE_YAW_WITH_HMC5883 NO // select between YES , NO ; YES requires that A_MPU6050_IS_CONNECTED is YES here above
120 // --------- 11 - Flow sensor --------------- if YES, see also oXs_config_advanced.h
121 #define A_FLOW_SENSOR_IS_CONNECTED NO // select between YES , NO
123 // --------- 12 - Locator ---------------
124 #define A_LOCATOR_IS_CONNECTED NO // select between YES , NO
126 // --------- 13 - Rf link quality --------------- see oXs_config_advanced.h for additionnal parameters about link quality
127 #define MEASURE_RF_LINK_QUALITY NO // select between YES , NO
129 // --------- 20 - Sequencer --------- see oXs_config_advanced.h (only when oXs has to generate signals in sequence)
132 #endif// End define OXS_CONFIG_BASIC_h