diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..28bfdb18 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/), +and this project adheres to [Semantic Versioning](https://semver.org/). + +## [0.1.0] - Unreleased + +### Added + +- Transparent LoRa radio over USB CDC-ACM (VID `1209`, PID `5741`) +- COBS-framed postcard binary protocol (8 commands, 6 responses) +- Radio configuration: frequency, bandwidth, spreading factor, coding rate, TX power +- Continuous RX mode with RSSI/SNR per packet +- Single-shot TX with optional per-packet config override +- SSD1306 OLED display support with status dashboard + - Radio state, frequency, modulation parameters + - Packet counters (RX/TX) + - RSSI sparkline (1-minute history, TX shown as dotted bars) + - Combined splash/waiting screen on disconnect +- Auto-detect USB host connect/disconnect via DTR +- Config validation against SX1262 hardware limits +- Board support: Heltec V3, Heltec V4, RAK WisBlock 4631 +- Example: MeshCore packet decoder with group channel decryption + +### Technical + +- Embassy async runtime (no threads, CPU sleeps when idle) +- Zero-config: boots and waits for host commands +- Protocol-agnostic: firmware has no opinion about what you transmit +- Tasks never panic: all errors reported to host or logged +- Board abstraction: one `.rs` file + one Cargo feature per board diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..8c077a2c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Contributing to DongLoRa + +## Adding Board Support + +DongLoRa is designed to make adding new boards easy: + +1. Create `src/board/your_board.rs` implementing the `init()` function +2. Add a Cargo feature in `Cargo.toml` with the board's dependencies +3. Add the board's feature/target/chip to the `Justfile` boards list +4. `build.rs` auto-discovers the new file and generates the module selector + +See existing board files (`heltec_v3.rs`, `rak_wisblock_4631.rs`) as templates. +Each board file owns all hardware init and returns peripheral bundles that the +common tasks consume. No shared board code — each board is self-contained. + +## Code Style + +- **Clippy-clean.** `just clippy ` must pass with no warnings. +- **No panics in tasks.** Use `match`/`if let`/`warn!` — never `.unwrap()` in async task code. Board init (runs once at startup) may use `.expect("reason")`. +- **Display rendering uses `.ok()`.** Drawing is best-effort; display errors are not recoverable. +- **Every `let _ =` gets an inline comment** explaining why the result is discarded. + +## Building and Testing + +```sh +just check-all # Compile-check all boards (skips unavailable toolchains) +just build-all # Build release firmware for all boards +just clippy # Lint a specific board +``` + +Xtensa boards (Heltec V3/V4) require the ESP toolchain via `espup`. +ARM boards (RAK 4631) build with stock `rustup`. + +## Commits + +- [Conventional Commits](https://www.conventionalcommits.org/) format +- Logically grouped (one concern per commit) +- We use [jj](https://martinvonz.github.io/jj/) for version control