Cpu Cooling Master Register Code Free -
.fan-rpm font-size: 1.6rem; font-weight: 700; font-family: monospace; background: #00000050; padding: 4px 14px; border-radius: 60px; color: #5ee0cf;
.fan-mode display: flex; justify-content: space-between; gap: 14px; margin-top: 18px;
// apply fan speed (update UI and RPM) function setFanSpeed(percent) percent = Math.min(100, Math.max(0, percent)); currentFanPercent = percent; fanSlider.value = percent; let newRPM = computeRPM(percent); currentRPM = newRPM; fanRpmDisplay.innerText = currentRPM + " RPM"; // add log only when significant change (avoid spam, but register cool events) // but we log only if changed by more than 3% or mode switch handled separately
// map fan percent (0-100) to RPM (typical 300 to 2800 RPM) function computeRPM(percent) let minRPM = 400; let maxRPM = 2800; return Math.floor(minRPM + (percent / 100) * (maxRPM - minRPM)); cpu cooling master register code free
// 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 flex: 1; background: #111a2e; border: none; padding: 10px 0; border-radius: 60px; font-weight: 600; color: #aac8e6; cursor: pointer; transition: 0.2s; font-size: 0.85rem;
input[type="range"]::-webkit-slider-thumb -webkit-appearance: none; width: 22px; height: 22px; background: white; border-radius: 50%; border: 2px solid #2dd4bf; cursor: pointer; box-shadow: 0 0 10px cyan; transition: 0.1s; // BUT to respect user, we will NOT override immediately
#logList height: 90px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 6px;
// mode selection handler function setActiveMode(mode) activeMode = mode; modeBtns.forEach(btn => if (btn.getAttribute('data-mode') === mode) btn.classList.add('active'); else btn.classList.remove('active'); ); addLogEntry(`🎛️ cooling profile changed → $mode.toUpperCase() mode`); // immediately apply new fan target based on current temp applySmartFanControl();
.reset-btn background: #1e2a46; padding: 5px 12px; border-radius: 40px; font-size: 0.7rem; color: #b9e2ff; cursor: pointer; // event binding fanSlider
// manual slider override (user intervention) function handleManualFanChange(value) let percent = parseInt(value, 10); setFanSpeed(percent); // deactivate auto-mode? but we keep mode, but user overrides -> we temporarily log addLogEntry(`✋ manual register override · fan set to $percent% ($currentRPM RPM)`); // after manual, we don't change mode highlight, but we can still auto adjust later? // we will keep but next thermal cycle may adjust again if mode active - we keep consistent. // BUT to respect user, we will NOT override immediately. next control cycle will re-apply mode curve. // That's okay: shows dynamic interaction.
// event binding fanSlider.addEventListener('input', (e) => let val = e.target.value; setFanSpeed(val); // if manual move, we temporary override but keep mode active, BUT we don't desync. // We still log manual event each slider drag (avoid too many? but fine) // To prevent log spam, we'll log only if major (debounce) if (Math.random() > 0.7) addLogEntry(`⚙️ manual PWM set → $val%`); );
.mode-btn.active background: #2dd4bf; color: #0a0f1e; box-shadow: 0 0 10px #2dd4bf;
footer font-size: 0.65rem; text-align: center; margin-top: 28px; color: #4b6589; </style> </head> <body>