Split out detection system from ResourceManager into DetectionManager

* Split detection system out into its own class, DetectionManager
    * Clean up ResourceManger's many callbacks into just two, one for detection and one general purpose
This commit is contained in:
Adam Honse
2026-01-08 23:35:50 -06:00
parent c6b74e5926
commit 06d8ae3cf7
221 changed files with 3149 additions and 2776 deletions

View File

@@ -11,7 +11,7 @@
\*---------------------------------------------------------*/
#include <vector>
#include "Detector.h"
#include "DetectionManager.h"
#include "ASRockASRRGBSMBusController.h"
#include "ASRockPolychromeV1SMBusController.h"
#include "ASRockPolychromeV2SMBusController.h"
@@ -131,7 +131,7 @@ void DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
ASRockASRRGBSMBusController* controller = new ASRockASRRGBSMBusController(busses[bus], SMBUS_ADDRESS);
controller-> fw_version = version.u16;
RGBController_ASRockASRRGBSMBus* rgb_controller = new RGBController_ASRockASRRGBSMBus(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
break;
@@ -141,7 +141,7 @@ void DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
ASRockPolychromeV1SMBusController* controller = new ASRockPolychromeV1SMBusController(busses[bus], SMBUS_ADDRESS);
controller-> fw_version = version.u16;
RGBController_ASRockPolychromeV1SMBus* rgb_controller = new RGBController_ASRockPolychromeV1SMBus(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
break;
@@ -151,7 +151,7 @@ void DetectASRockSMBusControllers(std::vector<i2c_smbus_interface*>& busses)
ASRockPolychromeV2SMBusController* controller = new ASRockPolychromeV2SMBusController(busses[bus], SMBUS_ADDRESS);
controller-> fw_version = version.u16;
RGBController_ASRockPolychromeV2SMBus* rgb_controller = new RGBController_ASRockPolychromeV2SMBus(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
break;