Initial prototype of settings manager loads JSON settings file and E1.31 detector uses JSON data to detect devices

This commit is contained in:
Adam Honse 2020-11-04 19:44:10 -06:00
parent 5b15251d46
commit 5b68efd09f
6 changed files with 275 additions and 204 deletions

View file

@ -50,6 +50,12 @@ ResourceManager::ResourceManager()
\*-------------------------------------------------------------------------*/
profile_manager = new ProfileManager(rgb_controllers);
rgb_controllers_sizes = profile_manager->LoadProfileToList("sizes.ors");
/*-------------------------------------------------------------------------*\
| Load settings from file |
\*-------------------------------------------------------------------------*/
settings_manager = new SettingsManager();
settings_manager->LoadSettings("OpenRGB.json");
}
ResourceManager::~ResourceManager()
@ -195,6 +201,11 @@ ProfileManager* ResourceManager::GetProfileManager()
return(profile_manager);
}
SettingsManager* ResourceManager::GetSettingsManager()
{
return(settings_manager);
}
unsigned int ResourceManager::GetDetectionPercent()
{
return (detection_percent.load());