elixir-vision / picam

Elixir library used to capture MJPEG video on a Raspberry Pi using the camera module.
Other
122 stars 27 forks source link

Add support for querying the current camera configuration #27

Open GregMefford opened 6 years ago

GregMefford commented 6 years ago

As I was working on my training materials for LoneStar, I really wanted to have a way that I could ask the camera what its current configuration is, so I started my own GenServer to keep track of the config commands it's sending to Picam, but this is the wrong way to go because it'll get inconsistent with crashes, has to know too much about the Picam API, etc.

I think the Picam.Camera is the right place to store the current state, since it's already handling all the messages coming through, and it's already a GenServer.