Store name in LEDStripController to avoid setting it in detector

This commit is contained in:
Adam Honse 2025-08-11 20:23:07 -05:00
parent a1f144daf2
commit 0eb34eec25
4 changed files with 22 additions and 16 deletions

View file

@ -121,11 +121,10 @@ void DetectLEDStripControllers()
std::string value = dev.port + "," + std::to_string(dev.baud) + "," + std::to_string(dev.num_leds);
LEDStripController* controller = new LEDStripController();
LEDStripController* controller = new LEDStripController(dev.name);
controller->Initialize((char *)value.c_str(), dev.protocol);
RGBController_LEDStrip* rgb_controller = new RGBController_LEDStrip(controller);
rgb_controller->name = dev.name;
ResourceManager::get()->RegisterRGBController(rgb_controller);
}