-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Disconnected Zone Bug #528
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #528 +/- ##
===========================================
- Coverage 56.25% 51.52% -4.73%
===========================================
Files 12 23 +11
Lines 2839 5624 +2785
===========================================
+ Hits 1597 2898 +1301
- Misses 1242 2726 +1484
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Looking at this again. I think we need to fix the preamp code to handle a zone source of -1. Also that max() should be applied to all zone's sources I think. |
Here's what we need to do to fix this. Sorry if this is needlessly prescriptive
|
v3
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this file?
amplipi/ctrl.py
Outdated
zones = self.status.zones | ||
if update_source_id or force_update : | ||
zone_sources = [zone.source_id for zone in zones] | ||
zone_sources[idx] = max(sid, 0) # default disconnected zones to source 0 | ||
zone_sources = [utils.clamp(zone.source_id, 3, 0) for zone in zones] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zone_sources = [utils.clamp(zone.source_id, 3, 0) for zone in zones] | |
zone_sources = [utils.clamp(zone.source_id, 0, 3) for zone in zones] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't change functionality, but matches the clamp signature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, you may want to squash your commits after removing that weird file
… preamp from recieving -1
98e8d0c
to
bb2f228
Compare
This likely fixes #527