diff --git a/Cargo.toml b/Cargo.toml index e80d8f8..69b1c39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,3 +104,4 @@ opt-level = 's' [features] default = [] call-tone = [] +rotate = [] diff --git a/KiCad/subtone.kicad_sch b/KiCad/subtone.kicad_sch index 4654ce1..c03a62d 100644 --- a/KiCad/subtone.kicad_sch +++ b/KiCad/subtone.kicad_sch @@ -1337,7 +1337,7 @@ (property "Reference" "R3" (at 77.47 40.64 0) (effects (font (size 1.27 1.27)) (justify left)) ) - (property "Value" "470R" (at 76.2 43.18 0) + (property "Value" "4.7k" (at 76.2 43.18 0) (effects (font (size 1.27 1.27)) (justify left)) ) (property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder" (at 80.772 43.18 90) @@ -1467,7 +1467,7 @@ (property "Reference" "R2" (at 69.85 40.64 0) (effects (font (size 1.27 1.27)) (justify left)) ) - (property "Value" "470R" (at 68.58 43.18 0) + (property "Value" "4.7k" (at 68.58 43.18 0) (effects (font (size 1.27 1.27)) (justify left)) ) (property "Footprint" "Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder" (at 73.152 43.18 90) diff --git a/Prototype_2.jpg b/Prototype_2.jpg new file mode 100644 index 0000000..cf265a5 --- /dev/null +++ b/Prototype_2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:106d20d76ec54e39e08b376432dab0f0cbadcfeac78d3231b3e421673d27bdaa +size 124760 diff --git a/Prototype_2b.jpg b/Prototype_2b.jpg new file mode 100644 index 0000000..ea8e166 --- /dev/null +++ b/Prototype_2b.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4df27ebb8648e0168da41140e2eedaf194801c9b483622b78c72b2906a86ea0 +size 62681 diff --git a/README.md b/README.md index 499206e..10b69cf 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ Prefer tantalum caps for better switching supression. ![prototype](Prototype.jpg "Prototype attached to 23cm tranciever") +![prototype](Prototype_2.jpg "First prototype PCB (needs a bodge)") +![prototype](Prototype_2b.jpg "First prototype PCB (needs a bodge, backside)") + Waveform Example ---------------- diff --git a/src/main.rs b/src/main.rs index 60ca942..11bfd2e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,6 +38,11 @@ include!(concat!(env!("OUT_DIR"), "/fontmap.rs")); const ADDR_OFFSET: u32 = 2 * 1024 * 1024 - 4096; const FLASH_SIZE: usize = 2 * 1024 * 1024; +#[cfg(not(feature = "rotate"))] +const DISP_ROTATION: DisplayRotation = DisplayRotation::Rotate0; +#[cfg(feature = "rotate")] +const DISP_ROTATION: DisplayRotation = DisplayRotation::Rotate180; + #[cfg(not(feature = "call-tone"))] const SUBTONES: [f32; 51] = [ 67.0, 69.3, 71.9, 74.4, 77.0, 79.7, 82.5, 85.4, 88.5, 91.5, 94.8, 97.4, 100.0, 103.5, 107.2, @@ -250,8 +255,8 @@ async fn core0_task( info!("Set up Display"); let interface = I2CDisplayInterface::new(i2c); - let ref mut display = Ssd1306::new(interface, DisplaySize128x64, DisplayRotation::Rotate180) - .into_buffered_graphics_mode(); + let ref mut display = + Ssd1306::new(interface, DisplaySize128x64, DISP_ROTATION).into_buffered_graphics_mode(); display.init().unwrap(); display.set_brightness(Brightness::DIM).unwrap();