WIP debugging
This commit is contained in:
parent
6112d634af
commit
bd4de16015
2 changed files with 6 additions and 5 deletions
|
@ -39,7 +39,7 @@ where
|
||||||
buffer[PORCH_BACK_LEN + i] = white_balance(correct(&pixel), PORCH_WHITE);
|
buffer[PORCH_BACK_LEN + i] = white_balance(correct(&pixel), PORCH_WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.iter().render_to(lights);
|
buffer.iter().take(225).render_to(lights);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,10 @@ pub fn boot() -> NeopixelLights<
|
||||||
|
|
||||||
// experimentally, there is some unknown overhead
|
// experimentally, there is some unknown overhead
|
||||||
// but these timings appear to work for me:
|
// but these timings appear to work for me:
|
||||||
const ZERO_HIGH_CYCLES: u32 = 11 - 8;
|
const ZERO_HIGH_CYCLES: u32 = 2;
|
||||||
const ONE_HIGH_CYCLES: u32 = 29 - 8;
|
const ONE_HIGH_CYCLES: u32 = 9;
|
||||||
const ZERO_LOW_CYCLES: u32 = 29 - 8;
|
const ZERO_LOW_CYCLES: u32 = 10;
|
||||||
const ONE_LOW_CYCLES: u32 = 11 - 8;
|
const ONE_LOW_CYCLES: u32 = 10;
|
||||||
const LATCH_CYCLES: u32 = 15000; // about 300us
|
const LATCH_CYCLES: u32 = 15000; // about 300us
|
||||||
|
|
||||||
pub struct NeopixelLights<T: OutputPin, U: OutputPin, V: OutputPin> {
|
pub struct NeopixelLights<T: OutputPin, U: OutputPin, V: OutputPin> {
|
||||||
|
@ -87,6 +87,7 @@ where
|
||||||
self.write(byte & 0x04 != 0);
|
self.write(byte & 0x04 != 0);
|
||||||
self.write(byte & 0x02 != 0);
|
self.write(byte & 0x02 != 0);
|
||||||
self.write(byte & 0x01 != 0);
|
self.write(byte & 0x01 != 0);
|
||||||
|
delay(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Blink light, probably to indicate a loop is still running
|
/// Blink light, probably to indicate a loop is still running
|
||||||
|
|
Loading…
Reference in a new issue