chore: LICENSE (MIT), Cargo.toml metadata, gitignore firmware, display cleanup

- Add MIT LICENSE file (Stephen Waits <steve@waits.net>)
- Add Cargo.toml: authors, license, description, repository, readme, keywords
- Gitignore /firmware (built binaries don't belong in VCS)
- Display task: use DisplayState::new() for reset, handle watch/brightness errors
This commit is contained in:
swaits committed 2026-03-29 20:42:57 -06:00
1 parent a60c18a8bf
commit 3a03778e47
4 files changed
+41 -9

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
/target /target
/vendor /vendor
/firmware
src/board/mod.rs src/board/mod.rs
__pycache__/ __pycache__/
.hypothesis/ .hypothesis/
+7
View File
@@ -3,6 +3,13 @@ name = "donglora"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
build = "build.rs" build = "build.rs"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
description = "Transparent LoRa radio over USB — plug in a board, talk LoRa from your host"
repository = "https://github.com/swaits/donglora"
readme = "README.md"
keywords = ["lora", "radio", "embedded", "usb", "firmware"]
categories = ["embedded", "hardware-support", "no-std"]
[dependencies] [dependencies]
cfg-if = "1.0" cfg-if = "1.0"
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Stephen Waits <steve@waits.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+12 -9
View File
@@ -89,10 +89,19 @@ pub async fn display_task(
defmt::error!("SSD1306 init failed"); defmt::error!("SSD1306 init failed");
return; return;
} }
let _ = display.set_brightness(ssd1306::prelude::Brightness::BRIGHTEST).await; if display
.set_brightness(ssd1306::prelude::Brightness::BRIGHTEST)
.await
.is_err()
{
defmt::warn!("display brightness set failed");
}
let mut state = DisplayState::new(); let mut state = DisplayState::new();
let mut receiver = status.receiver().unwrap(); let Some(mut receiver) = status.receiver() else {
defmt::error!("no watch receiver available for display");
return;
};
// Show splash/waiting screen (dashboard with no config renders it) // Show splash/waiting screen (dashboard with no config renders it)
render_and_flush(&mut display, &state).await; render_and_flush(&mut display, &state).await;
@@ -139,13 +148,7 @@ pub async fn display_task(
render_and_flush(&mut display, &state).await; render_and_flush(&mut display, &state).await;
} }
DisplayCommand::Reset => { DisplayCommand::Reset => {
state.disconnected = true; state = DisplayState::new();
state.last_status = RadioStatus::default();
state.rssi_history = [NO_SIGNAL; RSSI_HISTORY_LEN];
state.tx_history = [false; RSSI_HISTORY_LEN];
state.rssi_count = 0;
state.current_slot_rssi = NO_SIGNAL;
state.current_slot_tx = false;
render_and_flush(&mut display, &state).await; render_and_flush(&mut display, &state).await;
} }
}, },