1
0
Fork 0
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:
Ivan Efimov 2023-08-06 10:32:57 -05:00 committed by GitHub
parent fb9587b2ec
commit dfef3bfb0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 191 additions and 1 deletions

View file

@ -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
}