issue #10 #11 fixed didn't power off when issued stop mqtt event.

This commit is contained in:
Paul Kim
2024-04-18 18:10:21 +09:00
parent ed75e5f8fb
commit f679231d2d
3 changed files with 7 additions and 6 deletions

View File

@@ -858,9 +858,10 @@ HotelTV.hcap = (function() {
// STEP#004::> Power Mode
if (_devinfo["instant_power"] !== undefined) {
if (_devinfo["instant_power"] != 0) {
let _instant_pwr_target_mode = 0;
if (_devinfo["instant_power"] != _instant_pwr_target_mode) {
console.log("INSTANT POWER MODE::> off");
__hcapfxn_set_property('instant_power', 0).then(_result => {
__hcapfxn_set_property('instant_power', _instant_pwr_target_mode).then(_result => {
hcap.power.getPowerMode({
"onSuccess": function(s) {
console.log("onSuccess power mode " + s.mode);

View File

@@ -7124,13 +7124,13 @@ HotelTV.ui_appfull = (function() {
$('.error #countdown #message').text(`System will be shutdown in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.PwrOff, 500);
setTimeout(HotelTV.hcap.Reboot, 500);
HotelTV.api.ReportEvent([{'power': false, 'location':null}])
}
});
} else if (_evt == "COMMAND-GUEST-CHECKIN") {
} else if (_evt == "COMMAND-GUEST-CHECKOUT") {
} else if (_evt == "COMMAND-GUEST-CHECKOUT" || _evt == "COMMAND-SYSTEM-STOP") {
let _tmval = 30;
let _state = HotelTV.state;
let _trTbl = HotelTV.translation;

View File

@@ -479,13 +479,13 @@ HotelTV.ui_welcome = (function() {
$('.error #countdown #message').text(`System will be shutdown in ${_tmval} second...`);
},
"cb_eoe": function() {
setTimeout(HotelTV.hcap.PwrOff, 500);
setTimeout(HotelTV.hcap.Reboot, 500);
HotelTV.api.ReportEvent([{'power': false, 'location':null}])
}
});
} else if (_evt == "COMMAND-GUEST-CHECKIN") {
} else if (_evt == "COMMAND-GUEST-CHECKOUT") {
} else if (_evt == "COMMAND-GUEST-CHECKOUT" || _evt == "COMMAND-SYSTEM-STOP") {
let _tmval = 30;
let _state = HotelTV.state;
let _trTbl = HotelTV.translation;