According to the documentation, calling animation_schedule on an animation which is already scheduled should unschedule the animation (calling its appropriate handlers if any), then reschedule the animation.
What actually happens is that the watch reboots. While this could be argued to have unscheduled the animation, I don't think it's quite what was intended.
Calling animation_unschedule followed by animation_schedule appears to behave as intended (though I had plenty of other animation-related crashes I didn't track down; I gave up and used timers instead).
Here is sample program. You can also grab a compiled pbw, but running it will just immediately reboot your watch. The sample code uses the layer property animation for brevity, but user-implemented animations behave the same.
I have the same problem, trying to reschedule an animation when it ends, with a random delay. A call to animation_schedule in my teardown handler make the watch reboot.
According to the documentation, calling
animation_schedule
on an animation which is already scheduled should unschedule the animation (calling its appropriate handlers if any), then reschedule the animation.What actually happens is that the watch reboots. While this could be argued to have unscheduled the animation, I don't think it's quite what was intended.
Calling
animation_unschedule
followed byanimation_schedule
appears to behave as intended (though I had plenty of other animation-related crashes I didn't track down; I gave up and used timers instead).Here is sample program. You can also grab a compiled pbw, but running it will just immediately reboot your watch. The sample code uses the layer property animation for brevity, but user-implemented animations behave the same.