Merge pull request #2421 from mikeller/move_conditionals

Moved conditionals to right after 'platform.h'.
This commit is contained in:
Michael Keller 2017-02-17 14:25:29 +13:00 committed by GitHub
commit 0fb720b37e
16 changed files with 18 additions and 16 deletions

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "drivers/pwm_esc_detect.h"
#include "drivers/pwm_output.h"
@ -36,7 +37,6 @@
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
#ifdef TARGET_CONFIG
// alternative defaults settings for AlienFlight targets
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/axis.h"
#include "drivers/compass.h"
@ -46,7 +47,6 @@
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
#ifdef TARGET_CONFIG
// alternative defaults settings for AlienFlight targets
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/axis.h"
#include "drivers/sensor.h"
@ -54,7 +55,6 @@
#define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
#ifdef TARGET_CONFIG
// alternative defaults settings for AlienFlight targets
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/utils.h"
#include "drivers/io.h"
@ -35,7 +36,6 @@
#include "config/config_profile.h"
#include "config/config_master.h"
#ifdef TARGET_CONFIG
void targetConfiguration(master_t *config)
{
UNUSED(config);

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "blackbox/blackbox_io.h"
#include "config/config_master.h"
@ -29,7 +30,6 @@
#include "hardware_revision.h"
#ifdef TARGET_CONFIG
// alternative defaults settings for BlueJayF4 targets
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include "platform.h"
#ifdef TARGET_CONFIG
#include "drivers/serial.h"
#include "fc/rc_controls.h"
@ -35,7 +36,6 @@
#include "config/config_profile.h"
#include "config/config_master.h"
#ifdef TARGET_CONFIG
// alternative defaults settings for Colibri/Gemini targets
void targetConfiguration(master_t *config)
{

View File

@ -21,6 +21,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "io/motors.h"
#include "sensors/battery.h"
@ -29,7 +30,6 @@
#include "config/feature.h"
#include "io/ledstrip.h"
#ifdef TARGET_CONFIG
void targetApplyDefaultLedStripConfig(ledConfig_t *ledConfigs)
{
const ledConfig_t defaultLedStripConfig[] = {

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/utils.h"
#include "drivers/io.h"
@ -37,7 +38,6 @@
#include "sensors/boardalignment.h"
#ifdef TARGET_CONFIG
void targetConfiguration(master_t *config)
{
UNUSED(config);

View File

@ -20,9 +20,9 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "config/config_master.h"
#ifdef TARGET_CONFIG
// Motolab target supports 2 different type of boards Tornado / Cyclone.
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/axis.h"
#include "drivers/sensor.h"
@ -39,7 +40,6 @@
#include "config/config_profile.h"
#include "config/config_master.h"
#ifdef TARGET_CONFIG
// alternative defaults settings for MULTIFLITEPICO targets
void targetConfiguration(master_t *config)
{

View File

@ -20,6 +20,7 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "common/utils.h"
#include "drivers/io.h"
@ -37,7 +38,6 @@
#include "hardware_revision.h"
#ifdef TARGET_CONFIG
void targetConfiguration(master_t *config)
{
UNUSED(config);

View File

@ -19,9 +19,9 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "config/config_master.h"
#ifdef TARGET_CONFIG
void targetConfiguration(master_t *config) {
config->batteryConfig.currentMeterScale = 125;
}

View File

@ -20,11 +20,11 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "rx/rx.h"
#include "config/config_master.h"
#ifdef TARGET_CONFIG
// alternative defaults settings for COLIBRI RACE targets
void targetConfiguration(master_t *config)
{

View File

@ -19,9 +19,9 @@
#include <platform.h>
#ifdef TARGET_CONFIG
#include "config/config_master.h"
#ifdef TARGET_CONFIG
void targetConfiguration(master_t *config) {
config->batteryConfig.vbatmaxcellvoltage = 45;
config->batteryConfig.currentMeterScale = 119;

View File

@ -16,9 +16,10 @@
*/
#include <platform.h>
#include "config/config_master.h"
#ifdef TARGET_CONFIG
#include "config/config_master.h"
void targetConfiguration(master_t *config)
{
// Temporary workaround: Disable SDCard DMA by default since it causes errors on this target

View File

@ -18,6 +18,8 @@
#include <stdint.h>
#include <platform.h>
#ifdef TARGET_CONFIG
#include "drivers/io.h"
#include "drivers/timer.h"
@ -33,7 +35,6 @@
#define TARGET_CPU_VOLTAGE 3.0
#ifdef TARGET_CONFIG
// set default settings to match our target
void targetConfiguration(master_t *config)
{