Got it. Help and inputs are very much appreciated, Randy.
Thanks for the vid as well. Looks very promising. Sorry about the near crash at the end. Perhaps the motors's KVs are too low and/or props used, too narrow/thin and low pitch and lacks torque/thrust?
Good news. Finally got a clean compile with the following sprayer codes
(in blue) integrated in ArduPlane.
Pls. note that other than these, additional modifications in parameters.h, parameters.pde and config.h are as per your "integrate AC_Sprayer.." commit.
Also, I'm still trying to figure out how to do the changes in
control_modes.pde and
defines.h to include your "enable added to CH7/CH8 switch" commits, given ArduPlane's different input channel assignments and lack of definitions (I could just be missing them) for supporting AUX channels. Any thoughts on this?
Can you pls. do a sanity check on the ff. code modifications, just to make sure...
File: ArduPlane.pde:
~~~~ inserted lines 93 - 97
~~~
#if SPRAYER == ENABLED
#include <AC_Sprayer.h> // Crop sprayer library
#include <AP_InertialNav.h> // ArduPilot Mega inertial navigation library
#endif
~~~
~~~~ inserted lines 687- 690
~~~
#if SPRAYER == ENABLED
// Counter for branching from 3 1/3hz control loop, for the sprayer runtime
static uint8_t slow_loopCounter;
#endif
~~~
~~~~ inserted line 751
static const AP_Scheduler::Task scheduler_tasks[] PROGMEM = {
{ update_speed_height, 1, 900 }, // 0
{ update_flight_mode, 1, 1000 },
~~~
{ slow_loop, 10, 500 }, //3 1/3hz control loop
~~~
~~~~ inserted lines 966 - 983
~~~
// slow_loop - 3.3hz loop
static void slow_loop()
{
// This is the slow (3 1/3 Hz) loop runtime
switch (slow_loopCounter) {
case 0:
slow_loopCounter++;
#if SPRAYER == ENABLED
sprayer.update();
#endif
break;
default:
slow_loopCounter = 0;
break;
}
}
static void one_second_loop()
{
~~~
Many thanks.
Cheers.
Daniel