mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 15:28:11 +00:00
Add ringtone editor, buzzer volume, unread fixes and buzzer notification fixes
- RingtoneEditorScreen: 32-note step sequencer accessible via new Tools page on home screen. U/D=pitch, ENTER=octave cycle, L/R=cursor, MENU=options (play, duration, BPM, insert/delete, save). Notes stored packed in NodePrefs and persisted via DataStore. - ToolsScreen: new "Tools" home page entry launching the editor - Buzzer volume: 0-4 bar control in Settings > Sound, persisted to prefs - Buzzer notifications: fixed notify() firing inside wrong serial-guard branch and before addChannelMsg set the channel index - Unread counter: fixed newest-first index direction; watermark formula now correct - OLED brightness: wider range via pre-charge register 0xD9 combined with contrast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,6 +44,10 @@ void genericBuzzer::setVolume(uint8_t level) {
|
||||
if (isPlaying()) applyVolume();
|
||||
}
|
||||
|
||||
void genericBuzzer::stop() {
|
||||
rtttl::stop();
|
||||
}
|
||||
|
||||
void genericBuzzer::loop() {
|
||||
if (!rtttl::done()) {
|
||||
rtttl::play();
|
||||
|
||||
@@ -30,6 +30,7 @@ class genericBuzzer
|
||||
bool isQuiet(); // get buzzer state on/off
|
||||
void setVolume(uint8_t level); // 0=min..4=max
|
||||
uint8_t getVolume() const { return _volume_level; }
|
||||
void stop(); // stop any playing melody
|
||||
|
||||
private:
|
||||
uint8_t _volume_level = 4;
|
||||
|
||||
Reference in New Issue
Block a user