drawArc on Fenix3

Hi,

If I use the function dc.drawArc in a View which is working in the simulator, I get an exclamation mark when I upload it to my Fenix 3. Is this function not supported in SW version 4.70?

KR,
Christof
  • V4.70

    Well, I just installed the latest SW version 4.90, but this does not help. The View works without drawArc, but with the call of the function, I get the exclamation mark.

    Can anybody help?

    KR,
    Christof
  • I'm fairly certain that drawArc() was added with the 1.2.0 SDK (the docs indicate is was with 1.0.0, but I'm certain that is wrong). Unless you have firmware on your fenix3 that supports the ConnectIQ 1.2.0 SDK, you can expect it to crash your device.

    Travis
  • I should point out that you can avoid the crash by checking that the function exists before calling it...

    if (Gfx.Dc has :drawArc) {
    // draw the arc
    )
  • I'll check the docs and get this updated.
  • Crash of Fenix 3

    Thanks for your help, now I see how to handle this issue.

    I updated the firmware in my Fenix to Softwareversion 4.90 and I am using connectiq-sdk-win-1.2.0. With this setup, drawArc is not working, but my Fenix is not crashing, it's just the exclamation mark given. The rest of the watch works as usual.

    I will try to install the latest firmware (Fenix3 software version 6.08 Beta http://www8.garmin.com/support/download_details.jsp?id=9504) and see it it works.

    In the mean time, I continued with the developpment of the View I would like to publish. But now there is another problem with the behaviour of the Fenix (without using drawArc). In the simulator it works nicely. When I enable the view in my watch, it starts up and is usable, but when I do not touch any key for approx. 2 minutes, the view switches back automatically to the default view.

    Any ideas, how to stay on the view, is there a function to disable the automatic roll-back (like in the screensavers)?

    KR,
    Christof

    P.S: When will it be possible to publish Views from the SDK 1.2?
  • @OE8BCK What Connect IQ app type do you mean when you refer to a 'View'? Some app types have timeouts, such as the Widgets (though the widget timeout is much less than 2 minutes--it's more like 10 to 15 seconds).
  • View Timeout

    Hi,

    I am using
    ---
    using Toybox.Application as App;

    class MyApp extends App.AppBase {

    // onStart() is called on application start up
    function onStart() {
    }

    // onStop() is called when your application is exiting
    function onStop() {
    }

    // Return the initial view of your application here
    function getInitialView() {
    return [ new MyWatchView() , new InputDelegate()];
    }

    }

    class MyWatchView extends Ui.View {
    ...
    }
    ---

    On the watch I can start this View with the Up/Down Button.
  • 2 minute widget timeout on the Fenix

    @OE8BCK What Connect IQ app type do you mean when you refer to a 'View'? Some app types have timeouts, such as the Widgets (though the widget timeout is much less than 2 minutes--it's more like 10 to 15 seconds).

    At the risk of hijacking this thread, I wanted to comment on the widget timeout. I have heard that the timeout is short on the VA, but on my Fenix the widget timeout is exactly 2 minutes. Have to say I would be very unhappy if it were as short as 10 to 15 seconds since this is not long enough to digest information from some widgets I use.

    If this is a timeout of 2 minutes, and the watch is a Fenix then it would sound to me exactly like the widget timeout which cannot be prevented.

    [edit] I noticed that you mention this is on a Fenix, and if you start from the watch screen using the arrow buttons, then this is a widget. Therefore, by design it will timeout after 2 minutes. If you want it to stay there indefinitely, you need to use an app rather than a widget which would be accessed using the start/stop button from the watch screen.
  • gasteropod is correct--if your project type is set to 'Widget' in the project properties, then this timeout is by design. For your app to stay active, you'll need to change the project type to 'Watch App'. Here's how to do it in Eclipse:

    • Right click on the project in the Project Explorer
    • Choose Properties
    • Click on Connect IQ in the left pane of the Properties window
    • Click the pull-down menu under Choose the Project Type
    • Select Watch App
  • Crash of Fenix 3

    Hi!

    Many thanks for the support, it helps a lot!

    So I changed from Widget to App as suggested, now there is no time-out any more. I also added the suggested "if" to drawArc, but as I have updated to the latest Beta, I now see the arc at my watch.

    But - as usual - I got another problem. If I enter the setting menu I added, there is another question mark. It is coming immediately, when I press enter, the mark appears. This time the watch needs reset to be usable again. The code I use is

    ---
    class MyMenuDelegate extends Ui.MenuInputDelegate {
    function onMenuItem(item) {
    Sys.println(item);
    if ( item == :menu_starttime )
    {
    //Sys.println("Settings");
    var np = new Ui.NumberPicker( Ui.NUMBER_PICKER_TIME_MIN_SEC , counter_start*60 );
    Ui.pushView( np, new NPDf(), Ui.SLIDE_IMMEDIATE );

    }
    }
    }

    class NPDf extends Ui.NumberPickerDelegate {
    function onNumberPicked(value) {
    counter_start = value.value();
    }
    }
    ---

    Do you have a hint, what#s wrong with this?

    KR,
    Chr
    istof