At least this is my suspicion.
This creates subtle bugs, because this means that switches from a previous timeline where the given set was not empty remain stored by ADwin, and get actuated.
Assuming that a timeline with both analog and digital switches are uploaded, ADwin stores those switches in separate arrays. Then, if someone uploads a timeline with only digital switches (admittedly, this is a degenerate case, but I did run into this when testing), the analog switches from the previous timeline still linger in those arrays on ADwin, and get actuated.
Instead, initialize_ADwin has to make sure that the array in question on ADwin is empty.
At least this is my suspicion.
This creates subtle bugs, because this means that switches from a previous timeline where the given set was not empty remain stored by ADwin, and get actuated.
Assuming that a timeline with both analog and digital switches are uploaded, ADwin stores those switches in separate arrays. Then, if someone uploads a timeline with only digital switches (admittedly, this is a degenerate case, but I did run into this when testing), the analog switches from the previous timeline still linger in those arrays on ADwin, and get actuated.
Instead,
initialize_ADwinhas to make sure that the array in question on ADwin is empty.