feat: Add RGBW LED support and hardware communication protocol

- Add RGBW LED type support alongside existing RGB LEDs
- Implement 4-channel RGBW data transmission (R,G,B,W bytes)
- Add RGBW visual preview with half-color, half-white gradient display
- Fix RGB color calibration bug in publisher (was not being applied)
- Create comprehensive hardware communication protocol documentation
- Support mixed RGB/RGBW LED strips on same display
- Add W channel color temperature adjustment in white balance page
- Hardware acts as simple UDP-to-WS2812 bridge without type distinction
This commit is contained in:
2025-07-05 02:46:31 +08:00
parent 5de105960b
commit 99cbaf3b9f
10 changed files with 392 additions and 20 deletions

View File

@ -1,5 +1,10 @@
import { Borders } from '../constants/border';
export enum LedType {
RGB = 'RGB',
RGBW = 'RGBW',
}
export type LedStripPixelMapper = {
start: number;
end: number;
@ -10,6 +15,7 @@ export class ColorCalibration {
r: number = 1;
g: number = 1;
b: number = 1;
w: number = 1;
}
export type LedStripConfigContainer = {
@ -23,5 +29,6 @@ export class LedStripConfig {
public readonly display_id: number,
public readonly border: Borders,
public len: number,
public led_type: LedType = LedType.RGB,
) {}
}