Skip to content

Commit 179ee31

Browse files
authored
Remove max LED number constraint from Matrix layout (#1805)
1 parent e8e102c commit 179ee31

28 files changed

+231
-76
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Allow to force starting Hyperion in read-only mode (`--readonlyMode`)
2424
- JSON-API: Support to query for a dedicated set of configuration items for a set of instances
2525
- JSON-API: Support to save a dedicated set of configuration items for a set of instances
26+
- JSON-API: Limit update emission frequency: Images (25Hz), raw LED-Colors (40Hz) & LED-Device data (200Hz)
27+
- Effects: Limit the maximum update rate to 200Hz
2628

2729
**JSON-API**
2830
- New subscription support for event updates, i.e. `Suspend, Resume, Idle, idleResume, Restart, Quit`.
@@ -44,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4446
- Refactored: Python to enable parallel effect processing under Python 3.12
4547
- Fixed: Python 3.12 crashes (#1747)
4648
- osX Grabber: Use ScreenCaptureKit under macOS 15 and above
49+
- Removed maximum LED number constraint from Matrix layout schema which was not synced with the UI behaviour (#1804)
4750

4851
**JSON-API**
4952
- Refactored JSON-API to ensure consistent authorization behaviour across sessions and single requests with token authorization.

effects/candle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
sleepTime = float(hyperion.args.get('sleepTime', 0.14))
2222

23+
# Limit update rate
24+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
25+
2326
candles = hyperion.args.get('candles', "all")
2427
ledlist = hyperion.args.get('ledlist', "1")
2528

effects/gif.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
grayscale = bool(hyperion.args.get('grayscale', False))
1212

1313
sleepTime = 1./framesPerSecond
14+
15+
# Limit update rate
16+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
17+
1418
imageFrameList = []
1519

1620
if imageData:

effects/ledtest-seq.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Get parameters
55
sleepTime = float(hyperion.args.get('sleepTime', 0.5))
66

7+
# Limit update rate
8+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
9+
710
def TestRgb( iteration ):
811

912
switcher = {

effects/ledtest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
testleds = hyperion.args.get('testleds', "all")
1212
ledlist = hyperion.args.get('ledlist', "1")
1313

14+
# Limit update rate
15+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
16+
1417
testlist = ()
1518
if (testleds == "list") and (type(ledlist) is str):
1619
for s in ledlist.split(','):

effects/plasma.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
height = hyperion.imageHeight()
77
sleepTime = float(hyperion.args.get('sleepTime', 0.2))
88

9+
# Limit update rate
10+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
11+
912
def mapto(x, in_min, in_max, out_min, out_max):
1013
return float((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min)
1114

effects/running_dots.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
sleepTime = float(hyperion.args.get('speed', 1.5)) * 0.005
55
whiteLevel = int(hyperion.args.get('whiteLevel', 0))
66
lvl = int(hyperion.args.get('colorLevel', 220))
7+
8+
# Limit update rate
9+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
710

8-
# check value
11+
# check value
912
whiteLevel = min( whiteLevel, 254 )
1013
lvl = min( lvl, 255 )
1114

effects/shutdown.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def setPixel(x,y,rgb):
2121

2222
imageData = bytearray(height * width * (0,0,0))
2323

24+
# Limit update rate
25+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
26+
2427
# Start the write data loop
2528
if initialBlink:
2629
for i in range(6):

effects/sparks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
color = list(hyperion.args.get('color', (255,255,255)))
99
randomColor = bool(hyperion.args.get('random-color', False))
1010

11+
# Limit update rate
12+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
13+
1114
# Check parameters
1215
rotationTime = max(0.1, rotationTime)
1316

effects/swirl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ def getPoint(rand = True ,x = 0.5, y = 0.5):
2222
def getSTime(rt, steps = 360):
2323
rt = float(rt)
2424
sleepTime = max(0.1, rt) / steps
25-
25+
26+
# Limit update rate
27+
sleepTime = max(hyperion.lowestUpdateInterval(), sleepTime)
28+
2629
# adapt sleeptime to hardware
2730
minStepTime= float(hyperion.latchTime)/1000.0
2831
if minStepTime == 0: minStepTime = 0.001

0 commit comments

Comments
 (0)