mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Merge remote-tracking branch 'multiwii/master'
Conflicts: src/board.h src/drv_timer.c src/mw.c src/sensors.c
This commit is contained in:
commit
79a90b09ef
3 changed files with 4 additions and 4 deletions
|
@ -59,8 +59,8 @@ void batteryInit(batteryConfig_t *initialBatteryConfig)
|
||||||
|
|
||||||
voltage = batteryAdcToVoltage((uint16_t)(voltage / 32));
|
voltage = batteryAdcToVoltage((uint16_t)(voltage / 32));
|
||||||
|
|
||||||
// autodetect cell count, going from 2S..6S
|
// autodetect cell count, going from 2S..8S
|
||||||
for (i = 1; i < 6; i++) {
|
for (i = 1; i < 8; i++) {
|
||||||
if (voltage < i * batteryConfig->vbatmaxcellvoltage)
|
if (voltage < i * batteryConfig->vbatmaxcellvoltage)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,7 @@ void i2cInit(I2C_TypeDef *I2C)
|
||||||
I2C_Cmd(I2Cx, ENABLE);
|
I2C_Cmd(I2Cx, ENABLE);
|
||||||
I2C_Init(I2Cx, &I2C_InitStructure);
|
I2C_Init(I2Cx, &I2C_InitStructure);
|
||||||
|
|
||||||
NVIC_PriorityGroupConfig(0x500);
|
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
|
||||||
|
|
||||||
// I2C ER Interrupt
|
// I2C ER Interrupt
|
||||||
NVIC_InitStructure.NVIC_IRQChannel = I2C2_ER_IRQn;
|
NVIC_InitStructure.NVIC_IRQChannel = I2C2_ER_IRQn;
|
||||||
|
|
|
@ -215,7 +215,7 @@ void timerNVICConfigure(uint8_t irq)
|
||||||
NVIC_InitTypeDef NVIC_InitStructure;
|
NVIC_InitTypeDef NVIC_InitStructure;
|
||||||
|
|
||||||
NVIC_InitStructure.NVIC_IRQChannel = irq;
|
NVIC_InitStructure.NVIC_IRQChannel = irq;
|
||||||
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
|
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
|
||||||
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1;
|
||||||
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
|
||||||
NVIC_Init(&NVIC_InitStructure);
|
NVIC_Init(&NVIC_InitStructure);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue