@@ -40,15 +40,15 @@ def pack_rgbw(input: rgbw | rgb) -> int:
4040
4141 # Thermal status callback
4242 def thermal_status_callback (timestamp , data , logconf ):
43- throttle_pct = data ['hprgbw .throttlePct' ]
43+ throttle_pct = data ['colorled .throttlePct' ]
4444 if throttle_pct > 0 :
45- temp = data ['hprgbw .deckTemp' ]
45+ temp = data ['colorled .deckTemp' ]
4646 print (f"WARNING: Thermal throttling active! Temp: { temp } °C, Throttle: { throttle_pct } %" )
4747
4848 # Setup log configuration for thermal monitoring
4949 log_conf = LogConfig (name = 'ThermalStatus' , period_in_ms = 100 )
50- log_conf .add_variable ('hprgbw .deckTemp' , 'uint8_t' )
51- log_conf .add_variable ('hprgbw .throttlePct' , 'uint8_t' )
50+ log_conf .add_variable ('colorled .deckTemp' , 'uint8_t' )
51+ log_conf .add_variable ('colorled .throttlePct' , 'uint8_t' )
5252
5353 cf .log .add_config (log_conf )
5454 log_conf .data_received_cb .add_callback (thermal_status_callback )
@@ -57,7 +57,7 @@ def thermal_status_callback(timestamp, data, logconf):
5757 # Brightness correction: balances luminance across R/G/B/W channels
5858 # Set to 1 (enabled, default) for perceptually uniform colors
5959 # Set to 0 (disabled) for maximum brightness per channel
60- cf .param .set_value ('hprgbw .brightnessCorr' , 1 )
60+ cf .param .set_value ('colorled .brightnessCorr' , 1 )
6161 time .sleep (0.1 )
6262
6363 try :
@@ -76,13 +76,13 @@ def thermal_status_callback(timestamp, data, logconf):
7676 # ========================================
7777
7878 color_uint32 = pack_rgbw (color )
79- cf .param .set_value ('hprgbw .rgbw8888' , color_uint32 )
79+ cf .param .set_value ('colorled .rgbw8888' , color_uint32 )
8080 time .sleep (0.01 )
8181 print (f"Setting LED to R={ color .r } , G={ color .g } , B={ color .b } , W={ color .w } " )
8282 print ('Press Ctrl-C to turn off LED and exit.' )
8383 while True :
8484 time .sleep (0.1 )
8585 except KeyboardInterrupt :
8686 print ('\n Stopping and turning off LED...' )
87- cf .param .set_value ('hprgbw .rgbw8888' , 0 )
87+ cf .param .set_value ('colorled .rgbw8888' , 0 )
8888 time .sleep (0.1 )
0 commit comments