.fan-header display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; margin-bottom: 20px;
// extra random event simulation: sometimes synthetic load spike setInterval(() => if (Math.random() < 0.12) let spike = Math.floor(Math.random() * 28) + 12; addLogEntry(`📈 synthetic workload injection +$spike% load (background)`); // we can simulate temp jump through small hack: increase currentTemp manually by small spike currentTemp = Math.min(96, currentTemp + spike * 0.22); currentLoad = Math.min(98, currentLoad + spike*0.3); , 8700);
.mode-btn.active background: #2dd4bf; color: #0a0f1e; box-shadow: 0 0 10px #2dd4bf;
/* MAIN CARD */ .cooler-master-panel max-width: 650px; width: 100%; background: rgba(18, 25, 45, 0.75); backdrop-filter: blur(12px); border-radius: 48px; padding: 24px 28px 36px; box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); border: 1px solid rgba(0, 255, 255, 0.2); transition: all 0.2s ease; cpu cooling master register code free
#logList height: 90px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 6px;
.log-title font-weight: bold; letter-spacing: 1px; margin-bottom: 8px; display: flex; gap: 12px; align-items: center;
/* FAN CONTROL AREA */ .fan-zone background: #02061770; border-radius: 34px; padding: 20px 24px; margin: 16px 0 24px; border: 1px solid #2dd4bf30; .fan-header display: flex
// --- Thermal simulation: temperature depends on load + fan cooling efficiency --- function updateThermalSimulation() // simulate dynamic load (like background processes) workloadCycle = (workloadCycle + 0.6) % 100; let simulatedLoad = 28 + 18 * Math.sin(workloadCycle * 0.12) + (Math.random() * 8); // also add small random walk for realism simulatedLoad = Math.min(95, Math.max(12, simulatedLoad)); currentLoad = Math.floor(simulatedLoad); // Cooling factor based on fan percent (0..1) + base cooling let fanCoolingFactor = (currentFanPercent / 100) * 0.65; // max 65% reduction effect let ambientEffect = 0.25; let rawTemp = 35 + (currentLoad * 0.55); // load impact let afterCooling = rawTemp - (fanCoolingFactor * 18) - ambientEffect; let newTemp = Math.min(98, Math.max(28, afterCooling + (Math.random() * 1.2 - 0.6))); newTemp = parseFloat(newTemp.toFixed(1)); // temperature inertia: smooth transition currentTemp = currentTemp * 0.75 + newTemp * 0.25; currentTemp = Math.round(currentTemp * 10) / 10; // apply thermal throttling warning register event if (currentTemp > 85 && lastTempLog !== 2) addLogEntry(`⚠️ THERMAL ALERT! CPU at $currentTemp°C · cooling power $currentFanPercent%`, true); lastTempLog = 2; else if (currentTemp > 72 && lastTempLog !== 1 && currentTemp <= 85) addLogEntry(`🔆 High thermal load: $currentTemp°C · fan @ $currentFanPercent%`); lastTempLog = 1; else if (currentTemp < 55 && lastTempLog === 2) addLogEntry(`✅ Temperature stabilized at $currentTemp°C`); lastTempLog = 0; else if (currentTemp <= 65 && lastTempLog === 1) lastTempLog = 0; // Update UI with colors if critical cpuTempSpan.innerHTML = `$currentTemp<span>°C</span>`; if (currentTemp > 80) cpuTempSpan.classList.add('temp-critical'); else cpuTempSpan.classList.remove('temp-critical'); thermalLoadSpan.innerHTML = `$Math.floor(currentLoad)<span>%</span>`;
.log-entry border-bottom: 1px solid #2dd4bf20; padding: 4px 0; font-size: 0.7rem;
// MAIN LOOP: every 1.2 seconds update sensors, then apply fan logic function mainThermalLoop() updateThermalSimulation(); // updates currentTemp, currentLoad applySmartFanControl(); // adjusts fan percent based on active mode & temp if (Math.random() <
button background: none; border: none;
<!-- FAN ZONE (Master Control Register) --> <div class="fan-zone"> <div class="fan-header"> <h3>🌀 FAN CONTROLLER · PWM REGISTER</h3> <div class="fan-rpm" id="fanRpmDisplay">1240 RPM</div> </div> <input type="range" id="fanSlider" min="0" max="100" value="45" step="1"> <div class="fan-mode"> <button class="mode-btn" data-mode="silent">❄️ SILENT</button> <button class="mode-btn active" data-mode="balanced">⚖️ BALANCED</button> <button class="mode-btn" data-mode="performance">🔥 PERFORMANCE</button> <button class="mode-btn" data-mode="full">🌀 FULL BLAST</button> </div> </div>
.metric-label font-size: 0.85rem; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; color: #9ab3d0; margin-bottom: 12px;