Closed dnschneid closed 10 years ago
This looks really good! I haven't done a thorough review, but I like the overall design. The only thing that bothers me is the coding-style (hard-coding the '0' and '1' offsets of 'map_key', 'int' instead of 'bool', ...). However, I haven't worked on that driver for a while and it seems overly didactic to reject it due to those minor issues. Hence, I think I will merge this as-is.
Cleanup patches and further improvements are always welcome, obviously!
A bit of cleanup there, hopefully that improves things somewhat.
OK I think that's it for this round. Once you give the OK and merge it I'll start looking into rotation compensation and whatnot.
I picked this up but dropped the first average-calc patch. It was entirely replaced by the second one.
Thanks a lot for these improvements!
It's not the prettiest code, but I figure I'd alert you to the IR-related improvements I've been making, in case you'd like to incorporate them (probably with parameterization and cleanups):
I do plan to implement proper tilt compensation (probably something like rotate the points around the center so that the lightbar is level, then disambiguate 180 degrees via the accelerometer), but since this is such an improvement over the current behavior I figure I'd volunteer what I have already.