WIP debugging

This commit is contained in:
Tangent Wantwight 2021-07-04 20:44:58 -04:00
parent 6112d634af
commit bd4de16015
2 changed files with 6 additions and 5 deletions

View file

@ -39,7 +39,7 @@ where
buffer[PORCH_BACK_LEN + i] = white_balance(correct(&pixel), PORCH_WHITE);
}
buffer.iter().render_to(lights);
buffer.iter().take(225).render_to(lights);
}
}

View file

@ -46,10 +46,10 @@ pub fn boot() -> NeopixelLights<
// experimentally, there is some unknown overhead
// but these timings appear to work for me:
const ZERO_HIGH_CYCLES: u32 = 11 - 8;
const ONE_HIGH_CYCLES: u32 = 29 - 8;
const ZERO_LOW_CYCLES: u32 = 29 - 8;
const ONE_LOW_CYCLES: u32 = 11 - 8;
const ZERO_HIGH_CYCLES: u32 = 2;
const ONE_HIGH_CYCLES: u32 = 9;
const ZERO_LOW_CYCLES: u32 = 10;
const ONE_LOW_CYCLES: u32 = 10;
const LATCH_CYCLES: u32 = 15000; // about 300us
pub struct NeopixelLights<T: OutputPin, U: OutputPin, V: OutputPin> {
@ -87,6 +87,7 @@ where
self.write(byte & 0x04 != 0);
self.write(byte & 0x02 != 0);
self.write(byte & 0x01 != 0);
delay(5);
}
/// Blink light, probably to indicate a loop is still running