diff --git a/Makefile b/Makefile index a91fdf7f4..8786617fd 100644 --- a/Makefile +++ b/Makefile @@ -752,7 +752,9 @@ SPRACINGF3MINI_SRC = \ SIRINFPV_SRC = \ $(STM32F30x_COMMON_SRC) \ drivers/accgyro_mpu.c \ + drivers/accgyro_mpu6500.c \ drivers/accgyro_spi_mpu6000.c \ + drivers/accgyro_spi_mpu6500.c \ drivers/serial_usb_vcp.c \ drivers/sdcard.c \ drivers/sdcard_standard.c \ diff --git a/src/main/drivers/rtc6705.c b/src/main/drivers/rtc6705.c index ceb525fae..319430f52 100644 --- a/src/main/drivers/rtc6705.c +++ b/src/main/drivers/rtc6705.c @@ -142,7 +142,7 @@ void rtc6705_set_channel(uint16_t channel_freq) { uint32_t freq = (uint32_t)channel_freq * 1000; uint32_t N, A; - freq /= 40; // TODO check all channels for the R value + freq /= 40; N = freq / 64; A = freq % 64; rtc6705_write_register(0, 400); diff --git a/src/main/io/osd.c b/src/main/io/osd.c index 7cb01c4fd..52d0a8a65 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -397,8 +397,6 @@ void print_batt_voltage(uint16_t pos, uint8_t col) { { "rc_yaw_expo", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].rcYawExpo8, .config.minmax = { 0, 100 } }, { "thr_mid", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].thrMid8, .config.minmax = { 0, 100 } }, { "thr_expo", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].thrExpo8, .config.minmax = { 0, 100 } }, - { "tpa_rate", VAR_UINT8 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].dynThrPID, .config.minmax = { 0, CONTROL_RATE_CONFIG_TPA_MAX} }, - { "tpa_breakpoint", VAR_UINT16 | PROFILE_RATE_VALUE, &masterConfig.profile[0].controlRateProfile[0].tpa_breakpoint, .config.minmax = { PWM_RANGE_MIN, PWM_RANGE_MAX} }, { "acro_plus_factor", VAR_UINT8 | MASTER_VALUE, &masterConfig.rxConfig.acroPlusFactor, .config.minmax = {1, 100 } }, { "acro_plus_offset", VAR_UINT8 | MASTER_VALUE, &masterConfig.rxConfig.acroPlusOffset, .config.minmax = {1, 90 } }, */ @@ -460,7 +458,7 @@ page_t menu_pages[] = { { .title = "PID SETTINGS", .cols_number = 3, - .rows_number = 6, + .rows_number = 8, .cols = { { .title = "P", diff --git a/src/main/target/SIRINFPV/target.h b/src/main/target/SIRINFPV/target.h index daccbe276..2f9168891 100644 --- a/src/main/target/SIRINFPV/target.h +++ b/src/main/target/SIRINFPV/target.h @@ -17,7 +17,11 @@ #pragma once -#define TARGET_BOARD_IDENTIFIER "FPVR" +#define TARGET_BOARD_IDENTIFIER "SIRF" + +#define LED0_GPIO GPIOB +#define LED0_PIN Pin_2 +#define LED0_PERIPHERAL RCC_AHBPeriph_GPIOB #define BEEP_GPIO GPIOA #define BEEP_PIN Pin_1 @@ -25,18 +29,20 @@ #define USABLE_TIMER_CHANNEL_COUNT 6 -#define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect +#define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU_INT #define USE_MPU_DATA_READY_SIGNAL #define ENSURE_MPU_DATA_READY_IS_LOW #define GYRO #define USE_GYRO_SPI_MPU6000 -//#define USE_GYRO_SPI_MPU6500 +#define USE_GYRO_MPU6500 +#define USE_GYRO_SPI_MPU6500 #define ACC #define USE_ACC_SPI_MPU6000 -//#define USE_ACC_SPI_MPU6500 +#define USE_ACC_MPU6500 +#define USE_ACC_SPI_MPU6500 // MPU6000 #define ACC_MPU6000_ALIGN CW180_DEG @@ -47,8 +53,8 @@ #define MPU6000_SPI_INSTANCE SPI1 // MPU6500 -#define ACC_MPU6500_ALIGN CW180_DEG -#define GYRO_MPU6500_ALIGN CW180_DEG +#define ACC_MPU6500_ALIGN CW90_DEG +#define GYRO_MPU6500_ALIGN CW90_DEG #define MPU6500_CS_GPIO GPIOA #define MPU6500_CS_PIN GPIO_Pin_4 @@ -59,11 +65,11 @@ #define BEEPER #define USB_IO -#define USB_CABLE_DETECTION -#define USB_DETECT_PIN GPIO_Pin_2 -#define USB_DETECT_GPIO_PORT GPIOB -#define USB_DETECT_GPIO_CLK RCC_AHBPeriph_GPIOB +//#define USB_CABLE_DETECTION +//#define USB_DETECT_PIN GPIO_Pin_2 +//#define USB_DETECT_GPIO_PORT GPIOB +//#define USB_DETECT_GPIO_CLK RCC_AHBPeriph_GPIOB #define USE_VCP #define USE_USART1 @@ -175,7 +181,6 @@ #define USE_ADC #define BOARD_HAS_VOLTAGE_DIVIDER - #define ADC_INSTANCE ADC1 #define ADC_DMA_CHANNEL DMA1_Channel1 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA1 @@ -192,11 +197,7 @@ #define GTUNE #define USE_CLI #define OSD - -//#define SPEKTRUM_BIND -// USART3, -//#define BIND_PORT GPIOB -//#define BIND_PIN Pin_11 +#define LED0 #define USE_SERIAL_1WIRE