richardanaya / conifer

Apache License 2.0
37 stars 4 forks source link

abstracting out input #11

Closed richardanaya closed 4 years ago

richardanaya commented 4 years ago

@nbrr

richardanaya commented 4 years ago

Input is now cleanly separated :) Config has little idea about hardware now

nbrr commented 4 years ago

Like the steps you took.

Input should probably be a trait and then some EvdevInput should implement it. This way we can later have some HTML5Input implementing Input trait. Module structure could be

- input
  ` evdev_input
  ` html5_input

I feel it would be cleaner to have a match rather than several if let when you're dealing with several possible cases on run_response.

richardanaya commented 4 years ago

I like these ideas!