Fix wiring between overclock profiles, UI controls, and hardware fan actuation
This commit is contained in:
@@ -408,6 +408,8 @@ function pushOverclockSample(gpu, ram) {
|
||||
ocChart.update('none');
|
||||
}
|
||||
|
||||
let initialOcLoaded = false;
|
||||
|
||||
async function fetchOverclockStatus() {
|
||||
try {
|
||||
const resp = await fetch('/api/overclock');
|
||||
@@ -415,6 +417,14 @@ async function fetchOverclockStatus() {
|
||||
const data = await resp.json();
|
||||
ocProfiles = data.profiles || {};
|
||||
renderOverclockStatus(data);
|
||||
if (!initialOcLoaded && data.active_profile) {
|
||||
initialOcLoaded = true;
|
||||
const editSel = document.getElementById('oc-edit-profile');
|
||||
if (editSel) {
|
||||
editSel.value = data.active_profile;
|
||||
loadOverclockForProfile(data.active_profile);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('Overclock fetch error:', err);
|
||||
}
|
||||
@@ -588,6 +598,11 @@ async function applyOverclock(profile) {
|
||||
if (!resp.ok) {
|
||||
alert(`Apply failed: ${result.detail || 'error'}`);
|
||||
}
|
||||
const editSel = document.getElementById('oc-edit-profile');
|
||||
if (editSel) {
|
||||
editSel.value = profile;
|
||||
loadOverclockForProfile(profile);
|
||||
}
|
||||
await fetchOverclockStatus();
|
||||
} catch (err) {
|
||||
alert(`Error: ${err}`);
|
||||
|
||||
Reference in New Issue
Block a user