I’ve managed to setup some can di button switches to turn functions on and off but im having trouble with sending through virtual rotary encoder values (1,2,3,4,5 etc) to a can an input.
My dashboard is setup to use two buttons that toggle a value up/down (storing it in a dummy value slot).
I then have a button that is used to ‘set’ that value. My XML looks like this:
<frame id="1005" writeInterval="100">
<value name="Send to Link: Log Marker" length="1" units="bit"></value>
<value name="Send to Link: Launch Toggle" length="1" units="bit" offset="1"></value>
<value name="Send to Link: Flat Foot Toggle" length="1" units="bit" offset="2"></value>
</frame>
<frame id="1006" writeInterval="100">
<value name="Link: Launch CAN AN 16 Output" length="2"> </value> <!-- GP Rotary output -->
<!--value name="Link: Launch RPM Value" length="2" offset="2" enum="0:4000,1:4500,2:5000,3:5500,4:6000,5:6500,#:err"></value-->
</frame>
CAN AN16 Output is sending its value across to my ecu (1 is being sent as 256, 2 as 512 etc). And I see this value reflected on the an16 input link side, but, its only set for a second or so before defaulting back to 0.0.
Here is how the can frame to receive the data looks like:
Thanks for the suggestions, I did try removing the write interval but didnt see a differece in behaviour (I previously had it set to just be sent at intervals with the rotary buttons changing the value).
Launch +/- adjust the dummy value I have stored (see debug numbers bottom right of dash) through the range of 1-5.
The ‘set launch’ button takes this value (id93) and sets:
“Send to Link: Launch RPM Set”.
This is then received by link as can an16 with the config as shown a couple posts up…
The workflow works, and the value gets set albeit briefly, before reverting back to ‘0.0’ inside of link (the dummy value stays as it was set in realdash and if i I toggle the value up/down and hit set, I see the value update in link, before going back to 0.0 again).
Does that make sense? Its the persistence of the value I am having issues with.
ok: RPM+ is seeding a frame 0x000003ED:0x00 0x00…
same as RPM- from realdash then it should get the value back on the same frame
i don’t see it in your xml in your xml you have 2 frames 4 value
im missing what are the buttons doings
now i see SET is sending the command on frame 1006
I see the can frames making its way through to link (showing its leaving realdash ok). Its just that the value doesnt stay at what it is set, its being set back to 0.0 for some reason.