Add second screen draw to draw_full_frame for better compatibility

This commit is contained in:
Zac Wilson 2025-12-21 13:40:20 +00:00
parent 18d3720566
commit daed5c2093

View file

@ -316,7 +316,10 @@ impl<BusyPin: InputPin, ResetPin: OutputPin, DcPin: OutputPin, Spi: SpiDevice, D
self.wait_for_display(); self.wait_for_display();
} }
pub fn draw_full_frame<PartialWindow: ApplyPartialWindow>(&mut self, double_frame: &mut DoubleFrame<PartialWindow>) { pub fn draw_full_frame<PartialWindow: ApplyPartialWindow>(
&mut self,
double_frame: &mut DoubleFrame<PartialWindow>,
) {
double_frame.partial_window.apply(self); double_frame.partial_window.apply(self);
self.write_command(0x10); self.write_command(0x10);
for byte in double_frame.old.0 { for byte in double_frame.old.0 {
@ -329,6 +332,20 @@ impl<BusyPin: InputPin, ResetPin: OutputPin, DcPin: OutputPin, Spi: SpiDevice, D
self.write_command(0x12); self.write_command(0x12);
double_frame.old.0 = double_frame.new.0; double_frame.old.0 = double_frame.new.0;
// self.delay.delay_ms(1);
self.wait_for_display();
self.write_command(0x10);
for byte in double_frame.new.0 {
self.write_data(byte);
}
self.write_command(0x13);
for byte in double_frame.new.0 {
self.write_data(byte);
}
self.write_command(0x12);
self.delay.delay_ms(1); self.delay.delay_ms(1);
self.wait_for_display(); self.wait_for_display();
} }