Hi,
I've had a crack at it... I'm sending good data from my Arduino (verified by the IDE serial monitor). I send four analogue values followed by a boolean (1 or 0) that changes when the trigger is pressed. These values are all separated by commas, example below from Arduino IDE serial monitor:
(x position, y position, trim x value, trim y value, trigger bool state)
0.32,0.38,0.06,-0.05,0,
0.32,0.38,0.06,-0.05,0,
0.32,0.38,0.06,-0.05,1, - last "1" shows trigger pressed, returns to "0" when released
0.32,0.38,0.06,-0.05,1,
All analogues are controlling the flight surfaces as per normal, so my generic protocol file is working nicely for them.
I had a go at adding a chunk to the generic protocol to use the trigger to take a screenshot. I found very little information on using bindings with the generic protocol, so have just been playing around with it, based on no knowledge... so far it's not worked.
Below is an extract form my hardware protocol file, the first chunk is one that works to set the elevator trim, the second is my attempt to bind the input to the screen-capture command designed by guess work, and not working:
- Code: Select all
<chunk>
<name>elevator-trim</name>
<type>float</type>
<node>/controls/flight/elevator-trim</node>
</chunk>
<chunk>
<name>trigger</name>
<binding>
<command>screen-capture</command>
</binding>
</chunk>
Any guidance on this would really be appreciated...
Thanks, Scott.