BUG? Using text to speach updates global_variabel
Posted: 05 Jul 2017 06:14
So I have a problem that boggles my mind, and I can't find out why this is happening.
So the first flow,
Get weather,
starts every day at 5:00
Check wifi, if off, turn it on.
Download the weather information
and then set the global variabels.
end
Second flow,
Morning long weather global,
At alarm
store audio
set audio level to 2
speech output
sleep 2
speech output
restore audio
end
Seems simple right? The problem is that at "Morning long weather global" the first speech output says the old value, while the second speech output says the new value (they are a copy). So the speech output is updating the variabel.
If I delete all the global variabels right after start in "Get Weather", the first speech says Null and the second say the right value. It also might only happen if the wifi is off.
So can someone tell me how the Text to speech updates the global variabel?
So the first flow,
Get weather,
starts every day at 5:00
Check wifi, if off, turn it on.
Download the weather information
and then set the global variabels.
end
Second flow,
Morning long weather global,
At alarm
store audio
set audio level to 2
speech output
sleep 2
speech output
restore audio
end
Seems simple right? The problem is that at "Morning long weather global" the first speech output says the old value, while the second speech output says the new value (they are a copy). So the speech output is updating the variabel.
If I delete all the global variabels right after start in "Get Weather", the first speech says Null and the second say the right value. It also might only happen if the wifi is off.
So can someone tell me how the Text to speech updates the global variabel?