Skip to content

Commit fa82111

Browse files
committed
Use updated Color LED deck parameter names
1 parent d11d9d7 commit fa82111

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
File renamed without changes.

examples/hprgbw/hprgbw_set.py renamed to examples/color_led_deck/color_led_set.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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('\nStopping 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

Comments
 (0)