HelloI am new here.I bought a Ardupilot in sparkfun to use it in FPV I upload de v 1.0 of the software for ardupilotI need help to configure the ardupilot with my transmitter.Ok. I have a 3 position swich in my transmitter and i would like to use this swich shared with the FMA copilot in this configuration:Swich down= Ardulipot and copilot OFFSwich in the middle= Copilot ON ardupilot OFFSwich UP= Copilot + Ardupilot ONThe problem is that actually whern I put the swich in the middle the ardupilot became a ON, but I can not find in wich part of the code can I setup the pulses to put On the ardupilot only when the swich is in the Up posisiton.Plase can some one help me??Thaks a lot in advanceBest regards
You need to be a member of diydrones to add comments!
Replies
Short answer: copy this code from ArduPilot 2.0:
byte Tx_Switch_Status(void) //Return zero when we are in manual mode, return 2 when autopilot mode 0, return 3 when autopilot mode 1...
{
if(digitalRead(4)==HIGH)
{
if(digitalRead(5)==HIGH)
return 0x01; // WP mode
else
return 0x02; // RTL mode
}
else
return 0x00;
}