diff --git a/Release/Configuration/C909_V1/Collect/collect-Grdnewaddemer.dcs b/Release/Configuration/C909_V1/Collect/collect-Grdnewaddemer.dcs new file mode 100644 index 0000000..8976c5e --- /dev/null +++ b/Release/Configuration/C909_V1/Collect/collect-Grdnewaddemer.dcs @@ -0,0 +1,93 @@ +! Add the labels you want to collect in the define below + + +define collect_list "- + l_04_i_gdcomac_frz_l1 - + l_04_i_gdcomac_brake_torq_f8(1_1) - + l_04_i_gdcomac_brake_torq_f8(1_2) - + l_04_i_gdcomac_brake_torq_f8(2_1) - + l_04_i_gdcomac_brake_torq_f8(2_2) - + l_04_i_gdcomac_brake_torq_f8(3_1) - + l_04_i_gdcomac_brake_torq_f8(3_2) - + l_04_i_gdcomac_gear_f8(1) - + l_04_i_gdcomac_gear_f8(2) - + l_04_i_gdcomac_gear_f8(3) - + l_04_i_gdcomac_gsteer_f8(1) - + l_04_i_gdcomac_gsteer_f8(2) - + l_04_i_gdcomac_gsteer_f8(3) - + l_04_i_gdcomac_rcon_ci_f8(1) - + l_04_i_gdcomac_rcon_ci_f8(2) - + l_04_i_gdcomac_rcon_ci_f8(3) - + l_04_i_gdcomac_rcon_ci_f8(4) - + l_04_i_gdcomac_rcon_ci_f8(5) - + l_04_i_gdcomac_rcon_ci_f8(6) - + l_04_i_gdcomac_rcon_ci_f8(7) - + l_04_i_gdcomac_onjax_l1 - + l_04_i_gdcomac_brake_temp_f8(1_1) - + l_04_i_gdcomac_brake_temp_f8(1_2) - + l_04_i_gdcomac_brake_temp_f8(2_1) - + l_04_i_gdcomac_brake_temp_f8(2_2) - + l_04_i_gdcomac_brake_temp_f8(3_1) - + l_04_i_gdcomac_brake_temp_f8(3_2) - + l_04_i_gdcomac_tire_tflat_l1(1_1) - + l_04_i_gdcomac_tire_tflat_l1(1_2) - + l_04_i_gdcomac_tire_tflat_l1(2_1) - + l_04_i_gdcomac_tire_tflat_l1(2_2) - + l_04_i_gdcomac_tire_tflat_l1(3_1) - + l_04_i_gdcomac_tire_tflat_l1(3_2) - + l_04_i_gdcomac_brk_reset_tpres_l1 - + l_04_i_gdcomac_rcon_ci_f8(1) - + l_04_i_gdcomac_rcon_ci_f8(2) - + l_04_i_gdcomac_rcon_ci_f8(3) - + l_04_i_gdcomac_rcon_ci_f8(4) - + l_04_i_gdcomac_rcon_ci_f8(5) - + l_04_i_gdcomac_rcon_ci_f8(6) - + l_04_i_gdcomac_rcon_ci_f8(7) - + l_04_i_gdcomac_gsteer_state_i4 - + l_04_i_gdcomac_resetint_l1 - + l_04_o_gdcomac_frz_l1 - + l_04_o_gdcomac_zcg_to_tire_f8 - + l_04_o_gdcomac_tire_burst_l1(1_1) - + l_04_o_gdcomac_tire_burst_l1(1_2) - + l_04_o_gdcomac_tire_burst_l1(2_1) - + l_04_o_gdcomac_tire_burst_l1(2_2) - + l_04_o_gdcomac_tire_burst_l1(3_1) - + l_04_o_gdcomac_tire_burst_l1(3_2) - + l_04_o_gdcomac_fxb_f8 - + l_04_o_gdcomac_fyb_f8 - + l_04_o_gdcomac_fzb_f8 - + l_04_o_gdcomac_mxb_f8 - + l_04_o_gdcomac_myb_f8 - + l_04_o_gdcomac_mzb_f8 - + l_04_o_gdcomac_sr_f8(1_1) - + l_04_o_gdcomac_sr_f8(1_2) - + l_04_o_gdcomac_sr_f8(2_1) - + l_04_o_gdcomac_sr_f8(2_2) - + l_04_o_gdcomac_sr_f8(3_1) - + l_04_o_gdcomac_sr_f8(3_2) - + l_04_o_gdcomac_sy_f8(1_1) - + l_04_o_gdcomac_sy_f8(1_2) - + l_04_o_gdcomac_sy_f8(2_1) - + l_04_o_gdcomac_sy_f8(2_2) - + l_04_o_gdcomac_sy_f8(3_1) - + l_04_o_gdcomac_sy_f8(3_2) - +" +! +! This will collect for 10 seconds at 60 Hz, you can modify the 10 by any other value you want to increase or decrease the collect time. Ideally, you should keep the 60 to collect every iterationé +! +collect/wait/freeze_flag=ci99_frz_fltchangerequest_l1 - +collect_list - +until (l_04_tctrl_stop_test_l1) - +for 10 at 60 +! +! This will cretae a file called collect_result.bvx in the path that you used to open CTS. You can then open the .bvx file using QGR2. +! +put/extend/all result collect_result +! +! l_04_rcon_ci_f8(8) - +! l_04_rcon_ci_f8(9) - +! l_04_rcon_ci_f8(10) - +! l_04_rcon_ci_f8(11) - +! l_04_rcon_ci_f8(12) - +! l_04_rcon_ci_f8(13) - +! l_04_rcon_ci_f8(14) - diff --git a/Release/XNEngine b/Release/XNEngine index da256f9..d42848e 100755 Binary files a/Release/XNEngine and b/Release/XNEngine differ diff --git a/Release/XNSetIcon.sh b/Release/XNSetEngine.sh similarity index 73% rename from Release/XNSetIcon.sh rename to Release/XNSetEngine.sh index efe43ec..4167466 100755 --- a/Release/XNSetIcon.sh +++ b/Release/XNSetEngine.sh @@ -1,4 +1,5 @@ #!/bin/bash CURRENT_PATH=$(pwd) gio set -t string $CURRENT_PATH/XNEngine "metadata::custom-icon" "file://$CURRENT_PATH/resource/XNEngine.png" +sudo setcap cap_sys_nice+ep $CURRENT_PATH/XNEngine diff --git a/Release/database/XNSim.db b/Release/database/XNSim.db index 086175b..5f9f91b 100644 Binary files a/Release/database/XNSim.db and b/Release/database/XNSim.db differ diff --git a/XNSimPortal/components/data-monitor.js b/XNSimPortal/components/data-monitor.js index 14a01fe..b3a581c 100644 --- a/XNSimPortal/components/data-monitor.js +++ b/XNSimPortal/components/data-monitor.js @@ -2148,7 +2148,6 @@ class DataMonitor extends HTMLElement { const baseInterfaceName = match[1]; const index1 = match[2] ? parseInt(match[2], 10) - 1 : null; const index2 = match[3] ? parseInt(match[3], 10) - 1 : null; - console.log(index1, index2); const interfaceInfo = this.interfaces.find(interfaceItem => interfaceItem.InterfaceName === baseInterfaceName ); diff --git a/XNSimPortal/components/header-tools.js b/XNSimPortal/components/header-tools.js index b4de32f..ba3457e 100644 --- a/XNSimPortal/components/header-tools.js +++ b/XNSimPortal/components/header-tools.js @@ -4,6 +4,7 @@ class HeaderTools extends HTMLElement { this.attachShadow({ mode: 'open' }); this.render(); this.addEventListeners(); + this.startEngineStatusCheck(); } // 添加getter方法 @@ -27,6 +28,48 @@ class HeaderTools extends HTMLElement { return selectedOption ? selectedOption.textContent : ''; } + // 启动引擎状态检查定时器 + startEngineStatusCheck() { + this.checkEngineStatus(); + this.engineStatusInterval = setInterval(() => { + this.checkEngineStatus(); + }, 1000); + } + + // 检查引擎运行状态 + async checkEngineStatus() { + try { + const response = await fetch('/api/engine-status'); + if (response.ok) { + const data = await response.json(); + this.updateEngineStatus(data.running); + } + } catch (error) { + console.error('检查引擎状态失败:', error); + this.updateEngineStatus(false); + } + } + + // 更新引擎状态显示 + updateEngineStatus(isRunning) { + const statusLight = this.shadowRoot.getElementById('engineStatusLight'); + const planeSelect = this.shadowRoot.getElementById('planeSelect'); + const configurationSelect = this.shadowRoot.getElementById('configurationSelect'); + + if (statusLight) { + statusLight.className = `status-light ${isRunning ? 'running' : 'stopped'}`; + statusLight.title = isRunning ? '引擎正在运行' : '引擎已停止'; + } + + // 根据引擎状态控制选择器的可用性 + if (planeSelect) { + planeSelect.disabled = isRunning; + } + if (configurationSelect) { + configurationSelect.disabled = isRunning; + } + } + // 保存选择到localStorage saveSelection() { const selection = { @@ -114,6 +157,12 @@ class HeaderTools extends HTMLElement { cursor: pointer; } + .plane-select:disabled, .configuration-select:disabled { + background-color: #f5f5f5; + cursor: not-allowed; + opacity: 0.6; + } + .search-box { display: flex; align-items: center; @@ -137,6 +186,25 @@ class HeaderTools extends HTMLElement { height: 16px; opacity: 0.5; } + + .status-light { + width: 12px; + height: 12px; + border-radius: 50%; + border: 2px solid #ddd; + transition: all 0.3s ease; + } + + .status-light.running { + background-color: #4CAF50; + border-color: #4CAF50; + box-shadow: 0 0 8px rgba(76, 175, 80, 0.6); + } + + .status-light.stopped { + background-color: #f44336; + border-color: #f44336; + }