Merge pull request #4835 from mikeller/move_vcd_to_pg

Moved vcd parameter group to `pg/`.
This commit is contained in:
Michael Keller 2017-12-24 16:13:59 +13:00 committed by GitHub
commit 351294d19a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 61 additions and 29 deletions

View File

@ -67,6 +67,7 @@ COMMON_SRC = \
pg/pg.c \
pg/rx_pwm.c \
pg/sdcard.c \
pg/vcd.c \
scheduler/scheduler.c \
sensors/battery.c \
sensors/current.c \

View File

@ -28,6 +28,7 @@
#include "pg/max7456.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
#include "drivers/bus_spi.h"
#include "drivers/dma.h"
@ -37,7 +38,6 @@
#include "drivers/max7456_symbols.h"
#include "drivers/nvic.h"
#include "drivers/time.h"
#include "drivers/vcd.h"
// DEBUG_MAX7456_SIGNAL

View File

@ -54,7 +54,6 @@
#include "drivers/sound_beeper.h"
#include "drivers/system.h"
#include "drivers/timer.h"
#include "drivers/vcd.h"
#include "fc/config.h"
#include "fc/controlrate_profile.h"
@ -141,9 +140,6 @@ PG_RESET_TEMPLATE(systemConfig_t, systemConfig,
);
#endif
// no template required since defaults are zero
PG_REGISTER(vcdProfile_t, vcdProfile, PG_VCD_CONFIG, 0);
#ifdef SWAP_SERIAL_PORT_0_AND_1_DEFAULTS
#define FIRST_PORT_INDEX 1
#define SECOND_PORT_INDEX 0

View File

@ -26,7 +26,6 @@
#include "drivers/serial.h"
#include "drivers/bus_i2c.h"
#include "drivers/sound_beeper.h"
#include "drivers/vcd.h"
typedef enum {
FEATURE_RX_PPM = 1 << 0,
@ -82,7 +81,6 @@ typedef struct systemConfig_s {
PG_DECLARE(pilotConfig_t, pilotConfig);
PG_DECLARE(systemConfig_t, systemConfig);
PG_DECLARE(beeperDevConfig_t, beeperDevConfig);
PG_DECLARE(vcdProfile_t, vcdProfile);
struct pidProfile_s;
extern struct pidProfile_s *currentPidProfile;

View File

@ -83,6 +83,7 @@
#include "pg/pg.h"
#include "pg/rx_pwm.h"
#include "pg/sdcard.h"
#include "pg/vcd.h"
#include "rx/rx.h"
#include "rx/rx_spi.h"

View File

@ -76,7 +76,6 @@ extern uint8_t __config_end;
#include "drivers/transponder_ir.h"
#include "drivers/time.h"
#include "drivers/timer.h"
#include "drivers/vcd.h"
#include "drivers/light_led.h"
#include "drivers/camera_control.h"
#include "drivers/vtx_common.h"

View File

@ -52,7 +52,6 @@
#include "drivers/serial.h"
#include "drivers/serial_escserial.h"
#include "drivers/system.h"
#include "drivers/vcd.h"
#include "drivers/vtx_common.h"
#include "drivers/transponder_ir.h"
#include "drivers/camera_control.h"
@ -97,6 +96,8 @@
#include "msp/msp_serial.h"
#include "pg/vcd.h"
#include "rx/rx.h"
#include "rx/msp.h"

View File

@ -67,6 +67,7 @@
#include "pg/pg_ids.h"
#include "pg/rx_pwm.h"
#include "pg/sdcard.h"
#include "pg/vcd.h"
#include "rx/rx.h"
#include "rx/cc2500_frsky_common.h"

View File

@ -26,7 +26,6 @@
#include "drivers/display.h"
#include "drivers/max7456.h"
#include "drivers/vcd.h"
#include "fc/config.h"
@ -37,6 +36,7 @@
#include "pg/max7456.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
displayPort_t max7456DisplayPort;

View File

@ -18,15 +18,18 @@
#include <stdbool.h>
#include <stdint.h>
#include "platform.h"
#ifdef USE_RCDEVICE
#include "drivers/display.h"
#include "drivers/vcd.h"
#include "io/rcdevice.h"
#include "io/rcdevice_osd.h"
#include "io/displayport_rcdevice.h"
#include "pg/vcd.h"
#ifdef USE_RCDEVICE
#include "displayport_rcdevice.h"
displayPort_t rcdeviceOSDDisplayPort;

View File

@ -18,13 +18,16 @@
#include <stdbool.h>
#include <stdint.h>
#include "drivers/vcd.h"
#include "rcdevice.h"
#include "rcdevice_osd.h"
#include "platform.h"
#ifdef USE_RCDEVICE
#include "io/rcdevice.h"
#include "pg/vcd.h"
#include "rcdevice_osd.h"
#define VIDEO_BUFFER_CHARS_PAL 480
static uint8_t columnCount = 30;

View File

@ -30,8 +30,6 @@
#include "config/config_eeprom.h"
#include "config/feature.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "drivers/adc.h"
#include "drivers/bus.h"
@ -79,6 +77,9 @@
#include "pg/adc.h"
#include "pg/bus_i2c.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
#include "scheduler/scheduler.h"

24
src/main/pg/vcd.c Normal file
View File

@ -0,0 +1,24 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "vcd.h"
// no template required since defaults are zero
PG_REGISTER(vcdProfile_t, vcdProfile, PG_VCD_CONFIG, 0);

View File

@ -19,14 +19,16 @@
// Video Character Display parameters
enum VIDEO_SYSTEMS {
VIDEO_SYSTEM_AUTO = 0,
VIDEO_SYSTEM_PAL,
VIDEO_SYSTEM_NTSC
};
typedef struct vcdProfile_s {
uint8_t video_system;
int8_t h_offset;
int8_t v_offset;
} vcdProfile_t;
enum VIDEO_SYSTEMS {
VIDEO_SYSTEM_AUTO = 0,
VIDEO_SYSTEM_PAL,
VIDEO_SYSTEM_NTSC
};
PG_DECLARE(vcdProfile_t, vcdProfile);

View File

@ -37,6 +37,8 @@
#include "flight/mixer.h"
#include "flight/pid.h"
#include "pg/vcd.h"
#include "rx/rx.h"
#include "io/serial.h"

View File

@ -30,24 +30,24 @@ extern "C" {
#include "common/utils.h"
#include "common/streambuf.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "fc/rc_controls.h"
#include "fc/rc_modes.h"
#include "drivers/serial.h"
#include "io/beeper.h"
#include "io/serial.h"
#include "scheduler/scheduler.h"
#include "drivers/serial.h"
#include "drivers/vcd.h"
#include "io/rcdevice_cam.h"
#include "io/osd.h"
#include "io/rcdevice.h"
#include "io/rcdevice_osd.h"
#include "pg/pg.h"
#include "pg/pg_ids.h"
#include "pg/vcd.h"
#include "rx/rx.h"
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT]; // interval [1000;2000]