From 50e9b19fab2b47e229fc9e498260971cabae1fd1 Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Tue, 25 Oct 2016 14:41:05 +0200 Subject: [PATCH] Remove OLEMEXINO // Fix CJMCU build --- .travis.yml | 3 - src/main/fc/rc_controls.c | 1 + src/main/main.c | 2 + src/main/target/CJMCU/target.h | 4 +- src/main/target/OLIMEXINO/target.c | 41 ------------- src/main/target/OLIMEXINO/target.h | 95 ----------------------------- src/main/target/OLIMEXINO/target.mk | 10 --- 7 files changed, 5 insertions(+), 151 deletions(-) delete mode 100644 src/main/target/OLIMEXINO/target.c delete mode 100644 src/main/target/OLIMEXINO/target.h delete mode 100644 src/main/target/OLIMEXINO/target.mk diff --git a/.travis.yml b/.travis.yml index 4e7a7b408..8ba47b575 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,6 @@ env: # - TARGET=COLIBRI_OPBL # - TARGET=COLIBRI_RACE # - TARGET=DOGE -# - TARGET=EUSTM32F103RC # - TARGET=F4BY # - TARGET=FURYF3 - TARGET=FURYF4 @@ -32,11 +31,9 @@ env: # - TARGET=MICROSCISKY # - TARGET=MOTOLAB - TARGET=NAZE -# - TARGET=OLIMEXINO # - TARGET=OMNIBUS # - TARGET=OMNIBUSF4 # - TARGET=PIKOBLX -# - TARGET=PORT103R # - TARGET=RACEBASE - TARGET=REVO # - TARGET=REVONANO diff --git a/src/main/fc/rc_controls.c b/src/main/fc/rc_controls.c index 314ee07ec..1dbf51b70 100644 --- a/src/main/fc/rc_controls.c +++ b/src/main/fc/rc_controls.c @@ -79,6 +79,7 @@ bool isAirmodeActive(void) { void blackboxLogInflightAdjustmentEvent(adjustmentFunction_e adjustmentFunction, int32_t newValue) { #ifndef BLACKBOX +#define UNUSED(x) (void)(x) UNUSED(adjustmentFunction); UNUSED(newValue); #else diff --git a/src/main/main.c b/src/main/main.c index e84a14db5..49ecdba99 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -288,7 +288,9 @@ void init(void) #endif mixerConfigureOutput(); +#ifdef USE_SERVOS servoConfigureOutput(); +#endif systemState |= SYSTEM_STATE_MOTORS_READY; #ifdef BEEPER diff --git a/src/main/target/CJMCU/target.h b/src/main/target/CJMCU/target.h index 86c6b88f3..f47123b1b 100644 --- a/src/main/target/CJMCU/target.h +++ b/src/main/target/CJMCU/target.h @@ -32,8 +32,8 @@ #define ACC #define USE_ACC_MPU6050 -#define MAG -#define USE_MAG_HMC5883 +//#define MAG +//#define USE_MAG_HMC5883 #define BRUSHED_MOTORS diff --git a/src/main/target/OLIMEXINO/target.c b/src/main/target/OLIMEXINO/target.c deleted file mode 100644 index 51f6b87ef..000000000 --- a/src/main/target/OLIMEXINO/target.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of Cleanflight. - * - * Cleanflight is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Cleanflight is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cleanflight. If not, see . - */ - -#include - -#include -#include "drivers/io.h" - -#include "drivers/timer.h" - -const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { - { TIM2, IO_TAG(PA0), TIM_Channel_1, TIM2_IRQn, 0, IOCFG_IPD }, // PWM1 - RC1 - { TIM2, IO_TAG(PA1), TIM_Channel_2, TIM2_IRQn, 0, IOCFG_IPD }, // PWM2 - RC2 - { TIM2, IO_TAG(PA2), TIM_Channel_3, TIM2_IRQn, 0, IOCFG_IPD }, // PWM3 - RC3 - { TIM2, IO_TAG(PA3), TIM_Channel_4, TIM2_IRQn, 0, IOCFG_IPD }, // PWM4 - RC4 - { TIM3, IO_TAG(PA6), TIM_Channel_1, TIM3_IRQn, 0, IOCFG_IPD }, // PWM5 - RC5 - { TIM3, IO_TAG(PA7), TIM_Channel_2, TIM3_IRQn, 0, IOCFG_IPD }, // PWM6 - RC6 - { TIM3, IO_TAG(PB0), TIM_Channel_3, TIM3_IRQn, 0, IOCFG_IPD }, // PWM7 - RC7 - { TIM3, IO_TAG(PB1), TIM_Channel_4, TIM3_IRQn, 0, IOCFG_IPD }, // PWM8 - RC8 - { TIM1, IO_TAG(PA8), TIM_Channel_1, TIM1_CC_IRQn, 1, IOCFG_IPD }, // PWM9 - OUT1 - { TIM1, IO_TAG(PA11),TIM_Channel_4, TIM1_CC_IRQn, 1, IOCFG_IPD }, // PWM10 - OUT2 - { TIM4, IO_TAG(PB6), TIM_Channel_1, TIM4_IRQn, 0, IOCFG_IPD }, // PWM11 - OUT3 - { TIM4, IO_TAG(PB7), TIM_Channel_2, TIM4_IRQn, 0, IOCFG_IPD }, // PWM12 - OUT4 - { TIM4, IO_TAG(PB8), TIM_Channel_3, TIM4_IRQn, 0, IOCFG_IPD }, // PWM13 - OUT5 - { TIM4, IO_TAG(PB9), TIM_Channel_4, TIM4_IRQn, 0, IOCFG_IPD } // PWM14 - OUT6 -}; - diff --git a/src/main/target/OLIMEXINO/target.h b/src/main/target/OLIMEXINO/target.h deleted file mode 100644 index ae8ac3b38..000000000 --- a/src/main/target/OLIMEXINO/target.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This file is part of Cleanflight. - * - * Cleanflight is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Cleanflight is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cleanflight. If not, see . - */ - -#pragma once - -#define TARGET_BOARD_IDENTIFIER "OLI1" // Olimexino - -//#define OLIMEXINO_UNCUT_LED1_E_JUMPER -//#define OLIMEXINO_UNCUT_LED2_E_JUMPER - -#ifdef OLIMEXINO_UNCUT_LED1_E_JUMPER -#define LED0 PA5 // D13, PA5/SPI1_SCK/ADC5 - "LED1" on silkscreen, Green -#endif - -#ifdef OLIMEXINO_UNCUT_LED2_E_JUMPER -// "LED2" is using one of the PWM pins (CH2/PWM2), so we must not use PWM2 unless the jumper is cut. @See pwmInit() -#define LED1 PA1 // D3, PA1/UART2_RTS/ADC1/TIM2_CH3 - "LED2" on silkscreen, Yellow -#endif - -#define GYRO -#define USE_FAKE_GYRO -//#define USE_GYRO_L3G4200D -//#define USE_GYRO_L3GD20 -//#define USE_GYRO_MPU3050 -#define USE_GYRO_MPU6050 -//#define USE_GYRO_SPI_MPU6000 -//#define USE_GYRO_SPI_MPU6500 - -#define ACC -#define USE_FAKE_ACC -//#define USE_ACC_ADXL345 -//#define USE_ACC_BMA280 -//#define USE_ACC_MMA8452 -//#define USE_ACC_LSM303DLHC -#define USE_ACC_MPU6050 -//#define USE_ACC_SPI_MPU6000 -//#define USE_ACC_SPI_MPU6500 - -#define BARO -//#define USE_BARO_MS5611 -#define USE_BARO_BMP085 -#define USE_BARO_BMP280 - -#define MAG -#define USE_MAG_HMC5883 - -#define SONAR -#define SONAR_ECHO_PIN PB1 -#define SONAR_TRIGGER_PIN PB0 - -#define USE_UART1 -#define USE_UART2 -#define USE_SOFTSERIAL1 -#define USE_SOFTSERIAL2 -#define SERIAL_PORT_COUNT 4 - -#define SOFTSERIAL_1_TIMER TIM3 -#define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5 -#define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6 -#define SOFTSERIAL_2_TIMER TIM3 -#define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7 -#define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8 - -#define USE_I2C -#define I2C_DEVICE (I2CDEV_2) - -#define USE_ADC -#define CURRENT_METER_ADC_PIN PB1 -#define VBAT_ADC_PIN PA4 -#define RSSI_ADC_PIN PA1 -#define EXTERNAL1_ADC_PIN PA5 - - -// IO - assuming all IOs on smt32f103rb LQFP64 package -#define TARGET_IO_PORTA 0xffff -#define TARGET_IO_PORTB 0xffff -#define TARGET_IO_PORTC 0xffff -#define TARGET_IO_PORTD (BIT(2)) - -#define USABLE_TIMER_CHANNEL_COUNT 14 -#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4)) diff --git a/src/main/target/OLIMEXINO/target.mk b/src/main/target/OLIMEXINO/target.mk deleted file mode 100644 index 512ba68cc..000000000 --- a/src/main/target/OLIMEXINO/target.mk +++ /dev/null @@ -1,10 +0,0 @@ -F1_TARGETS += $(TARGET) -FEATURES = HIGHEND - -TARGET_SRC = \ - drivers/accgyro_mpu.c \ - drivers/accgyro_mpu6050.c \ - drivers/barometer_bmp085.c \ - drivers/barometer_bmp280.c \ - drivers/compass_hmc5883l.c -