SkyController GPS Fixed Event return values



For the SkyController’s GPS Fixed State event what is the meaning of the return values?

I had previously worked under the assumption that I would only ever receive a 0 or 1 as the return value but I’ve noticed a couple crash reports come in showing that it is some times returning a significantly higher value such as 4 or 5.

Any idea what this is about?





I’m … puzzled …

FYI, here is the function that is internally called to generate the gpsFixedChanged command:

public boolean onSkyContollerGpsFixChanged (boolean fixed)
    ARCommand cmd = new ARCommand();
    cmd.setSkyControllerSkyControllerStateGpsFixChanged((byte)(fixed ? 1 : 0));
    boolean res = sendDataAckToTablet(cmd);
    ARSALPrint.d(TAG, "onSkyContollerGpsFixChanged res="+res);
    return res;

So … I don’t know what can generate your values, but my bet would be on a memory overwrite (thus leading to the crash).

I’ll check on the FreeFlight crash reports to see if we have something similar.



That’s the code I originally used as reference. I’ve surrounded my own parse a bit more cleanly now (was previously relying on an enum ordinal) so I can work around it.