Created
August 12, 2016 21:51
-
-
Save tannewt/9cff8ee306c3bd15dfa226aa48ed3ffd to your computer and use it in GitHub Desktop.
fixes for pixracer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/config/config.c b/src/main/config/config.c | |
index 6117f92..b8cc59d 100755 | |
--- a/src/main/config/config.c | |
+++ b/src/main/config/config.c | |
@@ -704,7 +704,7 @@ void createDefaultConfig(master_t *config) | |
} | |
#endif | |
- | |
+ | |
// copy first profile into remaining profile | |
for (int i = 1; i < MAX_PROFILE_COUNT; i++) { | |
memcpy(&config->profile[i], &config->profile[0], sizeof(profile_t)); | |
@@ -1003,7 +1003,7 @@ void writeEEPROM(void) | |
#endif | |
for (wordOffset = 0; wordOffset < sizeof(master_t); wordOffset += 4) { | |
if (wordOffset % FLASH_PAGE_SIZE == 0) { | |
-#if defined(STM32F40_41xxx) | |
+#if defined(STM32F40_41xxx) || defined(STM32F427_437xx) | |
status = FLASH_EraseSector(FLASH_Sector_8, VoltageRange_3); //0x08080000 to 0x080A0000 | |
#elif defined (STM32F411xE) | |
status = FLASH_EraseSector(FLASH_Sector_7, VoltageRange_3); //0x08060000 to 0x08080000 | |
diff --git a/src/main/target/PIXRACERF4/target.c b/src/main/target/PIXRACERF4/target.c | |
index 5db4a86..c82897b 100644 | |
--- a/src/main/target/PIXRACERF4/target.c | |
+++ b/src/main/target/PIXRACERF4/target.c | |
@@ -68,10 +68,10 @@ const uint16_t airPWM[] = { | |
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { | |
{ TIM3, IO_TAG(PB0), TIM_Channel_3, TIM3_IRQn, 0, IOCFG_AF_PP_PD, GPIO_AF_TIM3 }, // PPM shared uart6 pc7 | |
- { TIM1, IO_TAG(PE14), TIM_Channel_4, TIM1_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S1_OUT | |
- { TIM1, IO_TAG(PE13), TIM_Channel_3, TIM1_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S2_OUT | |
- { TIM1, IO_TAG(PE11), TIM_Channel_2, TIM1_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S3_OUT | |
- { TIM1, IO_TAG(PE9), TIM_Channel_1, TIM1_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S4_OUT | |
+ { TIM1, IO_TAG(PE14), TIM_Channel_4, TIM1_CC_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S1_OUT | |
+ { TIM1, IO_TAG(PE13), TIM_Channel_3, TIM1_CC_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S2_OUT | |
+ { TIM1, IO_TAG(PE11), TIM_Channel_2, TIM1_CC_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S3_OUT | |
+ { TIM1, IO_TAG(PE9), TIM_Channel_1, TIM1_CC_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM1 }, // S4_OUT | |
{ TIM4, IO_TAG(PD13), TIM_Channel_2, TIM4_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM4 }, // S5_OUT | |
{ TIM4, IO_TAG(PD14), TIM_Channel_3, TIM4_IRQn, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM4 }, // S6_OUT | |
}; | |
diff --git a/src/main/target/PIXRACERF4/target.h b/src/main/target/PIXRACERF4/target.h | |
index 635ea07..00a4d9d 100644 | |
--- a/src/main/target/PIXRACERF4/target.h | |
+++ b/src/main/target/PIXRACERF4/target.h | |
@@ -160,5 +160,6 @@ | |
#define TARGET_IO_PORTB 0xffff | |
#define TARGET_IO_PORTC 0xffff | |
#define TARGET_IO_PORTD 0xffff | |
+#define TARGET_IO_PORTE 0xffff | |
-#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4)) | |
\ No newline at end of file | |
+#define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4)) | |
diff --git a/src/main/target/PIXRACERF4/target.mk b/src/main/target/PIXRACERF4/target.mk | |
index b0f566d..66bb47a 100644 | |
--- a/src/main/target/PIXRACERF4/target.mk | |
+++ b/src/main/target/PIXRACERF4/target.mk | |
@@ -3,6 +3,5 @@ FEATURES += SDCARD VCP | |
TARGET_SRC = \ | |
drivers/accgyro_spi_mpu9250.c \ | |
- drivers/accgyro_mpu9250.c \ | |
drivers/barometer_ms5611.c \ | |
- | |
+ drivers/compass_ak8963.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment