Hi
I’m testing on a mangOH yellow
I have edge action which I’d like to be able to maintain a non-volatile value - the current code looks like this
function(event) {
...
var cycleCount = Datahub.read("virtual/config/cyclecount/value",0);
var retVal = {};
...
if(cycleCount === null) // manage lack of cyclecount config on new systems
{
var cycleCount = {};
cycleCount.value = 0;
retVal["vr://config/cyclecount"] = [0];
}
...
case "wait":
if(startSwitch.value == true)
{
...
retVal["vr://config/cyclecount"] = [cycleCount.value + 1];
...
}
}
This code creates an entry in “vr://config/cyclecount”
But the cyclecount/value is volatile I was hoping it would be non-volatile
How do I implement a non-volatile value from an edge action?
Thanks
John