mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Moved vcd parameter group to pg/
.
This commit is contained in:
parent
ff21932ef9
commit
2d930b28ce
16 changed files with 61 additions and 29 deletions
|
@ -67,6 +67,7 @@ COMMON_SRC = \
|
||||||
pg/pg.c \
|
pg/pg.c \
|
||||||
pg/rx_pwm.c \
|
pg/rx_pwm.c \
|
||||||
pg/sdcard.c \
|
pg/sdcard.c \
|
||||||
|
pg/vcd.c \
|
||||||
scheduler/scheduler.c \
|
scheduler/scheduler.c \
|
||||||
sensors/battery.c \
|
sensors/battery.c \
|
||||||
sensors/current.c \
|
sensors/current.c \
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "pg/max7456.h"
|
#include "pg/max7456.h"
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/pg_ids.h"
|
#include "pg/pg_ids.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "drivers/bus_spi.h"
|
#include "drivers/bus_spi.h"
|
||||||
#include "drivers/dma.h"
|
#include "drivers/dma.h"
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
#include "drivers/max7456_symbols.h"
|
#include "drivers/max7456_symbols.h"
|
||||||
#include "drivers/nvic.h"
|
#include "drivers/nvic.h"
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
|
|
||||||
|
|
||||||
// DEBUG_MAX7456_SIGNAL
|
// DEBUG_MAX7456_SIGNAL
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "drivers/sound_beeper.h"
|
#include "drivers/sound_beeper.h"
|
||||||
#include "drivers/system.h"
|
#include "drivers/system.h"
|
||||||
#include "drivers/timer.h"
|
#include "drivers/timer.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/controlrate_profile.h"
|
#include "fc/controlrate_profile.h"
|
||||||
|
@ -141,9 +140,6 @@ PG_RESET_TEMPLATE(systemConfig_t, systemConfig,
|
||||||
);
|
);
|
||||||
#endif
|
#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
|
#ifdef SWAP_SERIAL_PORT_0_AND_1_DEFAULTS
|
||||||
#define FIRST_PORT_INDEX 1
|
#define FIRST_PORT_INDEX 1
|
||||||
#define SECOND_PORT_INDEX 0
|
#define SECOND_PORT_INDEX 0
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "drivers/serial.h"
|
#include "drivers/serial.h"
|
||||||
#include "drivers/bus_i2c.h"
|
#include "drivers/bus_i2c.h"
|
||||||
#include "drivers/sound_beeper.h"
|
#include "drivers/sound_beeper.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FEATURE_RX_PPM = 1 << 0,
|
FEATURE_RX_PPM = 1 << 0,
|
||||||
|
@ -82,7 +81,6 @@ typedef struct systemConfig_s {
|
||||||
PG_DECLARE(pilotConfig_t, pilotConfig);
|
PG_DECLARE(pilotConfig_t, pilotConfig);
|
||||||
PG_DECLARE(systemConfig_t, systemConfig);
|
PG_DECLARE(systemConfig_t, systemConfig);
|
||||||
PG_DECLARE(beeperDevConfig_t, beeperDevConfig);
|
PG_DECLARE(beeperDevConfig_t, beeperDevConfig);
|
||||||
PG_DECLARE(vcdProfile_t, vcdProfile);
|
|
||||||
|
|
||||||
struct pidProfile_s;
|
struct pidProfile_s;
|
||||||
extern struct pidProfile_s *currentPidProfile;
|
extern struct pidProfile_s *currentPidProfile;
|
||||||
|
|
|
@ -83,6 +83,7 @@
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/rx_pwm.h"
|
#include "pg/rx_pwm.h"
|
||||||
#include "pg/sdcard.h"
|
#include "pg/sdcard.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/rx_spi.h"
|
#include "rx/rx_spi.h"
|
||||||
|
|
|
@ -76,7 +76,6 @@ extern uint8_t __config_end;
|
||||||
#include "drivers/transponder_ir.h"
|
#include "drivers/transponder_ir.h"
|
||||||
#include "drivers/time.h"
|
#include "drivers/time.h"
|
||||||
#include "drivers/timer.h"
|
#include "drivers/timer.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
#include "drivers/light_led.h"
|
#include "drivers/light_led.h"
|
||||||
#include "drivers/camera_control.h"
|
#include "drivers/camera_control.h"
|
||||||
#include "drivers/vtx_common.h"
|
#include "drivers/vtx_common.h"
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
#include "drivers/serial.h"
|
#include "drivers/serial.h"
|
||||||
#include "drivers/serial_escserial.h"
|
#include "drivers/serial_escserial.h"
|
||||||
#include "drivers/system.h"
|
#include "drivers/system.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
#include "drivers/vtx_common.h"
|
#include "drivers/vtx_common.h"
|
||||||
#include "drivers/transponder_ir.h"
|
#include "drivers/transponder_ir.h"
|
||||||
#include "drivers/camera_control.h"
|
#include "drivers/camera_control.h"
|
||||||
|
@ -97,6 +96,8 @@
|
||||||
|
|
||||||
#include "msp/msp_serial.h"
|
#include "msp/msp_serial.h"
|
||||||
|
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/msp.h"
|
#include "rx/msp.h"
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
#include "pg/pg_ids.h"
|
#include "pg/pg_ids.h"
|
||||||
#include "pg/rx_pwm.h"
|
#include "pg/rx_pwm.h"
|
||||||
#include "pg/sdcard.h"
|
#include "pg/sdcard.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/cc2500_frsky_common.h"
|
#include "rx/cc2500_frsky_common.h"
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include "drivers/display.h"
|
#include "drivers/display.h"
|
||||||
#include "drivers/max7456.h"
|
#include "drivers/max7456.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
|
|
||||||
|
@ -37,6 +36,7 @@
|
||||||
#include "pg/max7456.h"
|
#include "pg/max7456.h"
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/pg_ids.h"
|
#include "pg/pg_ids.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
displayPort_t max7456DisplayPort;
|
displayPort_t max7456DisplayPort;
|
||||||
|
|
||||||
|
|
|
@ -18,15 +18,18 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#ifdef USE_RCDEVICE
|
||||||
|
|
||||||
#include "drivers/display.h"
|
#include "drivers/display.h"
|
||||||
#include "drivers/vcd.h"
|
|
||||||
|
|
||||||
#include "io/rcdevice.h"
|
#include "io/rcdevice.h"
|
||||||
#include "io/rcdevice_osd.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;
|
displayPort_t rcdeviceOSDDisplayPort;
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,16 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "drivers/vcd.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#include "rcdevice.h"
|
|
||||||
#include "rcdevice_osd.h"
|
|
||||||
|
|
||||||
#ifdef USE_RCDEVICE
|
#ifdef USE_RCDEVICE
|
||||||
|
|
||||||
|
#include "io/rcdevice.h"
|
||||||
|
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
|
#include "rcdevice_osd.h"
|
||||||
|
|
||||||
#define VIDEO_BUFFER_CHARS_PAL 480
|
#define VIDEO_BUFFER_CHARS_PAL 480
|
||||||
|
|
||||||
static uint8_t columnCount = 30;
|
static uint8_t columnCount = 30;
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
|
|
||||||
#include "config/config_eeprom.h"
|
#include "config/config_eeprom.h"
|
||||||
#include "config/feature.h"
|
#include "config/feature.h"
|
||||||
#include "pg/pg.h"
|
|
||||||
#include "pg/pg_ids.h"
|
|
||||||
|
|
||||||
#include "drivers/adc.h"
|
#include "drivers/adc.h"
|
||||||
#include "drivers/bus.h"
|
#include "drivers/bus.h"
|
||||||
|
@ -79,6 +77,9 @@
|
||||||
|
|
||||||
#include "pg/adc.h"
|
#include "pg/adc.h"
|
||||||
#include "pg/bus_i2c.h"
|
#include "pg/bus_i2c.h"
|
||||||
|
#include "pg/pg.h"
|
||||||
|
#include "pg/pg_ids.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "scheduler/scheduler.h"
|
#include "scheduler/scheduler.h"
|
||||||
|
|
||||||
|
|
24
src/main/pg/vcd.c
Normal file
24
src/main/pg/vcd.c
Normal 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);
|
|
@ -19,14 +19,16 @@
|
||||||
|
|
||||||
// Video Character Display parameters
|
// Video Character Display parameters
|
||||||
|
|
||||||
|
enum VIDEO_SYSTEMS {
|
||||||
|
VIDEO_SYSTEM_AUTO = 0,
|
||||||
|
VIDEO_SYSTEM_PAL,
|
||||||
|
VIDEO_SYSTEM_NTSC
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct vcdProfile_s {
|
typedef struct vcdProfile_s {
|
||||||
uint8_t video_system;
|
uint8_t video_system;
|
||||||
int8_t h_offset;
|
int8_t h_offset;
|
||||||
int8_t v_offset;
|
int8_t v_offset;
|
||||||
} vcdProfile_t;
|
} vcdProfile_t;
|
||||||
|
|
||||||
enum VIDEO_SYSTEMS {
|
PG_DECLARE(vcdProfile_t, vcdProfile);
|
||||||
VIDEO_SYSTEM_AUTO = 0,
|
|
||||||
VIDEO_SYSTEM_PAL,
|
|
||||||
VIDEO_SYSTEM_NTSC
|
|
||||||
};
|
|
|
@ -37,6 +37,8 @@
|
||||||
#include "flight/mixer.h"
|
#include "flight/mixer.h"
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
|
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
|
@ -30,24 +30,24 @@ extern "C" {
|
||||||
#include "common/utils.h"
|
#include "common/utils.h"
|
||||||
#include "common/streambuf.h"
|
#include "common/streambuf.h"
|
||||||
|
|
||||||
#include "pg/pg.h"
|
|
||||||
#include "pg/pg_ids.h"
|
|
||||||
|
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/rc_modes.h"
|
#include "fc/rc_modes.h"
|
||||||
|
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
|
||||||
#include "io/beeper.h"
|
#include "io/beeper.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
#include "scheduler/scheduler.h"
|
#include "scheduler/scheduler.h"
|
||||||
#include "drivers/serial.h"
|
|
||||||
#include "drivers/vcd.h"
|
|
||||||
#include "io/rcdevice_cam.h"
|
#include "io/rcdevice_cam.h"
|
||||||
#include "io/osd.h"
|
#include "io/osd.h"
|
||||||
#include "io/rcdevice.h"
|
#include "io/rcdevice.h"
|
||||||
#include "io/rcdevice_osd.h"
|
#include "io/rcdevice_osd.h"
|
||||||
|
|
||||||
|
#include "pg/pg.h"
|
||||||
|
#include "pg/pg_ids.h"
|
||||||
|
#include "pg/vcd.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT]; // interval [1000;2000]
|
int16_t rcData[MAX_SUPPORTED_RC_CHANNEL_COUNT]; // interval [1000;2000]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue