Mixers: generate all versions (new,normalized,6dof,legacy)

This commit is contained in:
Julien Lecoeur 2017-10-05 15:18:56 +02:00 committed by Beat Küng
parent 99f6c4dbc3
commit 2c4228ce98
2 changed files with 31 additions and 3 deletions

View File

@ -46,9 +46,32 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor.generated
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py -f ${geom_list} -o ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor.generated.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py ${geom_list}
)
add_custom_target(mixer_gen
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor.generated.h ${geom_list})
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor.generated.h
DEPENDS ${geom_list})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_normalized.generated.h
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py --normalize -f ${geom_list} -o ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_normalized.generated.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py ${geom_list}
)
add_custom_target(mixer_gen_norm
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_normalized.generated.h
DEPENDS ${geom_list})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_6dof.generated.h
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py --sixdof -f ${geom_list} -o ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_6dof.generated.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/geoms/tools/px_generate_mixers.py ${geom_list}
)
add_custom_target(mixer_gen_6dof
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_6dof.generated.h
DEPENDS ${geom_list})
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_legacy.generated.h
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/multi_tables.py > ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_legacy.generated.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/multi_tables.py
)
add_custom_target(mixer_gen_legacy
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mixer_multirotor_legacy.generated.h)
px4_add_module(
MODULE modules__systemlib__mixer
@ -62,5 +85,8 @@ px4_add_module(
DEPENDS
platforms__common
mixer_gen
mixer_gen_norm
mixer_gen_6dof
mixer_gen_legacy
)
# vim: set noet ft=cmake fenc=utf-8 ff=unix :

View File

@ -57,7 +57,9 @@
#include "mixer.h"
// This file is generated by the multi_tables script which is invoked during the build process
#include "mixer_multirotor.generated.h"
// #include "mixer_multirotor.generated.h"
#include "mixer_multirotor_normalized.generated.h"
// #include "mixer_multirotor_legacy.generated.h"
#define debug(fmt, args...) do { } while(0)
//#define debug(fmt, args...) do { printf("[mixer] " fmt "\n", ##args); } while(0)