mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-09 03:06:39 +00:00
- genericBuzzer I2S path (BUZZER_I2S): an audio task synthesises the notes with eased edges and keeps the DMA queue fed with silence between sounds; ES8311 setup; amp powered through the board only around sounds - ui-core/SoundControl.h (mode, volume, built-in sounds, melody model), SoundNotifier moved to the Core, chanctl::melody, schema Sound page - L2: notifications, alarm / timer ring, locator sounds, Settings > Sound, melody editor with the playing note lit, per-chat sound, mute icon - noteIndex() on every buzzer backend; scrolling popups past screen height Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
#include <Arduino.h>
|
|
#include "target.h"
|
|
|
|
WioTrackerL2Board board;
|
|
|
|
static SPIClass spi;
|
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
|
|
|
|
WRAPPER_CLASS radio_driver(radio, board);
|
|
|
|
ESP32RTCClock fallback_clock;
|
|
AutoDiscoverRTCClock rtc_clock(fallback_clock);
|
|
MicroNMEALocationProvider gps(Serial1, &rtc_clock);
|
|
EnvironmentSensorManager sensors(gps);
|
|
|
|
#ifdef DISPLAY_CLASS
|
|
DISPLAY_CLASS display;
|
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, true);
|
|
#endif
|
|
|
|
#ifdef BUZZER_I2S
|
|
void buzzerAmpPower(bool on) { board.setSpeakerAmp(on); }
|
|
#endif
|
|
|
|
bool radio_init() {
|
|
MESH_DEBUG_PRINTLN("radio_init: rtc + sx1262 init");
|
|
fallback_clock.begin();
|
|
rtc_clock.begin(Wire); // Wire already running on 47/48 from board.begin()
|
|
|
|
bool ok = radio.std_init(&spi);
|
|
MESH_DEBUG_PRINTLN("radio_init: SX1262 %s", ok ? "OK" : "FAILED");
|
|
return ok;
|
|
}
|
|
|
|
mesh::LocalIdentity radio_new_identity() {
|
|
RadioNoiseListener rng(radio);
|
|
return mesh::LocalIdentity(&rng); // create new random identity
|
|
}
|