fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO)

This commit is contained in:
Daniel Agar
2021-12-16 07:20:12 +01:00
committed by Beat Küng
parent ecc2ca7f98
commit 43a04c9bca
8 changed files with 35 additions and 26 deletions
+10 -2
View File
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2019 PX4 Development Team. All rights reserved.
# Copyright (c) 2019-2021 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -30,10 +30,18 @@
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
set(PARAM_PREFIX PWM_MAIN)
if(CONFIG_BOARD_IO)
set(PARAM_PREFIX PWM_AUX)
endif()
px4_add_module(
MODULE drivers__dshot
MAIN dshot
STACK_MAIN 1200
COMPILE_FLAGS
-DPARAM_PREFIX="${PARAM_PREFIX}"
SRCS
DShot.cpp
DShotTelemetry.cpp
-5
View File
@@ -146,11 +146,6 @@ private:
void handle_vehicle_commands();
#ifdef BOARD_WITH_IO
# define PARAM_PREFIX "PWM_AUX"
#else
# define PARAM_PREFIX "PWM_MAIN"
#endif
MixingOutput _mixing_output {PARAM_PREFIX, DIRECT_PWM_OUTPUT_CHANNELS, *this, MixingOutput::SchedulingPolicy::Auto, false, false};
Telemetry *_telemetry{nullptr};