mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge remote-tracking branch 'betaflight/master' into bfdev-smartaudio
This commit is contained in:
commit
86bb650617
109 changed files with 3283 additions and 1706 deletions
|
@ -92,7 +92,7 @@ static void taskUpdateAccelerometer(timeUs_t currentTimeUs)
|
|||
{
|
||||
UNUSED(currentTimeUs);
|
||||
|
||||
imuUpdateAccelerometer(&masterConfig.accelerometerTrims);
|
||||
accUpdate(&accelerometerConfig()->accelerometerTrims);
|
||||
}
|
||||
|
||||
static void taskHandleSerial(timeUs_t currentTimeUs)
|
||||
|
@ -111,8 +111,8 @@ static void taskHandleSerial(timeUs_t currentTimeUs)
|
|||
static void taskUpdateBattery(timeUs_t currentTimeUs)
|
||||
{
|
||||
#if defined(USE_ADC) || defined(USE_ESC_SENSOR)
|
||||
static uint32_t vbatLastServiced = 0;
|
||||
if (feature(FEATURE_VBAT) || feature(FEATURE_ESC_SENSOR)) {
|
||||
static uint32_t vbatLastServiced = 0;
|
||||
if (cmp32(currentTimeUs, vbatLastServiced) >= VBATINTERVAL) {
|
||||
vbatLastServiced = currentTimeUs;
|
||||
updateBattery();
|
||||
|
@ -120,8 +120,8 @@ static void taskUpdateBattery(timeUs_t currentTimeUs)
|
|||
}
|
||||
#endif
|
||||
|
||||
static uint32_t ibatLastServiced = 0;
|
||||
if (feature(FEATURE_CURRENT_METER) || feature(FEATURE_ESC_SENSOR)) {
|
||||
static uint32_t ibatLastServiced = 0;
|
||||
const int32_t ibatTimeSinceLastServiced = cmp32(currentTimeUs, ibatLastServiced);
|
||||
|
||||
if (ibatTimeSinceLastServiced >= IBATINTERVAL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue