mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
CF/BF - reduce code size by changing dependencies in battery.c and removing two
functions from fc_tasks.c I don't like the dependency changes, but I'm not overly concerned by them.
This commit is contained in:
parent
486b5a1b9a
commit
709cd9f8df
3 changed files with 16 additions and 20 deletions
|
@ -109,19 +109,6 @@ static void taskHandleSerial(timeUs_t currentTimeUs)
|
|||
mspSerialProcess(ARMING_FLAG(ARMED) ? MSP_SKIP_NON_MSP_DATA : MSP_EVALUATE_NON_MSP_DATA, mspFcProcessCommand);
|
||||
}
|
||||
|
||||
|
||||
void taskBatteryVoltage(timeUs_t currentTimeUs)
|
||||
{
|
||||
UNUSED(currentTimeUs);
|
||||
batteryUpdateVoltage();
|
||||
}
|
||||
|
||||
void taskBatteryCurrent(timeUs_t currentTimeUs)
|
||||
{
|
||||
UNUSED(currentTimeUs);
|
||||
batteryUpdateCurrentMeter(getTaskDeltaTime(TASK_SELF), ARMING_FLAG(ARMED));
|
||||
}
|
||||
|
||||
void taskBatteryAlerts(timeUs_t currentTimeUs)
|
||||
{
|
||||
UNUSED(currentTimeUs);
|
||||
|
@ -381,13 +368,13 @@ cfTask_t cfTasks[TASK_COUNT] = {
|
|||
|
||||
[TASK_BATTERY_VOLTAGE] = {
|
||||
.taskName = "BATTERY_VOLTAGE",
|
||||
.taskFunc = taskBatteryVoltage,
|
||||
.taskFunc = batteryUpdateVoltage,
|
||||
.desiredPeriod = TASK_PERIOD_HZ(50),
|
||||
.staticPriority = TASK_PRIORITY_MEDIUM,
|
||||
},
|
||||
[TASK_BATTERY_CURRENT] = {
|
||||
.taskName = "BATTERY_CURRENT",
|
||||
.taskFunc = taskBatteryCurrent,
|
||||
.taskFunc = batteryUpdateCurrentMeter,
|
||||
.desiredPeriod = TASK_PERIOD_HZ(50),
|
||||
.staticPriority = TASK_PRIORITY_MEDIUM,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue