mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-10-09 11:16:39 +00:00
fix(wio-tracker-l2): stop the I2S clock between sounds; GPS and TCXO fixes
The speaker's I2S channel was only disabled when idle, which leaves MCLK running. Its fractional divider (160 MHz / 39 1/16 = 4.096 MHz) makes a comb of lines every 256 kHz: one at 869.632 MHz, in the EU narrow mesh channel, lifted the LoRa noise floor from ~-102 to ~-85 dBm, and others land near GPS L1 and BeiDou B1. The channel is now deleted and its pins held low after each sound, and made again for the next one. Measured: noise floor -102 dBm, outdoor first fix 87 s (was 620 s and more). Also: TCXO at 3.0 V (the L2's part, as Meshtastic has it); GLONASS enabled on the L76K after each power-up; begin() on a running receiver no longer resets it (a reset threw away the acquisition in progress). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ void buzzerAmpPower(bool on) { board.setSpeakerAmp(on); }
|
||||
#endif
|
||||
|
||||
void L2GpsProvider::begin() {
|
||||
if (_started && board.gnssPowered() && !_uart_off) return; // already running
|
||||
board.setGnssPower(true); // with the power-up reset
|
||||
if (_uart_off) { // back from stop(): the UART again
|
||||
Serial1.setRxBufferSize(1024);
|
||||
@@ -30,6 +31,20 @@ void L2GpsProvider::begin() {
|
||||
_uart_off = false;
|
||||
}
|
||||
MicroNMEALocationProvider::begin();
|
||||
_started = true;
|
||||
_cfg_pending = true;
|
||||
_cfg_rx = rxChars();
|
||||
}
|
||||
|
||||
// The L76K starts with GPS + BeiDou only; GLONASS as well gives it a third
|
||||
// more satellites. Sent once it has booted (NMEA arriving), again after each
|
||||
// power-up (not saved in the module).
|
||||
void L2GpsProvider::loop() {
|
||||
MicroNMEALocationProvider::loop();
|
||||
if (_cfg_pending && rxChars() - _cfg_rx > 200) {
|
||||
_cfg_pending = false;
|
||||
sendSentence("$PCAS04,7"); // GPS + BeiDou + GLONASS
|
||||
}
|
||||
}
|
||||
|
||||
void L2GpsProvider::stop() {
|
||||
@@ -41,7 +56,9 @@ void L2GpsProvider::stop() {
|
||||
board.setGnssPower(false);
|
||||
}
|
||||
|
||||
void L2GpsProvider::reset() { board.gnssReset(); }
|
||||
// The sensor manager resets right after every begin(); begin() already did
|
||||
// the power-up one, and a second would restart a running receiver.
|
||||
void L2GpsProvider::reset() { }
|
||||
bool L2GpsProvider::isEnabled() { return board.gnssPowered(); }
|
||||
|
||||
bool radio_init() {
|
||||
|
||||
Reference in New Issue
Block a user