aod coding and on which devices to add this feature?

Hey, I am looking to add a AOD feature to my watch with only the time, date and battery showing up. I have tried to reach a guide or a post in the forum but found nothing on the internet or in the garmin connect iq. How do I even set this up and can I make this feature for all of the devices?

  • Yes, but it follows the same rules as the AMOLED watches.

  • Big thank you for both of you and !

    I feel like I understood the way it works way better now.

    I followed jim way to create it and now I just need to find a way of how to cause the pixels to change location so if I won't be able to do so I will ask for help here.

    BTW I've seen that in some watches the screen because darker in AOD mode but the pixels stay in place for more than 3 minutes for AMOLED screens (in my Venu 2 i.e.), is it way more difficult to execute than the pixels location change way?

  • Hi, look At the EDIT I put, it is what it does samll Black line which change position make the screen darker and fit aod 

  • I use a custom font of a 1x1 checkerboard, that I shift back and forth every onUpdate so that no pixel is on for more than a minute. With the venu SQ, it seems a bit dim to me, and I have an option to move the time between the top half of the display and half way down.

  • Hey, I didn't know that it was that so thanks! I believe that it is the better way than changing pixels location

    it didn't work for me when I used it so I guess I used that wrong. Thats how I tried to use it:

    if(inLowPower && canBurnIn) {
            dc.setColor(0, 0);var y=clockTime.min%3;
    		for(var i=0;i<dc.getHeight()/2.5;i=i+2){dc.fillRectangle(0,dc.getHeight()/3.0+i+y, dc.getWidth(), 1)
            dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
            if (Application.getApp().getProperty("ShowLeadingZero") == true) {dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, myHr.format("%02d"), Graphics.TEXT_JUSTIFY_RIGHT);}
            if (Application.getApp().getProperty("ShowLeadingZero") == false) {dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, myHr.format("%d"), Graphics.TEXT_JUSTIFY_RIGHT);}
            dc.drawText(dc.getWidth() / 2, dc.getHeight()*0.1082, dateFont, dateString, Graphics.TEXT_JUSTIFY_CENTER);
            if (!System.getDeviceSettings().is24Hour) {dc.drawText(dc.getWidth() *0.8534, dc.getHeight()*0.25962, secFont, myAmPm , Graphics.TEXT_JUSTIFY_LEFT);}
            dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, ":" + Lang.format("$1$", [clockTime.min.format("%02d")]), Graphics.TEXT_JUSTIFY_LEFT);
            }

    For now I am trying to find the problem I made in the way of usage

    UPDATE: I found the errors and caused it to work but there is still burn-in problem. The code is:

    if(inLowPower && canBurnIn) {
            dc.setColor(0, 0);
            var y=clockTime.min%3;
    		for(var i=0;i<dc.getHeight()/2.5;i=i+2){
    		dc.fillRectangle(0,dc.getHeight()/3.0+i+y, dc.getWidth(), 1);}
            dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
            if (Application.getApp().getProperty("ShowLeadingZero") == true) {dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, myHr.format("%02d"), Graphics.TEXT_JUSTIFY_RIGHT);}
            if (Application.getApp().getProperty("ShowLeadingZero") == false) {dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, myHr.format("%d"), Graphics.TEXT_JUSTIFY_RIGHT);}
            dc.drawText(dc.getWidth() / 2, dc.getHeight()*0.1082, dateFont, dateString, Graphics.TEXT_JUSTIFY_CENTER);
            if (!System.getDeviceSettings().is24Hour) {dc.drawText(dc.getWidth() *0.8534, dc.getHeight()*0.25962, secFont, myAmPm , Graphics.TEXT_JUSTIFY_LEFT);}
            dc.drawText(dc.getWidth() / 2.1, dc.getHeight()*0.20433, customFont, ":" + Lang.format("$1$", [clockTime.min.format("%02d")]), Graphics.TEXT_JUSTIFY_LEFT);
            }

    The errors I get are:

    Is there any way to find out if the problem is pixels more than 10% or is the fill rectangle didn't work well in my code?

  • the

    dc.setColor(0, 0);
    var y=clockTime.min%3;

    for(var i=0;i<dc.getHeight()/2.5;i=i+2){
    dc.fillRectangle(0,dc.getHeight()/3.0+i+y, dc.getWidth(), 1);}

    turn "off" the pixel since it draws black line, so you have to draw it after you put your data

  • Oh wow it makes a lot of sense! Really thanks a lot Shent-Aurkhan! It works now

  • using a custom font is more efficient.  Drawing a bunch of lines or rectangles is a bunch of draws, where with a checkerboard font, you can do it with far fewer drawText() calls

  • Hi Jim, I didn't understand what you wrote before but then I've seen the post here https://forums.garmin.com/developer/connect-iq/f/discussion/192673/how-to-enable-an-always-on-mode-for-venu-amoled?pifragment-702=1#1252269 . I will try to follow your instructions here.