CLOCK_HOURS_SET/CLOCK_MINUTES_SET broken in V1.1.9.0

Version: *1.1.9.0

Frequency: Once/Rarely/Frequently/Consistently

Consistently

Severity: Low/High/Blocker

High

Bug description:

Prior to V1.1.9.0 you could set CLOCK_HOURS_SET and CLOCK _MINUTES_SET programatically ok. V1.1.9.0 seems to have introduced a regression where while you can still set the hours/minutes it immediately is overridden by the time slider setting on the weather widget. Previously this didn’t happen, you could set the time just fine, and weather widget time would pick it up. Now it seems the weather widget will auto override whatever you try to set.
Miscellaneous Events

There are good UX reasons why you might want to provide the user with a convenient time control independent of the weather widget. It’s a great tool, but not having to spend the extra time and process to pull it up when they can just immedately adjust it in front of them is a time and efficiency issue.

Repro steps:

Try changing the time with a simple time slider independently of the weather widger:

    //Time Slider    
    var timeSliderElt = document.querySelector("#lm-time-slider");
    var timeValueHourElt = document.querySelector("#lm-timeHourValue");
    var timeValueMinElt = document.querySelector("#lm-timeMinValue");
    if (timeSliderElt) {

      timeSliderElt.oninput = () => {
        // console.log("LM timeSliderElt oninput " + + timeSliderElt.value);
        this.time = timeSliderElt.value;
        this.hours = Math.floor(this.time / 60);
        this.minutes = this.time % 60;
        timeValueHourElt.innerHTML = this.hours;
        timeValueMinElt.innerHTML = this.minutes;
        // this.newTime = this.fontsize.toString() + "px";
        console.log("LM timeSliderElt oninput this.hours: " + this.hours + " this.minutes: " + this.minutes);
        SimVar.SetSimVarValue("K:CLOCK_HOURS_SET", "hour", Number(this.hours));
        SimVar.SetSimVarValue("K:CLOCK_MINUTES_SET", "hour", Number(this.minutes));
      };
    }

Attachments:

Private attachments: Send a PM to @PrivateContent with the link to this topic and the link to download your content

@FlyingRaccoon @EPellissier
This is still broken in Release V1.2.7.0

@Sonicviz

Apologies for not looking into this earlier - I believe this is more a UI-related issue than an SDK one. I’ll talk to the appropriate people.

Best regards,

Eric / Asobo

Thanks! Look forward to it.

@Sonicviz

Apologies for not getting back to you on this one - the issue was not actually related to UI but the fix is being tested right now.

Best regards,

Eric / Asobo

1 Like

Just in time for xmas! get it…just in time fo…ah, never mind!

Thanks👌

Well unfortunately you won’t get the fix before Christmas (although it depends on which year you were referring to :grimacing:).

Out of curiosity, do you think the ZULU functions that set Hour/Minute work as expected? According to the tests I am running right now to check the fix (it works for CLOCK events), I am a bit surprised by the results. I’ll double check what 2020 did in the same situation.

Best regards,

Eric / Asobo

1 Like

Answering my own question: the ZULU_HOURS/MINUTES_SET events are broken too… I’ll fix at the same time.

Best regards,

Eric / Asobo

Great. As per the code example in the OP, moving the slider should set the local time to what it says. At least, that’s how it worked in 2020 and was working in 2024 until the issue release broke it. If there’s a better way I’m all ears. It’s just a UX convenience that’s faster for users to tweak a couple of key things (time/weather) without doing extra clicks. That does become old if you do it a lot, which you well may do in interleaved training cycles.

I must admit I am not testing the UI issue itself right now - first I am making sure that the events do what they should do (which will soon be OK).
Then I think I have to check the weather widget because it doesn’t seem to update itself on HOURS/MINUTES SET events (although the time is changed in the sim itself).
Finally I’ll check with an in-game panel that uses a similar bit of code to that of the OP.

Best regards,

Eric / Asobo

I can send you my addon to use to test if you want. I left the time slider in, in anticipation it would be fixed soonish. lmk
2024 and 2020 compatible.

I’d be happy to test with your add-on indeed, thanks a lot for this. :slight_smile:

Best regards,

Eric / Asobo

No problemo, sent via dm. Thanks!

1 Like