diff --git a/fake_travis_build.sh b/fake_travis_build.sh index 4babddd21..e08186492 100755 --- a/fake_travis_build.sh +++ b/fake_travis_build.sh @@ -18,7 +18,8 @@ targets=("PUBLISHMETA=True" \ "TARGET=ALIENFLIGHTF3" \ "TARGET=DOGE" \ "TARGET=SINGULARITY" \ - "TARGET=FURYF3") + "TARGET=FURYF3" \ + "TARGET=SIRINFPV") #fake a travis build environment export TRAVIS_BUILD_NUMBER=$(date +%s) diff --git a/src/main/config/config.c b/src/main/config/config.c index 165ee4ee3..c1fe6f6ec 100755 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -403,7 +403,7 @@ static void resetConf(void) #endif #ifdef OSD - masterConfig.vtx_channel = 0; + masterConfig.vtx_channel = 19; masterConfig.osdProfile.system = 0; masterConfig.osdProfile.item_pos[OSD_MAIN_BATT_VOLTAGE] = -29; masterConfig.osdProfile.item_pos[OSD_RSSI_VALUE] = -59; diff --git a/src/main/drivers/max7456.c b/src/main/drivers/max7456.c index 1238d92cc..9a9605fb2 100644 --- a/src/main/drivers/max7456.c +++ b/src/main/drivers/max7456.c @@ -48,7 +48,6 @@ uint8_t max7456_send(uint8_t add, uint8_t data) { void max7456_init(uint8_t system) { - uint8_t max7456_reset=0x02; uint8_t max_screen_rows; uint8_t srdata = 0; uint16_t x; @@ -60,7 +59,7 @@ void max7456_init(uint8_t system) { delay(1000); // force soft reset on Max7456 ENABLE_MAX7456; - max7456_send(VM0_reg, max7456_reset); + max7456_send(VM0_REG, MAX7456_RESET); delay(100); srdata = max7456_send(0xA0, 0xFF); @@ -81,8 +80,6 @@ void max7456_init(uint8_t system) { break; } - max7456_reset |= video_signal_type; - if (video_signal_type) { //PAL max_screen_size = 480; max_screen_rows = 16; @@ -97,7 +94,7 @@ void max7456_init(uint8_t system) { } // make sure the Max7456 is enabled - max7456_send(VM0_reg, OSD_ENABLE | video_signal_type); + max7456_send(VM0_REG, OSD_ENABLE | video_signal_type); DISABLE_MAX7456; delay(100); @@ -159,10 +156,6 @@ void max7456_draw_screen_fast(void) { } } -#define NVM_RAM_SIZE 54 -#define WRITE_NVR 0xA0 -#define STATUS_REG_NVR_BUSY 0x20 - void max7456_write_nvm(uint8_t char_address, uint8_t *font_data) { uint8_t x; @@ -171,7 +164,7 @@ void max7456_write_nvm(uint8_t char_address, uint8_t *font_data) { ENABLE_MAX7456; // disable display - max7456_send(VM0_reg, video_signal_type); + max7456_send(VM0_REG, video_signal_type); max7456_send(MAX7456ADD_CMAH, char_address); // set start address high @@ -186,7 +179,7 @@ void max7456_write_nvm(uint8_t char_address, uint8_t *font_data) { // wait until bit 5 in the status register returns to 0 (12ms) while ((spiTransferByte(MAX7456_SPI_INSTANCE, MAX7456ADD_STAT) & STATUS_REG_NVR_BUSY) != 0); - max7456_send(VM0_reg, video_signal_type | 0x0C); + max7456_send(VM0_REG, video_signal_type | 0x0C); DISABLE_MAX7456; max7456_lock = 0; } diff --git a/src/main/drivers/max7456.h b/src/main/drivers/max7456.h index 2c5f5a0db..86bd4dd1e 100644 --- a/src/main/drivers/max7456.h +++ b/src/main/drivers/max7456.h @@ -17,11 +17,6 @@ #pragma once -#define DATAOUT 11 // MOSI -#define DATAIN 12 // MISO -#define SPICLOCK 13 // sck -#define VSYNC 2 // INT0 - #ifndef WHITEBRIGHTNESS #define WHITEBRIGHTNESS 0x01 #endif @@ -32,16 +27,16 @@ #define BWBRIGHTNESS ((BLACKBRIGHTNESS << 2) | WHITEBRIGHTNESS) //MAX7456 opcodes -#define DMM_reg 0x04 -#define DMAH_reg 0x05 -#define DMAL_reg 0x06 -#define DMDI_reg 0x07 -#define VM0_reg 0x00 -#define VM1_reg 0x01 +#define DMM_REG 0x04 +#define DMAH_REG 0x05 +#define DMAL_REG 0x06 +#define DMDI_REG 0x07 +#define VM0_REG 0x00 +#define VM1_REG 0x01 // video mode register 0 bits #define VIDEO_BUFFER_DISABLE 0x01 -//#define MAX7456_RESET 0x02 +#define MAX7456_RESET 0x02 #define VERTICAL_SYNC_NEXT_VSYNC 0x04 #define OSD_ENABLE 0x08 #define SYNC_MODE_AUTO 0x00 @@ -78,9 +73,9 @@ #define BACKGROUND_MODE_GRAY 0x40 //MAX7456 commands -#define CLEAR_display 0x04 -#define CLEAR_display_vert 0x06 -#define END_string 0xff +#define CLEAR_DISPLAY 0x04 +#define CLEAR_DISPLAY_VERT 0x06 +#define END_STRING 0xff #define MAX7456ADD_VM0 0x00 //0b0011100// 00 // 00 ,0011100 @@ -115,10 +110,9 @@ #define MAX7456ADD_OSDBL 0x6c #define MAX7456ADD_STAT 0xA0 -// Selectable by video mode -//uint8_t ENABLE_display; -//uint8_t ENABLE_display_vert; -//uint8_t DISABLE_display; +#define NVM_RAM_SIZE 54 +#define WRITE_NVR 0xA0 +#define STATUS_REG_NVR_BUSY 0x20 extern uint16_t max_screen_size; char screen[480]; diff --git a/src/main/drivers/pwm_mapping.c b/src/main/drivers/pwm_mapping.c index e7b32413c..ff9c05db6 100755 --- a/src/main/drivers/pwm_mapping.c +++ b/src/main/drivers/pwm_mapping.c @@ -750,6 +750,7 @@ static const uint16_t airPWM[] = { #if defined(SIRINFPV) static const uint16_t multiPPM[] = { + // No PPM PWM1 | (MAP_TO_MOTOR_OUTPUT << 8), PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), @@ -770,10 +771,23 @@ static const uint16_t multiPWM[] = { }; static const uint16_t airPPM[] = { + // No PPM + PWM1 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM4 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM5 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM6 | (MAP_TO_MOTOR_OUTPUT << 8), 0xFFFF }; static const uint16_t airPWM[] = { + PWM1 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM4 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM5 | (MAP_TO_MOTOR_OUTPUT << 8), + PWM6 | (MAP_TO_MOTOR_OUTPUT << 8), 0xFFFF }; #endif diff --git a/src/main/target/SIRINFPV/target.h b/src/main/target/SIRINFPV/target.h index 8d2b85977..83ef28b92 100644 --- a/src/main/target/SIRINFPV/target.h +++ b/src/main/target/SIRINFPV/target.h @@ -189,19 +189,16 @@ #define VBAT_ADC_GPIO_PIN GPIO_Pin_0 #define VBAT_ADC_CHANNEL ADC_Channel_1 -#define USE_QUAD_MIXER_ONLY +//#define USE_QUAD_MIXER_ONLY #define BLACKBOX #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define TELEMETRY #define SERIAL_RX -//#define GTUNE #define USE_CLI #define OSD #define LED0 -#define USE_SERIAL_1WIRE +#define USE_SERVOS +#define DEFAULT_RX_FEATURE FEATURE_RX_PPM -#define S1W_TX_GPIO UART1_GPIO -#define S1W_TX_PIN UART1_TX_PIN -#define S1W_RX_GPIO UART1_GPIO -#define S1W_RX_PIN UART1_RX_PIN +#define USE_SERIAL_4WAY_BLHELI_INTERFACE diff --git a/top_makefile b/top_makefile index bbc1f43f1..5f5712902 100644 --- a/top_makefile +++ b/top_makefile @@ -16,6 +16,7 @@ ALL_TARGETS += afromini ALL_TARGETS += doge ALL_TARGETS += singularity ALL_TARGETS += furyf3 +ALL_TARGETS += sirinfpv CLEAN_TARGETS := $(addprefix clean_, $(ALL_TARGETS)) @@ -37,6 +38,7 @@ clean_afromini afromini : opts := TARGET=AFROMINI clean_doge doge : opts := TARGET=DOGE clean_singularity singularity : opts := TARGET=SINGULARITY clean_furyf3 furyf3 : opts := TARGET=FURYF3 +clean_sirinfpv sirinfpv: opts := TARGET=SIRINFPV .PHONY: all clean