Browse Source

Copter: add support for AP_Generator

c415-sdk
Peter Barker 5 years ago committed by Randy Mackay
parent
commit
a679cd9b92
  1. 3
      ArduCopter/Copter.cpp
  2. 4
      ArduCopter/system.cpp

3
ArduCopter/Copter.cpp

@ -181,6 +181,9 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = { @@ -181,6 +181,9 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = {
#if WINCH_ENABLED == ENABLED
SCHED_TASK(winch_update, 10, 50),
#endif
#if GENERATOR_ENABLED
SCHED_TASK_CLASS(AP_Generator_RichenPower, &copter.generator, update, 10, 50),
#endif
#ifdef USERHOOK_FASTLOOP
SCHED_TASK(userhook_FastLoop, 100, 75),
#endif

4
ArduCopter/system.cpp

@ -53,6 +53,10 @@ void Copter::init_ardupilot() @@ -53,6 +53,10 @@ void Copter::init_ardupilot()
// setup telem slots with serial ports
gcs().setup_uarts();
#if GENERATOR_ENABLED
generator.init();
#endif
#if OSD_ENABLED == ENABLED
osd.init();
#endif

Loading…
Cancel
Save