Issue with get_variation command

So I asked @NoSloppy to add a new get_variation command to be able to check the current variation value from the ForceSync bluetooth app and it works perfectly so please add it to the master code. But there is one issue with it during blade powered ON, it gives an old value reply instead of the updated value. But works perfectly when blade is OFF:

get_variation

-+=BEGIN_OUTPUT=+-
0
-+=END_OUTPUT=+-

off

variation 3267

-+=BEGIN_OUTPUT=+-
-+=END_OUTPUT=+-

get_variation

-+=BEGIN_OUTPUT=+-
3267
-+=END_OUTPUT=+-

on

-+=BEGIN_OUTPUT=+-
Ignition.
-+=END_OUTPUT=+-

variation 2849

-+=BEGIN_OUTPUT=+-
-+=END_OUTPUT=+-

get_variation

-+=BEGIN_OUTPUT=+-
3267
-+=END_OUTPUT=+-

To add to this, it seems fine in Serial Monitor.

 Received: var 555
 variation set 555
 Creating file 01_Ronin_save/presets.tmp iteration = 2
 Received: get_variation
 variation 555
 Received: on
 Ignition.
 Received: get_variation
 variation 555
 Received: var 777
 variation set 777
 Received: get_variation
 variation 777
 Received: off
 Creating file 01_Ronin_save/presets.ini iteration = 3
 Received: get_variation
 variation 777

So it’s something with the way the remote connection works?

yes, same situation with scanid command, they don’t work over bluetooth serial currently…

The earlier version of the code had a problem where it would read and write the variation from different places. When off, automatic saves would take care of synchronizing these two places, when on saving is delayed until later.

The updated code available on github (but not yet checked in) should not have this issue.

@NoSloppy ’s recent solution to this issue also fixed it, I’ve tested it :+1:

1 Like