WIP: cleanup a bit, strip binaries
This commit is contained in:
6 files changed
+9
-5
No files matched your search
@@ -9,4 +9,5 @@ rustflags = [
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Tlink.x",
|
||||
"-C", "link-arg=-Tdefmt.x",
|
||||
"-C", "opt-level=z",
|
||||
]
|
||||
@@ -116,3 +116,5 @@ undocumented_unsafe_blocks = "deny"
|
||||
codegen-units = 1
|
||||
lto = "fat"
|
||||
opt-level = 3 # "s"/"z" break Xtensa (l32r literal range exceeded)
|
||||
panic = "abort"
|
||||
strip = true
|
||||
@@ -1,6 +1,7 @@
|
||||
//! OLED display driver with radio status dashboard.
|
||||
|
||||
mod render;
|
||||
#[cfg(feature = "wio_tracker_l1")]
|
||||
pub mod sh1106;
|
||||
mod task;
|
||||
pub use task::display_task;
|
||||
@@ -34,6 +34,7 @@ pub struct BoardInfo<'a> {
|
||||
}
|
||||
|
||||
/// Render the active dashboard (shown when radio is in RX or TX mode).
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn dashboard(
|
||||
target: &mut impl DrawTarget<Color = BinaryColor>,
|
||||
status: &RadioStatus,
|
||||
@@ -289,6 +290,7 @@ fn compact_count(n: u32) -> String<10> {
|
||||
///
|
||||
/// The current (uncommitted) slot is rendered at the rightmost position
|
||||
/// so that incoming packets appear on the graph immediately.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn rssi_sparkline(
|
||||
target: &mut impl DrawTarget<Color = BinaryColor>,
|
||||
history: &[i16; RSSI_HISTORY_LEN],
|
||||
|
||||
@@ -74,7 +74,7 @@ impl<I: I2c> Sh1106<I> {
|
||||
// Set page address and column start (with SH1106 2-column offset).
|
||||
self.cmd(&[
|
||||
0xB0 | page as u8, // page address
|
||||
0x00 | (COL_OFFSET & 0x0F), // column low nibble
|
||||
COL_OFFSET & 0x0F, // column low nibble
|
||||
0x10 | (COL_OFFSET >> 4), // column high nibble
|
||||
])
|
||||
.await?;
|
||||
@@ -91,10 +91,6 @@ impl<I: I2c> Sh1106<I> {
|
||||
self.cmd(&[0x81, value]).await
|
||||
}
|
||||
|
||||
/// Clear the framebuffer (call flush() to update the display).
|
||||
pub fn clear_buffer(&mut self) {
|
||||
self.buffer.fill(0);
|
||||
}
|
||||
}
|
||||
|
||||
impl<I: I2c> DrawTarget for Sh1106<I> {
|
||||
|
||||
@@ -328,6 +328,8 @@ mod tests {
|
||||
cr: 8,
|
||||
sync_word: 0x1234,
|
||||
tx_power_dbm: -9,
|
||||
preamble_len: 16,
|
||||
cad: 1,
|
||||
};
|
||||
let mut buf = [0u8; RADIO_CONFIG_SIZE];
|
||||
cfg.write_to(&mut buf);
|
||||
|
||||
Reference in new issue
Block a user