Random thought: split off "concrete" device impelementations #146
Replies: 6 comments
-
Definitely don't have all of this stuff on my workbench! Most are packed away in boxes, slowly getting more organised.
|
Beta Was this translation helpful? Give feedback.
-
The biggest area of concern that I have is regression testing the various boards that are "supported". Other than refactoring errors (the LCD implementation!), the I2C/SPI devices seem to be fairly stable, I have greater concerns with regression testing across all of the physical boards, definitely need to make it easier to support new SBCs. FYI I suspected I will be distracted by the new Orange Pi 5 that arrived today... |
Beta Was this translation helpful? Give feedback.
-
Yeah, I think generalized categories with the explicit device-type implementations.
I do like how everyone is basically re-implementing stuff in their own ... idioms. 😏 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Ah, threading and statistics/metrics. I've already run into threading issues with the expansion board (too many requests too fast and 💥 - requires hardware reset). My own notion along this line was more of an internal event bus (pub/sub). I think I may have tried to take my own experiments a little too fine-grained (thus the hardware issues), but it does point out the problem with multi-threading and hardware access: at some point, there's going to be contention on either a hardware device or a bus. How/where do you deal with that? And smoothing: is that on the consumer or the producer? That's one of the reasons behind the recent refactor of the stepper motors: the chopper ( Regarding OLED and some "primitive" functions: generic text functions sound good until you realize you have to get into font management, too (name, size, weight, ascent, descent). The library mentioned above looks nice, but J2D does all of that (one could even use something like JFreeChart!). It was kind of a PITA to even create a "generic" gauge! I think some base color profiling (e.g. palette conversion) would be necessary (as in my case, take a color picture and convert to gray-scale). The J2D stuff is pretty easy to use, and removes any burden of trying to maintain some sort of "buffer", when whatever app is using the device can just re-draw their own "canvas" and simply tell the display to show it. |
Beta Was this translation helpful? Give feedback.
-
Just saw something on the Adafruit forum that also complicates things: some sensors require "clock-stretching" on the hardware platform. Now it's really complicated... 😀 |
Beta Was this translation helpful? Give feedback.
-
I was scrolling through the list of devices provided and realized something: there's a lot of stuff in there that I'm likely to never use (or even use again, in the case of my own contributions). Also, it would seem to be a never-ending battle to "try to keep up" and ensure everything keeps working -- I would be amazed if you actually have all of this stuff on your workbench! And then there's all the new stuff - I've added 7 devices just of my own junk, at least two of which I'm also unlikely to actually need 🙄 .
I think if the devices are examined on a functional level, it might be possible to spin off one or more specific "categories" of devices (like the
imu
) and still provide more than enough concrete implementations of "devices" to build off of. I also understand this would be a huge undertaking.Beta Was this translation helpful? Give feedback.
All reactions