Skip to content
Unverified Commit df1d6c42 authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Several SRT Active Surface improvements (#601)

* Fix #481, implemented the `SRTActiveSurfaceUSDServer::getStatus()` method (#483)

This method returns in a long variable passed by reference, the last known status of the actuator without any call to the actual hardware. This is a measure to prevent occupying the LAN socket in case of tracking. Since during the tracking process the status is updated every time the USD has to move to a different position, I think is safe to assume that the returned status has been read no more than a couple seconds before.

* Fix #484, sped up the SRT Active Surface GUI Client loop (#485)

Also, some global variables that were used for some methods syncrhonization were replaced by some new methods parameters. The old implementation could cause some issues when setting the color of a USD if a user clicks on another USD.

* Fix #487, added a `WorkingThreadTime` parameter to SRT AS Boss (#488)

* Fix #487, added a `WorkingThreadTime` parameter to SRT AS Boss

Also, the working thread has been slightly modified in order to take exactly `WorkingThreadTime` to be executed. The standard ACS implementation sets the thread to sleep for the given time, but the total execution time for each iteration becomes `Tex + Tsl` with `Tsl` equal to `WorkingThreadTime`, and `Tex` the total time of execution of a single `runLoop()` method. With this default implementation the total time for each iteration easily exceeds `WorkingThreadTime`. With the new implementation, `Tex` is taken into account so that `Tsl = WorkingThreadTime - Tex`. In this way the total time for each iteration is indeed `WorkingThreadTime` (with fluctuations due to the CPU clock, of course).

* Fix #487, refined thread sleep strategy

* Fix #493, used ENUM for USD profile checking (#494)

* Fix #493, used ENUM for USD profile checking

* Fixed a small indentation issue

* Fix #493, updated GUI behavior to use the ENUM value instead of plain int

* Fix #487, moved the start time acquisition after the SecureArea lock (#495)

When the SecureArea is not locked by any other thread, locking it requires virtually no time (a few microseconds). So now the locking elapsed time is not taken into account anymore. In this way the total execution time for a single iteration is equal to Tlock + Texecution, with Tlock usually negligible, or greater than a second whenever a new profile is chosen (due to a Wait(1000000) in the other locking thread).

* Fix #486, replaced `SRTActiveSurfaceSectorThread::run()` with `::runLoop()` (#496)

The `run()` method used to loop to activate all USDs internally, in case the component gets released , the loop prevented the thread from stopping causing a timeout in the release procedure.

* Fix #491, SRT AS Boss, moved the `reset` method into `onewayAction` (#498)

Also, some files were rewritten in order to fix some indentation issues and improve readability

* Fix #497, removed references to SRTActiveSurfaceBossWatchingThread (#499)

This kind of thread was not used anymore but was compiled alongside the other classes of the SRTActiveSurfaceBoss. I removed any reference but I kept the original files and commented the unnecessary methods in order to keep track of it for eventual future use.

* Updated CHANGELOG.md with SRT Active Surface improvements

* Fixed some typos in CHANGELOG.md

* Fix #447, the SRT AS GUI has been reworked in order to account for some latency

Now the SRT Active Surface GUI Client asks for the complete status of the active surface, instead of asking a single USD status at a time. This results on fewer calls to the AS Boss component, leaving more CPU time for the Boss' Working Thread (when in tracking mode). This allows us to consider shortening the working thread period (now it's 0.5 seconds) in order to achieve higher precision.
Also, the code of the GUI Client has been significally simplified by reusing the same code for all the actuator buttons (previously each one had its own methods).
parent 3334adf8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment