1786115434
This commit is contained in:
@@ -15,10 +15,6 @@ use crate::{ha::HaClient, state::DashboardSnapshot, utils::*};
|
|||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
dotenvy::dotenv().ok();
|
dotenvy::dotenv().ok();
|
||||||
|
|
||||||
for device in evdev::enumerate() {
|
|
||||||
dbg!(device.1.name());
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(feature = "dev"))]
|
#[cfg(not(feature = "dev"))]
|
||||||
slint::platform::set_platform(Box::new(crate::trekstor::Trekstor::new()))
|
slint::platform::set_platform(Box::new(crate::trekstor::Trekstor::new()))
|
||||||
.expect("set platform");
|
.expect("set platform");
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ pub struct InputState {
|
|||||||
|
|
||||||
impl InputState {
|
impl InputState {
|
||||||
pub fn new(screen: &Screen) -> Self {
|
pub fn new(screen: &Screen) -> Self {
|
||||||
let Ok(device) = Device::open("/dev/input/event4") else {
|
let Some((_, device)) = evdev::enumerate()
|
||||||
|
.filter(|(_, device)| device.name() == Some("silead_ts"))
|
||||||
|
.next()
|
||||||
|
else {
|
||||||
panic!("No TS");
|
panic!("No TS");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user