Edge-triggered controls.

More
30 Jun 2013 06:41 #11620 by mwm
Edge-triggered controls. was created by mwm
By "edge-triggered", I mean controls in the receiver board that are triggered by changes in the signal, rather than the value of the signal ("level-triggered" in the same nomenclature).

The WLToys v959 video/light controls are examples of those that have been around a while. For lights and still cameras, it's not to much of a problem. Video is a bit more painful.

A newer example is the Blade Nano QX quad's stable/agile mode switch. This is triggered on channel 6 going from 0->1. Like the v959 stuff, this works if you allocate a switch to it, and just toggle it on/off/on or off/on/off, but it's painful.

These could be made easier by swapping in a momentary switch (or adding one on the 7E) for one of the toggle switches. However, for the nQX, it would be really nice if the quad's flight mode were indicated by a switch position! I'd also like that for the 959 video camera, but that at least doesn't change how the thing flies.

I think this should be fixable in software. In fact, I sorta-kinda got it working myself. Save the old value of the switch driving the channel, then when applying the mixers, see if the raw and old value are the same. If not, output CHAN_MAX_VALUE, otherwise output CHAN_MIN_VALUE. That way, you'd pulse the value whenever you flipped the switch, so the switch position would show the current setting.

Trouble is, it's not reliable. I tried some techniques to keep the value up for a bit after it changed, and got it to work a bit better, but never well enough to trust.

Could someone more knowledgeable take a crack at this? Maybe suggest a method for getting a reliable delay on the value that way? Or another approach to this problem?

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

Please Log in or Create an account to join the conversation.

Time to create page: 0.028 seconds
Powered by Kunena Forum