check for notifications and don't display if one is active
check for high / low speed out of range popups and only display one, block popping up of multiple notifications for the same event
This commit is contained in:
parent
70d3e0803b
commit
addd0ffa4b
@ -40,16 +40,22 @@ $(function () {
|
||||
self.control.fanSpeed(self.control.minFanSpeed());
|
||||
var options = {
|
||||
text: 'Fan speed increased to meet minimum requirement.',
|
||||
addclass: 'fan_speed_notice_low',
|
||||
}
|
||||
if ($(".fan_speed_notice_low").length <1) {
|
||||
self.showNotify(self, options);
|
||||
}
|
||||
self.showNotify(self, options);
|
||||
}
|
||||
else if (self.control.fanSpeed() > self.control.maxFanSpeed()) {
|
||||
console.log("Fan Speed Control Plugin: " + self.control.fanSpeed() + "% is more than the maximum speed (" + self.control.maxFanSpeed() + "%), decreasing.");
|
||||
self.control.fanSpeed(self.control.maxFanSpeed());
|
||||
var options = {
|
||||
text: 'Fan speed decreased to meet maximum requirement.',
|
||||
addclass: 'fan_speed_notice_high',
|
||||
}
|
||||
if ($(".fan_speed_notice_high").length <1) {
|
||||
self.showNotify(self, options);
|
||||
}
|
||||
self.showNotify(self, options);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user