ObserveWatch average current and battery life after Calculate.
ExplainDescribe how Calculate uses average current and battery capacity for battery life.
Technical boundaries. Average current weights active current and sleep current by duty cycle. The battery life is battery capacity divided by that average current.
html`<div style="background: var(--bs-light, #f8f9fa); padding: 1rem; border-radius: 8px; border-left: 4px solid #16A085; margin-top: 0.5rem;"><p><strong>Average Current:</strong> ${battery_calc.avg_current.toFixed(3)} mA</p><p><strong>Battery Life:</strong> ${battery_calc.life_hours.toFixed(1)} hours (${battery_calc.life_days.toFixed(1)} days)</p>${battery_calc.life_years>=1?`<p><strong>Or:</strong> ${battery_calc.life_years.toFixed(2)} years</p>`:''}<p style="margin-top:0.5rem; font-size:0.9em; color:#666;">Example: A 2000mAh battery powering a device that draws 50mA when active and 0.05mA when sleeping, with 1% duty cycle (99% sleep time), will last approximately ${battery_calc.life_days.toFixed(0)} days.</p></div>`