Support for nb
Hello,
I don't know if this project is still maintained but I was thinking of making a pr adding support for the docs.rs/nb crate. Would that be ok?
It'd also be more correct to use Option<Direction> instead of having a None direction in the enum, which would make the nb code more correct
It's a pretty small crate, I'm not actively doing anything with it but I'm happy to merge stuff if it makes sense. I don't recall nb being very popular when I first wrote this (years ago now)... Do the embedded hal crates use nb? Would you add support behind a feature gate or change the main implementation?
I don't think the Option is necessarily "more correct", just a different way of representing the same thing. It's subjective.
Would you add support behind a feature gate or change the main implementation?
Adding it behind a feature gate was my idea
Just a different way of representing the same thing. It's subjective.
Yes you're indeed right but it doesn't really fit with the non-blocking method as the None variant would never be returned. It's something that could get explained in the documentation though
Ok. Feel free to PR and I will take a look!
On Tue, Dec 6, 2022, 4:57 a.m. Pietro @.***> wrote:
Would you add support behind a feature gate or change the main implementation?
Adding it behind a feature gate was my idea
Just a different way of representing the same thing. It's subjective.
Yes you're indeed right but it doesn't really fit with the non-blocking method as the None variant would never be returned. It's something that could get explained in the documentation though
— Reply to this email directly, view it on GitHub https://github.com/leshow/rotary-encoder-hal/issues/19#issuecomment-1339060316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITO3RPJNDPCSBONXNJYDDWL4EZJANCNFSM6AAAAAASST7XEI . You are receiving this because you commented.Message ID: @.***>