Hi, as the title says, I'm tryng to analyze a custom protocol in the logic analyzer in WaveForms.
I can't disclose every detail but I can write some example code.
My problem is the following: my protocol has more than 32 bits per word, how can I pass a full word to the Value2Text function?
I tried to assign a byte array to the rgValue variable, I can confirm it works as intended through the debug window.
The Value2Text script however receives a 0 value parameter, not the array I assigned.
I took the SPI example and modified it, the relevant part is:
...
// store rgValue/Flag from word start index to current sample position
for(var j = iStart; j < i; j++){
// Flag change will be visible on plot even when data remains constant.
// This is useful in case we get more consecutive equal values.
rgFlag[j] = cByte;
rgValue[j] = bValue; // NOTE: here bValue is an array, not a byte
}
...
And as I said, the value to text script:
function Value2Text(flag, value){
// NOTE: value is 0
...
Thanks a lot for your help.