Slower Battery Charge

This commit is contained in:
2025-11-29 22:26:33 +00:00
parent 49dea88868
commit f09c198f17

View File

@@ -72,8 +72,8 @@
function computeBatteryFromMs(ms: number) { function computeBatteryFromMs(ms: number) {
const dischargeMs = 5 * 3600 * 1000; // 5 hours const dischargeMs = 5 * 3600 * 1000; // 5 hours
const chargeMs = 0.5 * 3600 * 1000; // 30 minutes const chargeMs = 1 * 3600 * 1000; // 1 hour
const cycleMs = dischargeMs + chargeMs; // 5.5 hours const cycleMs = dischargeMs + chargeMs; // 6 hours
// position in cycle using America/New_York wall-clock epoch (DST-aware) // position in cycle using America/New_York wall-clock epoch (DST-aware)
const estMs = zoneEpochFromMs(ms, 'America/New_York'); const estMs = zoneEpochFromMs(ms, 'America/New_York');
let pos = estMs % cycleMs; let pos = estMs % cycleMs;