Developer

Failsafe and throttles

I've been working through the Ardupilot code function by function trying to rebuild it. (Unfortunately the only way I can really learn code is take it apart and rebuild it and experiment with it.) I've been able to control servos, use the MUX, and read radio PWM values, etc.The documentation is slim so I wanted to ask a few questions that might help me along:The MUX pin is connected to the ATMega through PD4 to PB1 on Tiny and on to the MUX Select. Does that mean both processors can switch the MUX?2 In the Failsafe what's the difference between state 1 and 2 in the case statement. They look the same to me.3 The failsafe seems strange to me because my radio RX would never trigger it. I have a Futaba Fasst and it communicates failsafe through the throttle value (it holds all other values), but ArduPilot doesn't seem to be able to read the Throttle. Is this an oversight on my part? I'd like to be able to read that value and trigger events based on it. If I want to read the throttle, would I connect it to the Tiny or ATMega? If the Tiny, how would I tell the ATMega? Through the Mode pin?Thanks!Jason

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

Join diydrones

Email me when people reply –

Replies

  • Developer
    1) Strange, I can set the ATMega pin 4 to output and control the MUX through code no problem. Is that not safe?
    -
    3) I looked at the Eagle files and throttle in doesn't seem to be connected to anything but the MUX.

    Thanks,
    Jason
  • 3D Robotics
    1) No. Only the Attiny can switch the MUX. The Atmega is just reading the state of those two pins (producing four possible autopilot states)

    2) Not sure. Ask Jordi, who wrote that.

    3) Yes, ArduPilot does read the throttle (via the Atmega) when you connect that channel as instructed by the manual. But the Attiny does not read that channel. The failsafe code in the Attiny was designed for 72 Mhz radios, which have predictable signal loss behavior, and 2.4Ghz radios such as the Spektrum, which allows you to assign failsafe behavior to any channel (in the case, you'd assign it to 5). I know of no way to make it work with a Futaba, which will only assign failsafe actions to channel 3 (throttle)
This reply was deleted.

Activity