bitfocus / companion-module-renewedvision-propresenter

Renewed Vision Pro Presenter
MIT License
31 stars 19 forks source link

#120 - Change clock target time to support variables #121

Closed humbled closed 2 years ago

humbled commented 2 years ago

This is to support #120 though I have no idea if this is all that is required sorry

greyshirtguy commented 2 years ago

Thanks for contributing! You also need to emit a variable_parse to return the current value of the variable that was entered. I'm away from my home computer for a few days holiday - I'll check in (and help out if needed) when I get back

humbled commented 2 years ago

Thanks, done. Will this work for both trigger actions and button actions?

humbled commented 2 years ago

@greyshirtguy did you have a chance to take a look at the PR? I'm hoping a quick test and it will sail through with flying colors! :)

greyshirtguy commented 2 years ago

I forgot - I'm sorry. Just looked/tested now...

Have you ran/tested this and seen it work? - because there is a small typo that stops it form working at all....

self.system.emit('variable_parse', String(opt.newClockTime).trim(), function (value) {

should be:

self.system.emit('variable_parse', String(opt.clockTime).trim(), function (value) {

Aside from that, it looks fine and ready to merge when that is fixed.

humbled commented 2 years ago

Guilty here. I have done nothing to setup a build environment. I figured as it was a lightweight change and you'd need to run it up anyway, I could get away with that part (which in my experience can take longer than the code changes). Thanks for your feedback and hopefully it's good to go now!