mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 02:43:33 +08:00
fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user