1786018842

This commit is contained in:
2026-08-06 14:20:42 +02:00
parent afbaced27c
commit b47c640ad0
2 changed files with 1 additions and 52 deletions

View File

@@ -17,56 +17,4 @@ fn main() -> Result<(), slint::PlatformError> {
});
ui.run()
// let red = (255, 0, 0, 255);
// let green = (0, 255, 0, 255);
// let blue = (0, 0, 255, 255);
// // /dev/input/event4: silead_ts
// Rectangle::new(Point::new(0, 0), Size::new(trekstor.screen.width(), 1))
// .into_styled(PrimitiveStyle::with_fill(Rgba::from(red)))
// .draw(&mut trekstor.screen)
// .ok();
// Rectangle::new(Point::new(0, 1), Size::new(trekstor.screen.width(), 1))
// .into_styled(PrimitiveStyle::with_fill(Rgba::from(green)))
// .draw(&mut trekstor.screen)
// .ok();
// Rectangle::new(Point::new(0, 2), Size::new(trekstor.screen.width(), 1))
// .into_styled(PrimitiveStyle::with_fill(Rgba::from(blue)))
// .draw(&mut trekstor.screen)
// .ok();
// device.set_nonblocking(true).unwrap();
// loop {
// // println!("dont block");
// for event in events {
// match event.destructure() {
// EventSummary::AbsoluteAxis(_, AbsoluteAxisCode::ABS_X, value) => {
// x = (((value - 13) as f32 / 882.) * (trekstor.width() as f32)) as i32;
// }
// EventSummary::AbsoluteAxis(_, AbsoluteAxisCode::ABS_Y, value) => {
// y = (((value - 13) as f32 / 624.) * (trekstor.height() as f32)) as i32;
// }
// EventSummary::Key(_, KeyCode::BTN_TOUCH, value) => {
// // if value is 1, touch is started
// // if value is 0, touch ended
// println!("touch: {}", value)
// }
// _ => {}
// }
// }
// println!("{}x{}", x, y);
// trekstor.clear(Rgba::from((0, 0, 0, 255))).ok();
// Rectangle::new(Point::new(x - 50, y - 50), Size::new(100, 100))
// .into_styled(PrimitiveStyle::with_fill(Rgba::from(blue)))
// .draw(&mut trekstor)
// .ok();
// }
}