issue #10 #11 Fix hcap.property.InstallerMenuItem.POWER_MANAGE applyied just instant power mode changed. Fix HDMI setting idex by TV model.

This commit is contained in:
paul kim
2024-09-21 02:09:48 +09:00
parent 123c9d794d
commit 411c3b9635
2 changed files with 35 additions and 29 deletions

View File

@@ -993,33 +993,6 @@ HotelTV.hal = (function() {
let _instant_pwr_target_mode = Number(_devconfig.system.misc.instantPower); let _instant_pwr_target_mode = Number(_devconfig.system.misc.instantPower);
if (_devinfo["instant_power"] != _instant_pwr_target_mode) { if (_devinfo["instant_power"] != _instant_pwr_target_mode) {
_pmFxnArProperty.push(__hcapfxn_set_property('instant_power', _instant_pwr_target_mode)); _pmFxnArProperty.push(__hcapfxn_set_property('instant_power', _instant_pwr_target_mode));
// hcap.property.InstallerMenuItem.POWER_MANAGE 설정
if ( _instant_pwr_target_mode==2 ) {
//
hcap.property.setInstallerMenuItem({
"key" : hcap.property.InstallerMenuItem.POWER_MANAGE,
"value" : 8,
"onSuccess" : function() {
console.log("onSuccess");
},
"onFailure" : function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage);
}
});
} else {
// Sets number of hours of no activity before automatic shut off. (0 ~ 7)
hcap.property.setInstallerMenuItem({
"key" : hcap.property.InstallerMenuItem.POWER_MANAGE,
"value" : 0,
"onSuccess" : function() {
console.log("onSuccess");
},
"onFailure" : function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage);
}
});
}
} }
if ( _instant_pwr_target_mode==2 || _instant_pwr_target_mode==1 ){ if ( _instant_pwr_target_mode==2 || _instant_pwr_target_mode==1 ){
@@ -1027,6 +1000,33 @@ HotelTV.hal = (function() {
_pmFxnArProperty.push(__hcapfxn_set_powermode('power_mode', hcap.power.PowerMode.WARM)); _pmFxnArProperty.push(__hcapfxn_set_powermode('power_mode', hcap.power.PowerMode.WARM));
} }
} }
// hcap.property.InstallerMenuItem.POWER_MANAGE 설정
if ( _instant_pwr_target_mode==2 ) {
//
hcap.property.setInstallerMenuItem({
"key" : hcap.property.InstallerMenuItem.POWER_MANAGE,
"value" : 8,
"onSuccess" : function() {
console.log("onSuccess");
},
"onFailure" : function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage);
}
});
} else {
// Sets number of hours of no activity before automatic shut off. (0 ~ 7)
hcap.property.setInstallerMenuItem({
"key" : hcap.property.InstallerMenuItem.POWER_MANAGE,
"value" : 0,
"onSuccess" : function() {
console.log("onSuccess");
},
"onFailure" : function(f) {
console.log("onFailure : errorMessage = " + f.errorMessage);
}
});
}
} }
// STEP#006::> SERVICE RELATED PARAMETERS // STEP#006::> SERVICE RELATED PARAMETERS

View File

@@ -480,6 +480,7 @@ HotelTV.ui_appfull = (function() {
*/ */
function __uifxn_AppFull_OnHdmiConChangeEvt(_evt) { function __uifxn_AppFull_OnHdmiConChangeEvt(_evt) {
let _state = HotelTV.state; let _state = HotelTV.state;
let _devinfo = HotelTV.devinfo;
let _trTbl = HotelTV.translation; let _trTbl = HotelTV.translation;
// {Number} param.index - index of the HDMI which was connected or disconnected. // {Number} param.index - index of the HDMI which was connected or disconnected.
// {Boolean} param.connected - true if the HDMI is connected, else false. // {Boolean} param.connected - true if the HDMI is connected, else false.
@@ -501,10 +502,15 @@ HotelTV.ui_appfull = (function() {
_state.menu.stage.prev = _state.menu.stage.cur; _state.menu.stage.prev = _state.menu.stage.cur;
_state.menu.stage.cur = "external_av_hdmi"; _state.menu.stage.cur = "external_av_hdmi";
_state.external_input.connected = true; _state.external_input.connected = true;
_state.external_input.last_input.index = Number(_evt.index); // NOTE: US741H0ND모델에서 HDMI셋팅 인덱스는 0부터, 이 부분은 LG에 문의 필요
if (_devinfo.model_name.includes("US761H0ND")) {
_state.external_input.last_input.index = Number(_evt.index);
} else {
_state.external_input.last_input.index = Number(_evt.index)-1;
}
setTimeout(function(){ setTimeout(function(){
$('body,html').fadeOut(500, function(){ $('body,html').fadeOut(500, function(){
let __retSuccess = HotelTV.hal.SetExternalInput("HDMI", Number(_evt.index)); let __retSuccess = HotelTV.hal.SetExternalInput("HDMI", _state.external_input.last_input.index);
if ( __retSuccess==false ){ if ( __retSuccess==false ){
_state.external_input.connected = false; _state.external_input.connected = false;
_state.external_input.last_input.index = 0; _state.external_input.last_input.index = 0;