Stopwatch-Update #200

Merged
gaisser merged 4 commits from KSat/fsfw:mueller/Stopwatch-Update into master 2020-09-22 14:56:10 +02:00
Owner

There is a bug in the current stopwatch:

Using getClock_timeval can lead to wrong results because the clock can be set to another value in between measurement operations.
Therefore, getUptime has to be used.

I reverted the code back to using getUptime. In the Linux osal, the function which provides higher time accuracy is used now.
I also deleted the dur_seconds_t typedef because seconds can have many formats (full seconds as an integer type, or floating numbers as either float or double)..

I suggest that a Clock API function is written which provides uptime in seconds (rounded maybe?). I also think it would be nice to hook
into the functions to get MS or Seconds ticks so a framework user can use hardware like high precision RTT/RTCs to use an own tick source.
But that will be a separate request..

There is a bug in the current stopwatch: Using getClock_timeval can lead to wrong results because the clock can be set to another value in between measurement operations. Therefore, getUptime has to be used. I reverted the code back to using getUptime. In the Linux osal, the function which provides higher time accuracy is used now. I also deleted the dur_seconds_t typedef because seconds can have many formats (full seconds as an integer type, or floating numbers as either float or double).. I suggest that a Clock API function is written which provides uptime in seconds (rounded maybe?). I also think it would be nice to hook into the functions to get MS or Seconds ticks so a framework user can use hardware like high precision RTT/RTCs to use an own tick source. But that will be a separate request..
muellerr added the
bug
feature
labels 2020-09-18 13:03:01 +02:00
gaisser merged commit da4f6cf447 into master 2020-09-22 14:56:07 +02:00
gaisser deleted branch mueller/Stopwatch-Update 2020-09-22 14:56:11 +02:00
Sign in to join this conversation.
No description provided.