raiguard / ModernGadgets

Sleek, minimalist, information-dense gadgets for the modern desktop. Inspired by the AddGadgets.com system monitoring gadgets. Built on the Rainmeter platform.
MIT License
300 stars 32 forks source link

Timed Alarms only work if System Uptime or Countdown Timer are enabled #259

Closed PaddlesAU closed 2 years ago

PaddlesAU commented 3 years ago

I've noticed that Alarm1 and Alarm2 alarms don't currently work unless System Uptime, or Countdown Timer, or both, are enabled.

As far as I can tell, it's caused by MeasureLocalTime being disabled unless one of these two options has been selected; because the MeasureAlarm[12]Diff depend on MeasureLocalTime, MeasureLocalTime being disabled means the Diff value isn't recalculated.

The solution seems to be to update MeasureLocalTime in Chronometer.ini to change the Disabled logic. Replace Disabled=(#showSystemUptime# = 0) && (#showEventCountdown# = 0) with Disabled=(#showSystemUptime# = 0) && (#showEventCountdown# = 0) && (#enableAlarm1# = 0) && (#enableAlarm2# = 0)

Making this change locally fixed the problem; alarms sounded as expected.

Alternatively, I'm wondering if changing MeasureAlarm1Diff and MeasureAlarm2Diff to calculate the difference from MeasurePrimaryTime instead of MeasureLocalTime would also address the problem; it's not immediately clear to me why both are needed.

raiguard commented 2 years ago

Fixed in #272