Merge pull request #2421 from mikeller/move_conditionals
Moved conditionals to right after 'platform.h'.
This commit is contained in:
commit
0fb720b37e
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "drivers/pwm_esc_detect.h"
|
#include "drivers/pwm_esc_detect.h"
|
||||||
#include "drivers/pwm_output.h"
|
#include "drivers/pwm_output.h"
|
||||||
|
|
||||||
|
@ -36,7 +37,6 @@
|
||||||
|
|
||||||
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for AlienFlight targets
|
// alternative defaults settings for AlienFlight targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/axis.h"
|
#include "common/axis.h"
|
||||||
|
|
||||||
#include "drivers/compass.h"
|
#include "drivers/compass.h"
|
||||||
|
@ -46,7 +47,6 @@
|
||||||
|
|
||||||
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for AlienFlight targets
|
// alternative defaults settings for AlienFlight targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/axis.h"
|
#include "common/axis.h"
|
||||||
|
|
||||||
#include "drivers/sensor.h"
|
#include "drivers/sensor.h"
|
||||||
|
@ -54,7 +55,6 @@
|
||||||
|
|
||||||
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for AlienFlight targets
|
// alternative defaults settings for AlienFlight targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
|
@ -35,7 +36,6 @@
|
||||||
#include "config/config_profile.h"
|
#include "config/config_profile.h"
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
UNUSED(config);
|
UNUSED(config);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "blackbox/blackbox_io.h"
|
#include "blackbox/blackbox_io.h"
|
||||||
|
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
|
|
||||||
#include "hardware_revision.h"
|
#include "hardware_revision.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for BlueJayF4 targets
|
// alternative defaults settings for BlueJayF4 targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "drivers/serial.h"
|
#include "drivers/serial.h"
|
||||||
|
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
|
@ -35,7 +36,6 @@
|
||||||
#include "config/config_profile.h"
|
#include "config/config_profile.h"
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for Colibri/Gemini targets
|
// alternative defaults settings for Colibri/Gemini targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "io/motors.h"
|
#include "io/motors.h"
|
||||||
|
|
||||||
#include "sensors/battery.h"
|
#include "sensors/battery.h"
|
||||||
|
@ -29,7 +30,6 @@
|
||||||
#include "config/feature.h"
|
#include "config/feature.h"
|
||||||
#include "io/ledstrip.h"
|
#include "io/ledstrip.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetApplyDefaultLedStripConfig(ledConfig_t *ledConfigs)
|
void targetApplyDefaultLedStripConfig(ledConfig_t *ledConfigs)
|
||||||
{
|
{
|
||||||
const ledConfig_t defaultLedStripConfig[] = {
|
const ledConfig_t defaultLedStripConfig[] = {
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
|
|
||||||
#include "sensors/boardalignment.h"
|
#include "sensors/boardalignment.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
UNUSED(config);
|
UNUSED(config);
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// Motolab target supports 2 different type of boards Tornado / Cyclone.
|
// Motolab target supports 2 different type of boards Tornado / Cyclone.
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/axis.h"
|
#include "common/axis.h"
|
||||||
|
|
||||||
#include "drivers/sensor.h"
|
#include "drivers/sensor.h"
|
||||||
|
@ -39,7 +40,6 @@
|
||||||
#include "config/config_profile.h"
|
#include "config/config_profile.h"
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for MULTIFLITEPICO targets
|
// alternative defaults settings for MULTIFLITEPICO targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
|
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
|
|
||||||
#include "hardware_revision.h"
|
#include "hardware_revision.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
UNUSED(config);
|
UNUSED(config);
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetConfiguration(master_t *config) {
|
void targetConfiguration(master_t *config) {
|
||||||
config->batteryConfig.currentMeterScale = 125;
|
config->batteryConfig.currentMeterScale = 125;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// alternative defaults settings for COLIBRI RACE targets
|
// alternative defaults settings for COLIBRI RACE targets
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
void targetConfiguration(master_t *config) {
|
void targetConfiguration(master_t *config) {
|
||||||
config->batteryConfig.vbatmaxcellvoltage = 45;
|
config->batteryConfig.vbatmaxcellvoltage = 45;
|
||||||
config->batteryConfig.currentMeterScale = 119;
|
config->batteryConfig.currentMeterScale = 119;
|
||||||
|
|
|
@ -16,9 +16,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include "config/config_master.h"
|
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
#ifdef TARGET_CONFIG
|
||||||
|
#include "config/config_master.h"
|
||||||
|
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
// Temporary workaround: Disable SDCard DMA by default since it causes errors on this target
|
// Temporary workaround: Disable SDCard DMA by default since it causes errors on this target
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
|
||||||
|
#ifdef TARGET_CONFIG
|
||||||
#include "drivers/io.h"
|
#include "drivers/io.h"
|
||||||
|
|
||||||
#include "drivers/timer.h"
|
#include "drivers/timer.h"
|
||||||
|
@ -33,7 +35,6 @@
|
||||||
|
|
||||||
#define TARGET_CPU_VOLTAGE 3.0
|
#define TARGET_CPU_VOLTAGE 3.0
|
||||||
|
|
||||||
#ifdef TARGET_CONFIG
|
|
||||||
// set default settings to match our target
|
// set default settings to match our target
|
||||||
void targetConfiguration(master_t *config)
|
void targetConfiguration(master_t *config)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue