mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Update LedDeviceAPA102.cpp
Former-commit-id: 164b396f7d779d01e2fc1df80438ad817a0ac712
This commit is contained in:
		@@ -25,7 +25,11 @@ int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues)
 | 
			
		||||
	const unsigned int endFrameSize = std::max<unsigned int>(((ledValues.size() + 15) / 16), 4);
 | 
			
		||||
	const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize;
 | 
			
		||||
	if(_ledBuffer.size() != mLedCount){
 | 
			
		||||
		_ledBuffer.resize(mLedCount, 0x00);
 | 
			
		||||
		_ledBuffer.resize(mLedCount, 0xFF);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	for (unsigned iLed=0; iLed<startFrameSize; ++iLed) {
 | 
			
		||||
		_ledBuffer[iLed] = 0x00;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for (unsigned iLed=1; iLed<=ledValues.size(); ++iLed) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user