Merge branch '2.0.x-maintenance' into master-merge-commit
[ExpressLRS.git] / src / src / options.cpp
blob692496e64edc0fd6fb2608b663ff3143eff24258
1 #include "targets.h"
2 #include "options.h"
4 #define QUOTE(arg) #arg
5 #define STR(macro) QUOTE(macro)
6 const unsigned char target_name[] = "\xBE\xEF\xCA\xFE" STR(TARGET_NAME);
7 const uint8_t target_name_size = sizeof(target_name);
8 const char device_name[] = DEVICE_NAME;
9 const uint8_t device_name_size = sizeof(device_name);
10 const char commit[] {LATEST_COMMIT, 0};
11 const char version[] = {LATEST_VERSION, 0};
13 #if defined(TARGET_TX)
14 const char *wifi_hostname = "elrs_tx";
15 const char *wifi_ap_ssid = "ExpressLRS TX";
16 #else
17 const char *wifi_hostname = "elrs_rx";
18 const char *wifi_ap_ssid = "ExpressLRS RX";
19 #endif
20 const char *wifi_ap_password = "expresslrs";
21 const char *wifi_ap_address = "10.0.0.1";
23 const char *home_wifi_ssid = ""
24 #ifdef HOME_WIFI_SSID
25 STR(HOME_WIFI_SSID)
26 #endif
28 const char *home_wifi_password = ""
29 #ifdef HOME_WIFI_PASSWORD
30 STR(HOME_WIFI_PASSWORD)
31 #endif
34 const char PROGMEM compile_options[] = {
35 #ifdef MY_BINDING_PHRASE
36 "-DMY_BINDING_PHRASE=\"" STR(MY_BINDING_PHRASE) "\" "
37 #endif
39 #ifdef TARGET_TX
40 #ifdef UNLOCK_HIGHER_POWER
41 "-DUNLOCK_HIGHER_POWER "
42 #endif
43 #ifdef NO_SYNC_ON_ARM
44 "-DNO_SYNC_ON_ARM "
45 #endif
46 #ifdef FEATURE_OPENTX_SYNC
47 "-DFEATURE_OPENTX_SYNC "
48 #endif
49 #ifdef FEATURE_OPENTX_SYNC_AUTOTUNE
50 "-DFEATURE_OPENTX_SYNC_AUTOTUNE "
51 #endif
52 #ifdef UART_INVERTED
53 "-DUART_INVERTED "
54 #endif
55 #ifdef DISABLE_ALL_BEEPS
56 "-DDISABLE_ALL_BEEPS "
57 #endif
58 #ifdef JUST_BEEP_ONCE
59 "-DJUST_BEEP_ONCE "
60 #endif
61 #ifdef DISABLE_STARTUP_BEEP
62 "-DDISABLE_STARTUP_BEEP "
63 #endif
64 #ifdef MY_STARTUP_MELODY
65 "-DMY_STARTUP_MELODY=\"" STR(MY_STARTUP_MELODY) "\" "
66 #endif
67 #ifdef WS2812_IS_GRB
68 "-DWS2812_IS_GRB "
69 #endif
70 #ifdef TLM_REPORT_INTERVAL_MS
71 "-DTLM_REPORT_INTERVAL_MS=" STR(TLM_REPORT_INTERVAL_MS) " "
72 #endif
73 #ifdef USE_TX_BACKPACK
74 "-DUSE_TX_BACKPACK "
75 #endif
76 #ifdef USE_BLE_JOYSTICK
77 "-DUSE_BLE_JOYSTICK "
78 #endif
79 #endif
81 #ifdef TARGET_RX
82 #ifdef LOCK_ON_FIRST_CONNECTION
83 "-DLOCK_ON_FIRST_CONNECTION "
84 #endif
85 #ifdef USE_R9MM_R9MINI_SBUS
86 "-DUSE_R9MM_R9MINI_SBUS "
87 #endif
88 #ifdef AUTO_WIFI_ON_INTERVAL
89 "-DAUTO_WIFI_ON_INTERVAL=" STR(AUTO_WIFI_ON_INTERVAL) " "
90 #endif
91 #ifdef USE_DIVERSITY
92 "-DUSE_DIVERSITY "
93 #endif
94 #ifdef RCVR_UART_BAUD
95 "-DRCVR_UART_BAUD=" STR(RCVR_UART_BAUD) " "
96 #endif
97 #ifdef RCVR_INVERT_TX
98 "-DRCVR_INVERT_TX "
99 #endif
100 #ifdef USE_R9MM_R9MINI_SBUS
101 "-DUSE_R9MM_R9MINI_SBUS "
102 #endif
103 #endif