mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Added throttle flight statistics (#12978)
* Added throttle flight statistics * Changed rc_stats.c/h license header to a modern one * rc_stats.c Style fix
This commit is contained in:
parent
fb9587b2ec
commit
dfef3bfb0e
11 changed files with 191 additions and 1 deletions
|
@ -82,6 +82,7 @@
|
|||
#include "pg/motor.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
#include "rx/rc_stats.h"
|
||||
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
|
@ -450,6 +451,11 @@ task_attribute_t task_attributes[TASK_COUNT] = {
|
|||
#ifdef USE_CRSF_V3
|
||||
[TASK_SPEED_NEGOTIATION] = DEFINE_TASK("SPEED_NEGOTIATION", NULL, NULL, speedNegotiationProcess, TASK_PERIOD_HZ(100), TASK_PRIORITY_LOW),
|
||||
#endif
|
||||
|
||||
#ifdef USE_RC_STATS
|
||||
[TASK_RC_STATS] = DEFINE_TASK("RC_STATS", NULL, NULL, rcStatsUpdate, TASK_PERIOD_HZ(100), TASK_PRIORITY_LOW),
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
task_t *getTask(unsigned taskId)
|
||||
|
@ -621,4 +627,8 @@ void tasksInit(void)
|
|||
#ifdef SIMULATOR_MULTITHREAD
|
||||
rescheduleTask(TASK_RX, 1);
|
||||
#endif
|
||||
|
||||
#ifdef USE_RC_STATS
|
||||
setTaskEnabled(TASK_RC_STATS, true);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue