mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	Update LedDeviceAPA102.cpp
End frame fixed Former-commit-id: 44107997d92d729f84adee368d12e35f1b5be6f1
This commit is contained in:
		| @@ -20,7 +20,9 @@ LedDeviceAPA102::LedDeviceAPA102(const std::string& outputDevice, const unsigned | |||||||
|  |  | ||||||
| int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues) | int LedDeviceAPA102::write(const std::vector<ColorRgb> &ledValues) | ||||||
| { | { | ||||||
| 	const unsigned int mLedCount = (ledValues.size() * 4) + 8; | 	const unsigned int startFrameSize = 4; | ||||||
|  | 	const unsigned int endFrameSize = (ledValues.size() + 63) / 64 * 4; | ||||||
|  | 	const unsigned int mLedCount = (ledValues.size() * 4) + startFrameSize + endFrameSize; | ||||||
| 	if(_ledBuffer.size() != mLedCount){ | 	if(_ledBuffer.size() != mLedCount){ | ||||||
| 		_ledBuffer.resize(mLedCount, 0x00); | 		_ledBuffer.resize(mLedCount, 0x00); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user