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,17 +40,23 @@ $(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);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//send gcode to set fan speed
|
||||
|
Loading…
Reference in New Issue
Block a user