mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Changed the constructor of LedDeviceW2801 (only incl required parameters)
Changed the call sign of the write functions (included const declaration of color parameter)
This commit is contained in:
@@ -54,7 +54,7 @@ void setColor(char* colorStr)
|
||||
unsigned ledCnt = 50;
|
||||
std::vector<RgbColor> buff(ledCnt, color);
|
||||
|
||||
LedDeviceWs2801 ledDevice("SpiPi", "/dev/spidev0.0", 20000, 40000);
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000);
|
||||
ledDevice.open();
|
||||
ledDevice.write(buff);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ void doCircle()
|
||||
unsigned ledCnt = 50;
|
||||
std::vector<RgbColor> data(ledCnt, RgbColor::BLACK);
|
||||
|
||||
LedDeviceWs2801 ledDevice("SpiPi", "/dev/spidev0.0", 20000, 40000);
|
||||
LedDeviceWs2801 ledDevice("/dev/spidev0.0", 40000);
|
||||
ledDevice.open();
|
||||
|
||||
timespec loopTime;
|
||||
|
Reference in New Issue
Block a user