Initialize BlinkyTape LED count to zero for consistency with other ARGB controllers
This commit is contained in:
parent
0db567b8bc
commit
18bd9d07b4
4 changed files with 5 additions and 10 deletions
|
|
@ -31,9 +31,8 @@ BlinkyTapeController::~BlinkyTapeController()
|
|||
}
|
||||
}
|
||||
|
||||
void BlinkyTapeController::Initialize(const std::string &portname, int led_count)
|
||||
void BlinkyTapeController::Initialize(const std::string &portname)
|
||||
{
|
||||
num_leds = led_count;
|
||||
port_name = portname;
|
||||
|
||||
serialport = new serial_port();
|
||||
|
|
|
|||
|
|
@ -22,15 +22,13 @@ public:
|
|||
BlinkyTapeController();
|
||||
~BlinkyTapeController();
|
||||
|
||||
void Initialize(const std::string &portname, int led_count);
|
||||
void Initialize(const std::string &portname);
|
||||
|
||||
char* GetLEDString();
|
||||
std::string GetLocation();
|
||||
|
||||
void SetLEDs(std::vector<RGBColor> colors);
|
||||
|
||||
int num_leds;
|
||||
|
||||
private:
|
||||
char led_string[1024];
|
||||
std::string port_name;
|
||||
|
|
|
|||
|
|
@ -25,10 +25,8 @@ void DetectBlinkyTapeControllers(std::vector<RGBController*> &rgb_controllers)
|
|||
|
||||
for(unsigned int device_idx = 0; device_idx < device_locations.size(); device_idx++)
|
||||
{
|
||||
int led_count = 64;
|
||||
|
||||
BlinkyTapeController* controller = new BlinkyTapeController();
|
||||
controller->Initialize(*device_locations[device_idx], led_count);
|
||||
controller->Initialize(*device_locations[device_idx]);
|
||||
|
||||
RGBController_BlinkyTape* rgb_controller = new RGBController_BlinkyTape(controller);
|
||||
rgb_controllers.push_back(rgb_controller);
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ void RGBController_BlinkyTape::SetupZones()
|
|||
zone led_zone;
|
||||
led_zone.name = "LED Strip";
|
||||
led_zone.type = ZONE_TYPE_LINEAR;
|
||||
led_zone.leds_min = 1;
|
||||
led_zone.leds_min = 0;
|
||||
led_zone.leds_max = 512;
|
||||
led_zone.leds_count = 0;
|
||||
led_zone.matrix_map = NULL;
|
||||
zones.push_back(led_zone);
|
||||
|
||||
ResizeZone(0, controller->num_leds);
|
||||
ResizeZone(0, led_zone.leds_count);
|
||||
}
|
||||
|
||||
void RGBController_BlinkyTape::ResizeZone(int zone, int new_size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue