How to use temperature in data field

Hi,

I'm writing a simple data field and I would like to take the current temperature but somehow I can not find this variable. Does anyone know where to look for this variable?


Thank you,
Peter
  • Very interesting :). I wonder what value was there.

    In any case, thanks again for the information.
    Peter


    It happened on a real device, right after an addLap() call in my app, and I suspect that displaying the native lap screen did something funky - the native lap screen is being removed for CIQ apps as it has caused a few weird things...

    BTW, in the case of the Tempe, remember, it can be up to a minute before you get a temp when just starting up, so after you do get a temp, make sure that somewhere (on a timer or at the end of the callback function) you call Ui.requestUpdate() to display it.
  • BTW, in the case of the Tempe, remember, it can be up to a minute before you get a temp when just starting up, so after you do get a temp, make sure that somewhere (on a timer or at the end of the callback function) you call Ui.requestUpdate() to display it.


    So it means that each time after requesUpdate() onUpdate will be called. It sounds good and soon I will see how it works.
  • So it means that each time after requesUpdate() onUpdate will be called. It sounds good and soon I will see how it works.


    I do it on a timer, because you could get the sensor callback for non- Tempe stuff once you enable the callback.

    Yes, Ui.requestUpdate() means that onUpdate() gets called when appropriate...
  • Widget works but I have no idea how to add it to the application's loop "bike". I can add it only to the watch loop.

    Thanks.
  • Widget works but I have no idea how to add it to the application's loop "bike". I can add it only to the watch loop.

    Thanks.


    CIQ widgets can ONLY be accessed from the watchface. It's the basic architecture of Connect IQ and won't change.

    For the Connect IQ User Experience Guild (in the SDK) (page 3 and 4)

    "Widgets provide glanceable and relevant information accessible from the watch face."
  • I've read in Monkey C Programmer's Guide bottom of page 6:
    WIDGETS
    Widgets are full screen pages that can be embedded into the main page loop or the page loop of an activity.


    So how I should understand this?

    Thank you jim_m_58
    for you replay.
  • I've read in Monkey C Programmer's Guide bottom of page 6:


    So how I should understand this?

    Thank you jim_m_58
    for you replay.



    There is no way to access a CIQ widget from within an application. They ONLY CIQ thing that can be accessed in an app is a CIQ data field.

    From within an app, you CAN access native widgets (those built into the firmware). On the vivoactive for example, if while in the "bike" activity, you can press the screen and you are shown the native watchface (no CIQ watchfaces here), and from there you can swipe to things like the music control or the notifications widget, but not any CIQ widjets.

    In the Monkey C manual, they are talking widgets in general, and not CIQ widgets specifically on page 6, is my guess when they talk about the "page loop". Yes, you can add or remove native widgets from that page loop (like "music control" widget) - but NOT CIQ widgets.

    In other words, the "page loop" within an activity only shows native widgets, while the "main page" (watchface) loop shows native and CIQ widgets.
  • This is bad news. Fortunately from activity application we can hold "Down" key to bring watch face and then activate any widget. I hope that this operation doesn't break recording of activity. Unfortunately there is some bug: power sensor is switched off after activating watch face (maybe all sensors are switched off and reconnected for widget but only power sensor has problems). Rest sensors works as expected but I wonder if main application's sensor callback function is still called. Power sensor connection requires special steps:

    I have a bike power metter (4iiii Precision). If at the start of activity "bikes" all the sensors in the bike does not transmit (not working), then there are no problems with connecting to sensors. The first wakes up power sensor and then speed-cadence and all connects immediately. If, then I give up the activity and start it again then power sensor no longer connects.

    The only solution I've found is: without leaving your activity application launch Settings-> sensors -> Power -> Connect. For the first time without succeed, but the second time power sensor connects immediately and works perfect.

    Has anyone watched similar behaviour?


    Unfortunately I did not receive any answer.
  • hi, any news regarding acessing the temperature value from a Datafield?
  • no! after 7 years still the same, Garmin sucks!