Skip to content

Commit dacb0f7

Browse files
committed
AP_CRSF_Telem: add missing VideoTX include
We use the vtx singleton in here, so we need the header. ... also fix up the includes and ifdefs a little.
1 parent 51c77fe commit dacb0f7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16+
#include "AP_RCTelemetry_config.h"
17+
18+
#if HAL_CRSF_TELEM_ENABLED
19+
1620
#include "AP_CRSF_Telem.h"
1721
#include <AP_VideoTX/AP_VideoTX.h>
1822
#include <AP_HAL/utility/sparse-endian.h>
@@ -30,7 +34,7 @@
3034
#include <stdio.h>
3135
#include <AP_HAL/AP_HAL.h>
3236

33-
#if HAL_CRSF_TELEM_ENABLED
37+
#include <AP_VideoTX/AP_VideoTX.h>
3438

3539
#include <AP_Vehicle/AP_Vehicle_Type.h>
3640

@@ -1270,7 +1274,7 @@ void AP_CRSF_Telem::calc_parameter() {
12701274

12711275
_pending_request.frame_type = 0;
12721276
_telem_pending = true;
1273-
#endif
1277+
#endif // OSD_PARAM_ENABLED
12741278
}
12751279

12761280
#if HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED
@@ -1420,7 +1424,7 @@ void AP_CRSF_Telem::calc_text_selection(AP_OSD_ParamSetting* param, uint8_t chun
14201424
_pending_request.frame_type = 0;
14211425
_telem_pending = true;
14221426
}
1423-
#endif
1427+
#endif // HAL_CRSF_TELEM_TEXT_SELECTION_ENABLED
14241428

14251429
// write parameter information back into AP - assumes we already know the encoding for floats
14261430
void AP_CRSF_Telem::process_param_write_frame(ParameterSettingsWriteFrame* write_frame)
@@ -1490,7 +1494,7 @@ void AP_CRSF_Telem::process_param_write_frame(ParameterSettingsWriteFrame* write
14901494
default:
14911495
break;
14921496
}
1493-
#endif
1497+
#endif // OSD_PARAM_ENABLED
14941498
}
14951499

14961500
// get status text data
@@ -1649,4 +1653,4 @@ namespace AP {
16491653
}
16501654
};
16511655

1652-
#endif
1656+
#endif // HAL_CRSF_TELEM_ENABLED

0 commit comments

Comments
 (0)