@@ -65,7 +65,6 @@ if (PCB STREQUAL X10)
65
65
set (FUNCTION_SWITCHES ON )
66
66
set (DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module" )
67
67
option (BLUETOOTH "Support for bluetooth module" OFF )
68
- option (INTERNAL_GPS "Support for internal NMEA GPS" OFF )
69
68
if (BLUETOOTH )
70
69
set (AUX_SERIAL OFF )
71
70
else ()
@@ -82,12 +81,10 @@ if (PCB STREQUAL X10)
82
81
add_definitions (-DRADIO_FAMILY_T16 )
83
82
set (DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module" )
84
83
option (BLUETOOTH "Support for bluetooth module" OFF )
85
- option (INTERNAL_GPS "Support for internal GPS" ON )
86
84
add_definitions (-DMANUFACTURER_JUMPER )
87
85
if (NOT BLUETOOTH )
88
86
set (AUX2_SERIAL ON )
89
87
endif ()
90
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
91
88
set (FLYSKY_GIMBAL ON )
92
89
elseif (PCBREV STREQUAL TX16S )
93
90
set (FLAVOUR tx16s )
@@ -99,14 +96,12 @@ if (PCB STREQUAL X10)
99
96
100
97
set (DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module" )
101
98
option (BLUETOOTH "Support for bluetooth module" OFF )
102
- option (INTERNAL_GPS "Support for internal GPS" ON )
103
99
set (SWSERIALPOWER YES )
104
100
set (USB_CHARGER YES )
105
101
add_definitions (-DMANUFACTURER_RADIOMASTER )
106
102
if (NOT BLUETOOTH )
107
103
set (AUX2_SERIAL ON )
108
104
endif ()
109
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
110
105
set (FLYSKY_GIMBAL ON )
111
106
set (FLEXSW "2" CACHE STRING "Max flex inputs usable as switches" )
112
107
elseif (PCBREV STREQUAL F16 )
@@ -115,9 +110,7 @@ if (PCB STREQUAL X10)
115
110
add_definitions (-DRADIO_FAMILY_T16 )
116
111
set (DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module" )
117
112
option (BLUETOOTH "Support for bluetooth module" OFF )
118
- option (INTERNAL_GPS "Support for internal NMEA GPS" OFF )
119
113
add_definitions (-DMANUFACTURER_FATFISH )
120
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
121
114
set (FLEXSW "2" CACHE STRING "Max flex inputs usable as switches" )
122
115
set (VIDEO_SWITCH ON )
123
116
elseif (PCBREV STREQUAL V16 )
@@ -126,10 +119,8 @@ if (PCB STREQUAL X10)
126
119
add_definitions (-DRADIO_FAMILY_T16 )
127
120
set (DEFAULT_INTERNAL_MODULE CROSSFIRE CACHE STRING "Default internal module" )
128
121
option (BLUETOOTH "Support for bluetooth module" OFF )
129
- option (INTERNAL_GPS "Support for internal NMEA GPS" OFF )
130
122
set (SWSERIALPOWER YES )
131
123
add_definitions (-DMANUFACTURER_HELLORADIOSKY )
132
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
133
124
set (FLEXSW "2" CACHE STRING "Max flex inputs usable as switches" )
134
125
set (AUX2_SERIAL OFF )
135
126
set (CSD203_SENSOR ON )
@@ -143,12 +134,10 @@ if (PCB STREQUAL X10)
143
134
add_definitions (-DRADIO_FAMILY_T16 )
144
135
set (DEFAULT_INTERNAL_MODULE MULTIMODULE CACHE STRING "Default internal module" )
145
136
option (BLUETOOTH "Support for bluetooth module" OFF )
146
- option (INTERNAL_GPS "Support for internal GPS" ON )
147
137
add_definitions (-DMANUFACTURER_JUMPER )
148
138
if (NOT BLUETOOTH )
149
139
set (AUX2_SERIAL ON )
150
140
endif ()
151
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
152
141
set (FLYSKY_GIMBAL ON )
153
142
else ()
154
143
set (FLAVOUR x10 )
@@ -161,22 +150,19 @@ elseif (PCB STREQUAL X12S)
161
150
set (FLAVOUR x12s )
162
151
set (BLUETOOTH ON )
163
152
set (PCBREV "13" CACHE STRING "PCB Revision" )
164
- if (${PCBREV} GREATER 10 )
165
- option (INTERNAL_GPS "Internal GPS installed" YES )
166
- else ()
167
- option (INTERNAL_GPS "Internal GPS installed" NO )
168
- if (NOT INTERNAL_GPS )
169
- message ("Horus: Internal GPS is optional, use INTERNAL_GPS=YES option to enable it" )
170
- endif ()
171
- endif ()
172
- set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
173
153
set (AUX2_SERIAL ON ) # wire to GPS
174
154
set (USE_VS1053B ON )
175
155
set (USE_ADS79xx ON )
176
156
set (FONTS_TARGET x12s_fonts )
177
157
add_definitions (-DMANUFACTURER_FRSKY )
178
158
endif ()
179
159
160
+ # enable GPS support if there is AUX port available unless otherwise disabled
161
+ if (AUX_SERIAL )
162
+ option (INTERNAL_GPS "Support for internal GPS" ON )
163
+ set (INTERNAL_GPS_BAUDRATE "9600" CACHE STRING "Baud rate for internal GPS" )
164
+ endif ()
165
+
180
166
if (BITMAPS_DIR STREQUAL 320x240 )
181
167
set (BITMAPS_TARGET bm320_bitmaps )
182
168
elseif (BITMAPS_DIR STREQUAL 800x480 )
@@ -196,7 +182,6 @@ set(RADIO_DEPENDENCIES
196
182
197
183
add_definitions (-DPCBHORUS -DSTM32F429_439xx -DSTM32F429xx -DSDRAM -DCOLORLCD -DHARDWARE_KEYS )
198
184
add_definitions (-DAUDIO -DVOICE -DRTCLOCK )
199
- add_definitions (-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE} )
200
185
add_definitions (-DPWR_BUTTON_${PWR_BUTTON} )
201
186
add_definitions (-DSTM32_SUPPORT_32BIT_TIMERS )
202
187
@@ -205,8 +190,12 @@ add_definitions(-DTHREADSAFE_MALLOC)
205
190
206
191
set (SDRAM ON )
207
192
193
+ if (INTERNAL_GPS )
194
+ add_definitions (-DGPS_USART_BAUDRATE=${INTERNAL_GPS_BAUDRATE} )
195
+ endif ()
196
+
208
197
if (FUNCTION_SWITCHES )
209
- add_definitions (-DFUNCTION_SWITCHES )
198
+ add_definitions (-DFUNCTION_SWITCHES )
210
199
endif ()
211
200
212
201
if (NOT UNEXPECTED_SHUTDOWN )
0 commit comments