bitfocus / companion-module-ptzoptics-visca

MIT License
9 stars 13 forks source link

Feature request: Feedback on lens status #21

Closed djslacker closed 5 months ago

djslacker commented 2 years ago

Hello, would it be possible to get some active feedback on the lens settings like what my iris or shutter are currently at?

jswalden commented 5 months ago

The nature of VISCA cameras is that more than one mutator can manipulate them at once. Companion plus a control pad is a fairly normal multiple-mutator situation, so it's not exactly unusual. So you can't model the lens's status module-side without it going stale, seeing as cameras don't broadcast the changes other mutators make. (Let alone changes the camera makes, implicitly.) You can inquire about current state whenever you want, but that's it.

And it's infeasible to constantly poll on the camera inquiring what its state is: you'd be constantly chatting with the camera and potentially overflowing the command buffer or at least delaying processing of commands that actually do stuff. (And every preset might modify lens state, so you can't really track a subset of commands that definitely do change lens state without inquiring.)

You'll be able to at least make lens status inquiries using the low-level support added in #33 and #42, once I figure out how to expose that for users to use in #45. I think that's the most that we can do on this front, so I'll let that issue deal with the request here so I can close it out.