I have created a type which is an array of Shorts, which I need to populate with data received via bluetooth. The type contains many more entries than what I have put in below:
In order to unpack the contents of an array into this structure, I am trying to do this:
But I am getting a compilation error:
src\SpiroConnect\Home\unit_comms.java:690: error: incompatible types
final anywheresoftware.b4a.BA.IterableList group291 = mostCurrent._forcedtest._results;
required: IterableList
found: _pktresults
I understand that the error is because my type is not an array as such.
Is there a different loop type or method that I can use to access each element of my type in a looping manner?
Thanks
B4X:
Type PktResults(RV1 As Short, RV2 As Short, RV3 As Short, RV4 As Short)
In order to unpack the contents of an array into this structure, I am trying to do this:
B4X:
Dim ref As Byte = 0
For Each n As Short In ForcedTest.Results
n = Bit.Xor(pData(ref)*256,ByteToInt(pData(ref+1)))
ref = ref+2
Next
But I am getting a compilation error:
src\SpiroConnect\Home\unit_comms.java:690: error: incompatible types
final anywheresoftware.b4a.BA.IterableList group291 = mostCurrent._forcedtest._results;
required: IterableList
found: _pktresults
I understand that the error is because my type is not an array as such.
Is there a different loop type or method that I can use to access each element of my type in a looping manner?
Thanks