Skip to content

Commit 6648b58

Browse files
Hwurzburgandyp1per
authored andcommitted
Tools:add build option for baro thrust correction
1 parent 68d9f2f commit 6648b58

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

Tools/autotest/test_build_options.py

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ def define_is_whitelisted_for_feature_in_code(self, target, define):
268268
'AP_PLANE_BLACKBOX_LOGGING', # entirely elided if no user
269269
'AP_COMPASS_AK8963_ENABLED', # probed on a board-by-board basis, not on CubeOrange for example
270270
'AP_COMPASS_LSM303D_ENABLED', # probed on a board-by-board basis, not on CubeOrange for example
271+
'AP_BARO_THST_COMP_ENABLED', # compiler is optimising this symbol away
271272
])
272273
if target.lower() != "copter":
273274
feature_define_whitelist.add('MODE_ZIGZAG_ENABLED')

Tools/scripts/build_options.py

+1
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ def config_option(self):
326326
# Feature('Baro', 'ICP201XX', 'AP_BARO_ICP201XX_ENABLED', 'Enable ICP201XX Barometric Sensor', 0, None),
327327
Feature('Baro', 'BARO_TEMPCAL', 'AP_TEMPCALIBRATION_ENABLED', 'Enable Baro Temperature Calibration', 0, None),
328328
Feature('Baro', 'BARO_PROBEXT', 'AP_BARO_PROBE_EXTERNAL_I2C_BUSES', 'Enable Probing of External i2c buses', 0, None),
329+
Feature('Baro', 'BARO_THRUST_COMP', 'AP_BARO_THST_COMP_ENABLED', 'Enable thrust compensation on BARO1', 0, None),
329330

330331
Feature('Sensors', 'RPM', 'AP_RPM_ENABLED', 'Enable RPM sensors', 0, None),
331332
Feature('Sensors', 'RPM_EFI', 'AP_RPM_EFI_ENABLED', 'Enable RPM EFI sensors', 0, 'RPM,EFI'),

Tools/scripts/extract_features.py

+1
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def __init__(self, filename, nm="arm-none-eabi-nm", strings="strings"):
218218
('HAL_DISPLAY_ENABLED', r'Display::init\b',),
219219
('HAL_NMEA_OUTPUT_ENABLED', r'AP_NMEA_Output::update\b',),
220220
('HAL_BARO_WIND_COMP_ENABLED', r'AP_Baro::wind_pressure_correction\b',),
221+
('AP_BARO_THST_COMP_ENABLED', r'AP_Baro::thrust_pressure_correction\b',),
221222
('AP_TEMPCALIBRATION_ENABLED', r'AP_TempCalibration::apply_calibration',),
222223

223224
('HAL_PICCOLO_CAN_ENABLE', r'AP_PiccoloCAN::update',),

0 commit comments

Comments
 (0)