I am using sendAcknowledge to send some ant payloads to my sensor, I set 3 different payloads to send altitude, latitude, and longitude separately in compute().
I tested it in the simulator and it works perfectly.
But when I deployed my DF to my Garmin Edge 1040, I found only the first payload sent by sendAcknowledge could be received, though the sendAcknowledge returned "true".
Like only the altitude can be sent.
If I change the order to: latitude, altitude, and longitude, only the latitude was received.
I paste my code to show how I send the payload in compute().
var positionLocation = positionInfo.position;
var myLocation = positionLocation.toDegrees();
var latitude = myLocation[0];
// System.println("latitude: " + latitude); //For debugging
var transformLatitude = new[4]b;
transformLatitude.encodeNumber(latitude, Lang.NUMBER_FORMAT_FLOAT, null);
var latitudeAntData = new[8]b;
latitudeAntData[0] = 0xFE;
latitudeAntData[1] = 0x06;
latitudeAntData[2] = 0x00;
latitudeAntData[3] = transformLatitude[0];
latitudeAntData[4] = transformLatitude[1];
latitudeAntData[5] = transformLatitude[2];
latitudeAntData[6] = transformLatitude[3];
latitudeAntData[7] = 0x00;
var latitudeAntPackage = new Ant.Message();
latitudeAntPackage.setPayload(latitudeAntData); // Assumes valid data
genericalChannel.sendAcknowledge(latitudeAntPackage);
System.println(" latitudeAntPackage: " + latitudeAntData); //For debugging