|
|
cea3eaff97
|
cleanup: Remove all Mamba/STM32/BlackPill references — ESP32-S3 only
- Renamed mamba_protocol.py → balance_protocol.py; updated all importers
- can_bridge_node.py rewritten to use balance_protocol.py API (ESP32-S3 BALANCE)
- test_can_bridge.py rewritten to test actual balance_protocol.py constants/functions
- All STM32/Mamba references in Python, YAML, Markdown, shell scripts replaced:
* Hardware: MAMBA F722S → ESP32-S3 BALANCE/IO
* Device paths: /dev/stm32-bridge → /dev/esp32-io
* Node names: stm32_serial_bridge → esp32_io_serial_bridge
* hardware_id: stm32f722 → esp32s3-balance/esp32s3-io
- C/C++ src/include/lib/test files: added DEPRECATED header comment
- Covers: saltybot_bridge, saltybot_can_bridge, saltybot_can_e2e_test,
saltybot_bringup, saltybot_diagnostics, saltybot_mode_switch, and all
chassis, docs, scripts, and project files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-04-04 08:56:09 -04:00 |
|
|
|
8f51390e43
|
feat: Add piezo buzzer melody driver (Issue #253)
Implements STM32F7 non-blocking driver for piezo buzzer on PA8 using TIM1 PWM.
Plays predefined melodies and custom sequences with melody queue.
Features:
- PA8 TIM1_CH1 PWM output with dynamic frequency control
- Predefined melodies: startup jingle, battery warning, error alert, docking chime
- Non-blocking melody queue with FIFO scheduling (4-slot capacity)
- Custom melody and simple tone APIs
- 15 musical notes (C4-C6) with duration presets
- Rest (silence) notes for composition
- 50% duty cycle for optimal piezo buzzer drive
API Functions:
- buzzer_init(): Configure PA8 PWM and TIM1
- buzzer_play_melody(type): Queue predefined melody
- buzzer_play_custom(notes): Queue custom note sequence
- buzzer_play_tone(freq, duration): Queue simple tone
- buzzer_stop(): Stop playback and clear queue
- buzzer_is_playing(): Query playback status
- buzzer_tick(now_ms): Periodic timing update (10ms recommended)
Test Suite:
- 52 passing unit tests covering:
* Melody structure and termination
* Simple and multi-note playback
* Frequency transitions
* Queue management
* Timing accuracy
* Rest notes in sequences
* Musical frequency ranges
Integration:
- Called at startup and ticked every 10ms in main loop
- Used for startup jingle, battery warnings, error alerts, success feedback
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
2026-03-02 12:51:42 -05:00 |
|