rename FSGGloveTrackingSettings::GloveConnectivityCheckInterval to FSGGloveTrackingSettings::DataRetrievalRefreshRate
This commit is contained in:
@@ -32,6 +32,7 @@ This minor release focuses on delivering performance improvements, made possible
|
|||||||
- Bumped the SenseGlove libraries to `v2.303.0-4a2a57376`. This release of the SenseGlove libraries disables RTTI/Exceptions for the most parts and isolates it to a minor portion of the code base, which yields noticable performance gains. Futhermore, some optiomizations are done in the multi-threaded code, such as replacing Spinlocks with Adaptive Mutexes (a hybrid Mutex/Spinlock).
|
- Bumped the SenseGlove libraries to `v2.303.0-4a2a57376`. This release of the SenseGlove libraries disables RTTI/Exceptions for the most parts and isolates it to a minor portion of the code base, which yields noticable performance gains. Futhermore, some optiomizations are done in the multi-threaded code, such as replacing Spinlocks with Adaptive Mutexes (a hybrid Mutex/Spinlock).
|
||||||
- As a result of SenseGlove libraries >= `v2.300.0` changing it's directory structure, the `ThirdParty` folder's directory structure has been revamped.
|
- As a result of SenseGlove libraries >= `v2.300.0` changing it's directory structure, the `ThirdParty` folder's directory structure has been revamped.
|
||||||
- Renamed third-party module `SGSerialThirdPartyLibs` to `SGWjwwoodSerialThirdPartyLibs` since SenseGlove libraries >= `v2.300.0` ships a new static library named `sgserial`. Thus, to avoid confusion and naming conflicts the third-party `serial` static library is now provided by the `SGWjwwoodSerialThirdPartyLibs` module and `sgserial` is provided by the `SGSerialThirdPartyLibs` module.
|
- Renamed third-party module `SGSerialThirdPartyLibs` to `SGWjwwoodSerialThirdPartyLibs` since SenseGlove libraries >= `v2.300.0` ships a new static library named `sgserial`. Thus, to avoid confusion and naming conflicts the third-party `serial` static library is now provided by the `SGWjwwoodSerialThirdPartyLibs` module and `sgserial` is provided by the `SGSerialThirdPartyLibs` module.
|
||||||
|
- `FSGGloveTrackingSettings::GloveConnectivityCheckInterval` settings have been renamed to `FSGGloveTrackingSettings::DataRetrievalRefreshRate` for adoption other than glove connectivity use cases.
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -4,8 +4,8 @@ Provides the tracking settings related to SenseGlove devices.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## GloveConnectivityCheckInterval
|
## DataRetrievalRefreshRate
|
||||||
|
|
||||||
The interval in which the tracking module checks for glove connectivity.
|
The glove data retrieval refresh rate. This affects the interval in which the tracking module checks for glove connectivity and data retrieval.
|
||||||
|
|
||||||
The default is `16.666666f` which means `60` times per second.
|
The default is s `60Hz` (data retrieval operations per second).
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
|
|
||||||
FSGGloveTrackingSettings::FSGGloveTrackingSettings()
|
FSGGloveTrackingSettings::FSGGloveTrackingSettings()
|
||||||
: FSGGloveTrackingSettings{
|
: FSGGloveTrackingSettings{
|
||||||
1000.0f / 60.0f
|
60.0f
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FSGGloveTrackingSettings::FSGGloveTrackingSettings(
|
FSGGloveTrackingSettings::FSGGloveTrackingSettings(
|
||||||
const float InGloveConnectivityCheckInterval)
|
const float InDataRetrievalRefreshRate)
|
||||||
: GloveConnectivityCheckInterval(InGloveConnectivityCheckInterval)
|
: DataRetrievalRefreshRate(InDataRetrievalRefreshRate)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -51,16 +51,17 @@ struct SENSEGLOVESETTINGS_API FSGGloveTrackingSettings
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The interval in which the tracking module checks for glove connectivity (in milliseconds).
|
* The glove data retrieval refresh rate. This affects the interval in which
|
||||||
|
* the tracking module checks for glove connectivity and data retrieval.
|
||||||
*
|
*
|
||||||
* The default is 16.666666f which means 60 times per second.
|
* The default is s 60Hz (data retrieval operations per second).
|
||||||
*/
|
*/
|
||||||
UPROPERTY(Config, EditDefaultsOnly, Category="Glove Tracking")
|
UPROPERTY(Config, EditDefaultsOnly, Category="Glove Tracking")
|
||||||
float GloveConnectivityCheckInterval;
|
float DataRetrievalRefreshRate;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FSGGloveTrackingSettings();
|
FSGGloveTrackingSettings();
|
||||||
|
|
||||||
explicit FSGGloveTrackingSettings(
|
explicit FSGGloveTrackingSettings(
|
||||||
float InGloveConnectivityCheckInterval);
|
float InDataRetrievalRefreshRate);
|
||||||
};
|
};
|
||||||
@@ -58,7 +58,7 @@ struct USGGloveTracker::FImpl
|
|||||||
{
|
{
|
||||||
const USGSettings* Settings{USGSettings::GetInstance()};
|
const USGSettings* Settings{USGSettings::GetInstance()};
|
||||||
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
ensureAlwaysMsgf(Settings, TEXT("The settings subsystem has not been initialized!"));
|
||||||
return Settings->GetTrackingSettings().GloveTrackingSettings.GloveConnectivityCheckInterval * 0.001f;
|
return 1.0f / Settings->GetTrackingSettings().GloveTrackingSettings.DataRetrievalRefreshRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************
|
/************************
|
||||||
@@ -124,24 +124,24 @@ void USGGloveTracker::Initialize(FSubsystemCollectionBase& Collection)
|
|||||||
{
|
{
|
||||||
SGLOG("Starting the glove connectivity check timer...");
|
SGLOG("Starting the glove connectivity check timer...");
|
||||||
|
|
||||||
const float GloveConnectivityCheckInterval = FImpl::GetGloveConnectivityCheckInterval();
|
const float Interval = FImpl::GetGloveConnectivityCheckInterval();
|
||||||
|
|
||||||
FTimerDelegate GloveConnectivityCheckHandler;
|
FTimerDelegate Handler;
|
||||||
GloveConnectivityCheckHandler.BindLambda([= SG_CAPTURE_THIS]()-> void
|
Handler.BindLambda([= SG_CAPTURE_THIS]()-> void
|
||||||
{
|
{
|
||||||
Pimpl->UpdateGloves();
|
Pimpl->UpdateGloves();
|
||||||
});
|
});
|
||||||
|
|
||||||
FTimerManager& TimerManager = World->GetTimerManager();
|
FTimerManager& TimerManager = World->GetTimerManager();
|
||||||
TimerManager.SetTimer(
|
TimerManager.SetTimer(
|
||||||
Pimpl->GloveConnectivityCheckTimer, GloveConnectivityCheckHandler, GloveConnectivityCheckInterval,
|
Pimpl->GloveConnectivityCheckTimer, Handler, Interval,
|
||||||
true, -1.0f);
|
true, -1.0f);
|
||||||
|
|
||||||
if (ensureAlwaysMsgf(TimerManager.IsTimerActive(Pimpl->GloveConnectivityCheckTimer),
|
if (ensureAlwaysMsgf(TimerManager.IsTimerActive(Pimpl->GloveConnectivityCheckTimer),
|
||||||
TEXT("GloveConnectivityCheckTimer is not active")))
|
TEXT("GloveConnectivityCheckTimer is not active")))
|
||||||
{
|
{
|
||||||
SGLOG("The glove connectivity check timer has been started successfully!");
|
SGLOG("The glove connectivity check timer has been started successfully!");
|
||||||
SGLOG("The glove connectivity timer interval is: ", GloveConnectivityCheckInterval);
|
SGLOG("The glove connectivity timer interval is: ", Interval);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user