()
| 6067 | }); |
| 6068 | |
| 6069 | function updateDisplaySettingsVisibility() { |
| 6070 | // Hide all settings panels |
| 6071 | tftSettings.classList.remove("tft-active"); |
| 6072 | oledSettings.classList.remove("oled-active"); |
| 6073 | |
| 6074 | // Show appropriate settings panel |
| 6075 | if (driverMode === "tft") { |
| 6076 | tftSettings.classList.add("tft-active"); |
| 6077 | // Initialize TFT settings |
| 6078 | tftRotation.value = tftSettingsState.rotation; |
| 6079 | tftColorDepth.value = tftSettingsState.colorDepth; |
| 6080 | tftBacklight.value = tftSettingsState.backlight; |
| 6081 | tftTouch.value = tftSettingsState.touch; |
| 6082 | } else if (driverMode === "u8g2") { |
| 6083 | oledSettings.classList.add("oled-active"); |
| 6084 | // Initialize OLED settings |
| 6085 | oledRotation.value = oledSettingsState.rotation; |
| 6086 | oledContrast.value = oledSettingsState.contrast; |
| 6087 | oledContrastValue.textContent = oledSettingsState.contrast; |
| 6088 | oledFlipMode.value = oledSettingsState.flipMode; |
| 6089 | oledFontMode.value = oledSettingsState.fontMode; |
| 6090 | oledPowerSave.value = oledSettingsState.powerSave; |
| 6091 | } |
| 6092 | |
| 6093 | // Update element properties to show correct fill controls |
| 6094 | updatePropsInputs(); |
| 6095 | } |
| 6096 | |
| 6097 | u8g2PresetSelect.addEventListener("change", () => { |
| 6098 | u8g2PresetId = u8g2PresetSelect.value; |
no test coverage detected