Add controller flags field with flags for controller location and update behavior

This commit is contained in:
Adam Honse 2024-11-11 20:21:32 -06:00
parent 1967ec9526
commit bb79fbfc07
5 changed files with 75 additions and 5 deletions

View file

@ -255,6 +255,12 @@ std::vector<i2c_smbus_interface*> & ResourceManager::GetI2CBusses()
void ResourceManager::RegisterRGBController(RGBController *rgb_controller)
{
/*-------------------------------------------------*\
| Mark this controller as locally owned |
\*-------------------------------------------------*/
rgb_controller->flags &= ~CONTROLLER_FLAG_REMOTE;
rgb_controller->flags |= CONTROLLER_FLAG_LOCAL;
LOG_INFO("[%s] Registering RGB controller", rgb_controller->name.c_str());
rgb_controllers_hw.push_back(rgb_controller);