Skip to content

Commit e158ea5

Browse files
committed
Fix string formatting for thermal throttling warnings in LED deck examples
Interestingly this was not caught by pre-commit on Python 3.13
1 parent fa82111 commit e158ea5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/color_led_deck/color_led_cycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def thermal_status_callback(timestamp, data, logconf):
7777
throttle_pct = data['hprgbw.throttlePct']
7878
if throttle_pct > 0:
7979
temp = data['hprgbw.deckTemp']
80-
print(f"WARNING: Thermal throttling active! Temp: {temp}°C, Throttle: {throttle_pct}%")
80+
print(f'WARNING: Thermal throttling active! Temp: {temp}°C, Throttle: {throttle_pct}%')
8181

8282
# Setup log configuration for thermal monitoring
8383
log_conf = LogConfig(name='ThermalStatus', period_in_ms=100)

examples/color_led_deck/color_led_set.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def thermal_status_callback(timestamp, data, logconf):
4343
throttle_pct = data['colorled.throttlePct']
4444
if throttle_pct > 0:
4545
temp = data['colorled.deckTemp']
46-
print(f"WARNING: Thermal throttling active! Temp: {temp}°C, Throttle: {throttle_pct}%")
46+
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)
@@ -78,7 +78,7 @@ def thermal_status_callback(timestamp, data, logconf):
7878
color_uint32 = pack_rgbw(color)
7979
cf.param.set_value('colorled.rgbw8888', color_uint32)
8080
time.sleep(0.01)
81-
print(f"Setting LED to R={color.r}, G={color.g}, B={color.b}, W={color.w}")
81+
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)

0 commit comments

Comments
 (0)