# battery_params.yaml — Battery management node configuration (Issue #125)

# ── SQLite history ─────────────────────────────────────────────────────────────
db_path: /var/log/saltybot/battery.db
history_retention_days: 7      # delete records older than N days

# ── Battery pack ──────────────────────────────────────────────────────────────
cell_count: 3                  # 3S LiPo (11.1V nominal, 12.6V full)

# ── SoC alert thresholds ──────────────────────────────────────────────────────
warn_pct:       20.0           # WARNING:   reduce speed to warn_speed_factor
critical_pct:   10.0           # CRITICAL:  reduce speed to critical_speed_factor
emergency_pct:   5.0           # EMERGENCY: full stop + disarm

# ── Speed reduction factors (0.0 = stop, 1.0 = no reduction) ─────────────────
warn_speed_factor:      0.6    # 60% of normal speed at WARNING
critical_speed_factor:  0.3    # 30% of normal speed at CRITICAL

# ── Charging detection ────────────────────────────────────────────────────────
# current_ma below this value → charging detected
charge_detect_ma: -100        # -100 mA threshold (small negative allowed for noise)

# ── Publish rate ──────────────────────────────────────────────────────────────
publish_rate_hz: 1.0           # /saltybot/battery publish frequency
