|
|
@ -80,10 +80,8 @@ impl<'screen> CirclePadProDemo<'screen> { |
|
|
|
bottom_console: Console<'screen, BottomScreen>, |
|
|
|
bottom_console: Console<'screen, BottomScreen>, |
|
|
|
) -> Self { |
|
|
|
) -> Self { |
|
|
|
// Set up double buffering on top screen
|
|
|
|
// Set up double buffering on top screen
|
|
|
|
top_console.with_screen(|screen| { |
|
|
|
top_console.set_double_buffering(true); |
|
|
|
screen.set_double_buffering(true); |
|
|
|
top_console.swap_buffers(); |
|
|
|
screen.swap_buffers(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Write messages to bottom screen (not double buffered)
|
|
|
|
// Write messages to bottom screen (not double buffered)
|
|
|
|
bottom_console.select(); |
|
|
|
bottom_console.select(); |
|
|
@ -120,10 +118,8 @@ impl<'screen> CirclePadProDemo<'screen> { |
|
|
|
self.top_console.select(); |
|
|
|
self.top_console.select(); |
|
|
|
self.top_console.clear(); |
|
|
|
self.top_console.clear(); |
|
|
|
println!("{:#x?}", self.ir_user.get_status_info()); |
|
|
|
println!("{:#x?}", self.ir_user.get_status_info()); |
|
|
|
self.top_console.with_screen(|screen| { |
|
|
|
self.top_console.flush_buffers(); |
|
|
|
screen.flush_buffers(); |
|
|
|
self.top_console.swap_buffers(); |
|
|
|
screen.swap_buffers(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
self.bottom_console.select(); |
|
|
|
self.bottom_console.select(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -238,10 +234,8 @@ impl<'screen> CirclePadProDemo<'screen> { |
|
|
|
println!("\n{cpp_response:#02x?}"); |
|
|
|
println!("\n{cpp_response:#02x?}"); |
|
|
|
|
|
|
|
|
|
|
|
// Flush output and switch back to bottom screen
|
|
|
|
// Flush output and switch back to bottom screen
|
|
|
|
self.top_console.with_screen(|screen| { |
|
|
|
self.top_console.flush_buffers(); |
|
|
|
screen.flush_buffers(); |
|
|
|
self.top_console.swap_buffers(); |
|
|
|
screen.swap_buffers(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
self.bottom_console.select(); |
|
|
|
self.bottom_console.select(); |
|
|
|
|
|
|
|
|
|
|
|
// Done handling the packets, release them
|
|
|
|
// Done handling the packets, release them
|
|
|
|