DataField compute method update with garmin Varia radar

Hi, please check that the compute method of the DataField is called once per second, according to documentation, also when the varia radar is reporting cars behind. In such case the screen is updated more than once per second and it seems that the datafield compute method is called jointly.If a datafield trust on the fact that compute method is called once per seconds errors or bad data may occur.
I have verified also that the standard slope datafield seems to go wrong when cars is incoming, when my edge 1000 display the fast moving small balls on the right, the slope goes from 0.5 % to 2% or more in a few of seconds. ( I have verified on edge 1000, last fw)
  • Former Member
    Former Member
    The compute() method is definitely driven by a 1Hz event that is independent of other events in the system.

    However, the onUpdate() function is called each time the screen updates. If the application you are describing is making calculations based on the assumption that onUpdate() is called at 1Hz, this could cause errors.

    The native data fields do not execute on the Connect IQ VM. Any errors in these fields would be device issues unrelated to the Connect IQ framework.
  • ok, however, on the emulator (on a fast pc), time differences in compute method, given by info.elapsedTime are always greather than 1 sec, on my pc 1150 msec on average. I have not checked yet on real device. Unfortunately on the emulator i can't simulate varia radar and cars incoming :D
  • Former Member
    Former Member
    Some variance in this event is possible, but the average time should definitely be very close to 1 second. Have you tried checking this against Toybox.System.getTimer() instead of info.elapsedTime?

    Update: I've reproduced this issue on the Connect IQ simulator. There does appear to be an issue on the device simulator causing the compute event to run at a slower rate than intended. This issue does not affect devices. I've created a ticket to investigate the simulator issue.
  • It sounds like you guys are writing an App or data field to show the "Incoming Vehicle". I have been playing with this also, so far getting nowhere useful. I wanted to get the "Incoming" speed and distance. Let me know how you get on.

    Bob