bitfocus / companion-module-bmd-atem

MIT License
54 stars 32 forks source link

Feature: Incremental camera control values #290

Closed NoahCallaway closed 4 months ago

NoahCallaway commented 5 months ago

Firstly, thanks for the camera control implementation.

I'm looking to increment some of the values rather than define a fixed value e.g. increasing/decreasing the camera gain. I've attempted to use variable expressions as described here but it looks like the module doesn't support that yet?

Screenshot 2024-03-27 at 21 54 34

I'm not sure that using expressions is the ideal solution anyway as it could result in values above or below the allowed range at which point the below error occurs:

warn Instance/Wrapper/atem Error executing action: The value of "value" is out of range. It must be >= -128 and <= 127. Received 130

How would you feel about a separate action (or expanding the existing ones) to increment the values up/down?

I've been experimenting on a fork and initially would look to replicate across:

Fork here: https://github.com/bitfocus/companion-module-bmd-atem/compare/main...NoahCallaway:companion-module-bmd-atem:main

Any feedback, suggestions and ideas are welcome!

vbMizio commented 5 months ago

I'm trying just now to do something simiilar. It seems that value is a stirng, and not a number, so, just as example assume that the value of the variable il "2", the expression ?(atem:camera_1_gain) returns "2" and adding the string "10" set the new value to "210" and not the number 12. Isn't that? In case, is there a way to convert the returned value "2", convert it to the number 2, add avalue and then convert it again to a string to pass as to the method to set a new value?

NoahCallaway commented 5 months ago

I've got it working with a dedicated action now: https://github.com/bitfocus/companion-module-bmd-atem/assets/24882928/cd9dbea8-bd3e-440b-afbd-da0e355b2791

Will raise a PR to implement this and some other actions.

vbMizio commented 5 months ago

I'm looking for a way to increment the IRIS value, but as far as I know, at the moment there is no way to do that. Am I wrong?

NoahCallaway commented 4 months ago

@vbMizio - there is no way to do that at the moment. I've included the functionality in my PR #293. Just waiting for a review/feedback.

vbMizio commented 4 months ago

@NoahCallaway Thank you Noah, we have to wait.

Julusian commented 4 months ago

This will be in the betas shortly

vbMizio commented 4 months ago

Thank you @Julusian

NoahCallaway commented 4 months ago

@vbMizio - I found some issues with the initial implementation which you'll probably hit too. Have resolved them in #297

vbMizio commented 4 months ago

@NoahCallaway Thank you Noah