Skip to content

Commit

Permalink
pps_capture: fix PARAM_PREFIX for boards with px4io (CONFIG_BOARD_IO)
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Misic committed Dec 16, 2021
1 parent d475e61 commit cd40816
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 9 additions & 0 deletions src/drivers/pps_capture/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +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__pps_capture
MAIN pps_capture
COMPILE_FLAGS
-DPARAM_PREFIX="${PARAM_PREFIX}"
SRCS
PPSCapture.cpp
)
6 changes: 0 additions & 6 deletions src/drivers/pps_capture/PPSCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@
#include <board_config.h>
#include <parameters/param.h>

#ifdef BOARD_WITH_IO
# define PARAM_PREFIX "PWM_AUX"
#else
# define PARAM_PREFIX "PWM_MAIN"
#endif

PPSCapture::PPSCapture() :
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default)
{
Expand Down

0 comments on commit cd40816

Please sign in to comment.