Browse Source

AP_Vehicle: generalise ESC telemetry to allow harmonic notch handling with other ESCs

log ESC telemetry data in frontend
zr-v5.1
Andy Piper 4 years ago committed by Andrew Tridgell
parent
commit
5d154b138a
  1. 4
      libraries/AP_Vehicle/AP_Vehicle.cpp
  2. 2
      libraries/AP_Vehicle/AP_Vehicle.h

4
libraries/AP_Vehicle/AP_Vehicle.cpp

@ -175,6 +175,7 @@ void AP_Vehicle::setup()
#if GENERATOR_ENABLED #if GENERATOR_ENABLED
generator.init(); generator.init();
#endif #endif
} }
void AP_Vehicle::loop() void AP_Vehicle::loop()
@ -221,6 +222,9 @@ const AP_Scheduler::Task AP_Vehicle::scheduler_tasks[] = {
SCHED_TASK(update_dynamic_notch, 200, 200), SCHED_TASK(update_dynamic_notch, 200, 200),
SCHED_TASK_CLASS(AP_VideoTX, &vehicle.vtx, update, 2, 100), SCHED_TASK_CLASS(AP_VideoTX, &vehicle.vtx, update, 2, 100),
SCHED_TASK(send_watchdog_reset_statustext, 0.1, 20), SCHED_TASK(send_watchdog_reset_statustext, 0.1, 20),
#if HAL_WITH_ESC_TELEM
SCHED_TASK_CLASS(AP_ESC_Telem, &vehicle.esc_telem, update, 10, 50),
#endif
#if GENERATOR_ENABLED #if GENERATOR_ENABLED
SCHED_TASK_CLASS(AP_Generator, &vehicle.generator, update, 10, 50), SCHED_TASK_CLASS(AP_Generator, &vehicle.generator, update, 10, 50),
#endif #endif

2
libraries/AP_Vehicle/AP_Vehicle.h

@ -307,7 +307,9 @@ protected:
AP_VisualOdom visual_odom; AP_VisualOdom visual_odom;
#endif #endif
#if HAL_WITH_ESC_TELEM
AP_ESC_Telem esc_telem; AP_ESC_Telem esc_telem;
#endif
#if HAL_MSP_ENABLED #if HAL_MSP_ENABLED
AP_MSP msp; AP_MSP msp;

Loading…
Cancel
Save