Yes.
I haven't looked through the code yet, but I guess that some event no
longer occurs because of a wrapping timer / timer overflow and as a
consequence, the watchdog resets the device.
Just as an illustration:
such *buggy* code could look like this:
Code:
--------------------
...
static uint32_t timestamp_of_next_event = 0;
...
if ( getCurrentTimerValue() >= timestamp_of_next_event )
{
...trigger_some_event...;
timestamp_of_next_event += 1000;
}
--------------------
note that in this code, the event will no longer be triggered when the
uint32 timer value wraps from 0xffffffff to 0x0.
one simple way to fix such code would be:
Code:
--------------------
...
static uint32_t timestamp_of_next_event = 0;
...
if ( (int32_t)( getCurrentTimerValue() - timestamp_of_next_event ) >= 0 )
{
...trigger_some_event...;
timestamp_of_next_event += 1000;
}
--------------------
note the important explicit type cast to (signed) int32_t type in order
to cast the unsigned difference of the -timer value- and
-timestamp_of_next_event- to its signed value before checking whether
the result is positive.
(I'm sorry for writing the example code in C. I am neither able to code
in Perl nor in Lua.)
1x Squeezebox Classic,
3x Squeezebox Radio,
1x Squeezebox Touch,
Squeezebox Server 7.9.1 running on ODROID-U3, Ubuntu 16.04
(Perl-Version: 5.22.1 - arm-linux-gnueabihf-thread-multi-64int,
DBD::SQLite 1.34_01 (sqlite 3.7.7.1))
------------------------------------------------------------------------
Steevee28's Profile: http://forums.slimdevices.com/member.php?userid=36395
View this thread: http://forums.slimdevices.com/showthread.php?t=111650
_______________________________________________
Radio mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/radio