fix: CR encoding bug, display overflow, auto-reconnect script
- Fix CodingRate encoding: postcard uses 0-based variant index, not repr(u8) value. CR 4/5 is variant 0, not 1. - Shorten RSSI/SNR display line to fit 21-char width - Python script auto-detects DongLoRa by USB VID:PID (303a:1001), reconnects on device reset/disconnect, no more crash on RST Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2 files changed
+157
-109
No files matched your search
@@ -120,14 +120,14 @@ pub fn dashboard(
|
||||
.draw(target)
|
||||
.ok();
|
||||
|
||||
// Row 3: RSSI + SNR
|
||||
// Row 3: RSSI + SNR (compact to fit 21 chars)
|
||||
buf.clear();
|
||||
match (status.last_rssi, status.last_snr) {
|
||||
(Some(rssi), Some(snr)) => {
|
||||
let _ = write!(buf, "RSSI:{} dBm SNR:{} dB", rssi, snr);
|
||||
let _ = write!(buf, "{}dBm SNR:{}dB", rssi, snr);
|
||||
}
|
||||
(Some(rssi), None) => {
|
||||
let _ = write!(buf, "RSSI:{} dBm", rssi);
|
||||
let _ = write!(buf, "{}dBm", rssi);
|
||||
}
|
||||
_ => {
|
||||
let _ = write!(buf, "No signal");
|
||||
|
||||
Reference in new issue
Block a user