Closed veryprofessionaldodo closed 3 years ago
Woof, Woof!
Thank you for submitting the "Calling config() now cascades options to configurators" pull request 😎.
Please do not forget to review our internal guidelines:
Engaging in the development process in the best possible way helps it being efficient and fast.
Your friend, Tobias (Platforme's mascot)
@veryprofessionaldodo how is ConfiguratorPrc
able to handle this scenario?
If it is regarding changing the model itself, if I understand the code correctly, the brand and model are passed as mandatory parameters to the config
function, with only the options
parameter being optional. The update
function that is called (that the configurators also use), has explicit parameters that do not take into account any extra information that may be passed through the config
.
duration
is not part of the RIPE API
When the specified functions are called, they call an
update
, with a specified reason. However, the options which were passed for the functions are not passed on in the update, so a configurator has no way of reading extra information, such as the duration of any event, for example. This caused problems when attempting to use CSR as an alternative for PRC to create static images. When changing a configuration, a crossfade event is triggered, in which the CSR seamlessly transitions from one state to the next. For the use case of the issue, we needed the crossfade to be instantaneous, so as to generate a valid frame as soon as possible. Since the functions did not cascade the options, there was no way to explicitly tell the duration (despite the CSR being able to handle the parameter correctly).This PR enables this feature, so that we can explicitly call options with duration, which are passed onto the configurator to better deal with this specific issue.