feat(F-040,F-041,F-042): relay.set_config, output numbering fix, clock batch commands
Enforce 1-based output numbering throughout the entire stack. Stored values, MQTT wire format, and console UI are all 1-based; the single 0-based conversion happens only in OutputManager::getPhysicalOutput(). Fixed createDefaultBellConfig (was setting identity 0-based map instead of 0=disabled), updateBellDurations and updateBellOutputs (support both v2 0/1 and v1 b1/b2 keys), all call sites that bypassed getPhysicalOutput, and fireClockOutput conversion. New commands: - relay.set_config: combined durations + outputs in one round trip (F-040) - clock.set_config: enabled/c1/c2/pulse_duration/pause_duration in one call (F-042) - clock.set_alerts_config: alert type, bells, and silence windows in one call (F-042) Feature catalog updated with F-040, F-041, F-042 detail sections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -693,8 +693,10 @@ void Timekeeper::fireAlertBell(uint8_t bellNumber, int count) {
|
||||
LOG_DEBUG(TAG, "🔔 Alert bell #%d ring %d/%d (duration: %dms)",
|
||||
bellNumber + 1, i + 1, count, bellDuration);
|
||||
|
||||
// Fire the bell using OutputManager
|
||||
_outputManager->fireOutputForDuration(bellNumber, bellDuration);
|
||||
// bellNumber is a 0-based bell index — resolve to chip pin through the single conversion point
|
||||
uint8_t chipPin = _outputManager->getPhysicalOutput(bellNumber);
|
||||
if (chipPin == 255) return; // bell disabled or unconfigured
|
||||
_outputManager->fireOutputForDuration(chipPin, bellDuration);
|
||||
|
||||
// Wait between rings (only if there's more than one ring)
|
||||
if (i < count - 1) {
|
||||
|
||||
Reference in New Issue
Block a user