Moderator

Test Suite: Throttle Test code won't compile

I get the following error when compiling the Throttle test code in the testing suite:

 In function 'void update_throttle()':
error: 'control_mode' was not declared in this scope

#if THROTTLE_OUT == 0
    servo_throttle = 0;
#else
    if (control_mode > STABILIZE){
        servo_throttle = constrain(servo_throttle, 0, THROTTLE_MAX);
    }
#endif


Is there a corrected version, or can anyone offer a correction I can edit in?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer
    I'll redo these. It's been a while and they were never updated for 2.6.
    Jason
  • What should i see to the throttle after i upload the program to ardupilot? sorry newbie here~
  • Hi,

    Under the line #include "easystar_25.h" in Ardupilot_25_throttle_test.pde, try adding the 2 lines:

    #include "defines.h"

    byte control_mode =MANUAL;

    Save and close. Copy the defines.h file from the ArduPilot_2_5 sketch folder into the throttle_test sketch folder.

    Reopen the throttle_test sketch and it should now compile (but I can't say for sure it will work as intended).

    Best of luck!
  • When I tried to compile I got the exact same message.
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…