Comments (6)
I've noticed this as well and it's a logic processing (timing) issue in Rooms-Sources Controller.usp, specifically the UpdateWatchListen() function and how it populates the sources list arrays. I was able to resolve it by adding Delay(2); after both lines 711 (Watches_Size = Watches_Size + 1;) and 719 (Listens_Size = Listens_Size + 1). So below is what my UpdateWatchListen() looks like.
FUNCTION UpdateWatchListen()
{
INTEGER i, room, source;
room = IdToIndex(Room_Is);
IF(room = 0)
{
RETURN;
}
IF(Room_Sources_Is[room] != "")
{
__Sources__ = Room_Sources_Is[room];
}
ELSE IF(Default_Available_Sources != "")
{
__Sources__ = Default_Available_Sources;
}
ELSE
{
__Sources__ = "";
FOR(i = 1 TO #SOURCES_MAX)
{
IF(Source_Name_Is[i] != "")
{
MAKESTRING(__Sources__, "%s%c", __Sources__, IndexToId(i));
}
}
}
Watches_Size = 0;
Listens_Size = 0;
SETARRAY(__Watch_Source__, 0);
SETARRAY(__Source_Watch__, 0);
SETARRAY(__Listen_Source__, 0);
SETARRAY(__Source_Listen__, 0);
FOR(i = 1 TO LEN(__Sources__))
{
source = BYTE(__Sources__, i);
source = IdToIndex(source);
TRACE("UpdateWatchListen() source: %u", source);
IF(Source_Has_Video[source])
{
Watches_Size = Watches_Size + 1;
Delay(2);
__Watch_Source__[Watches_Size] = source;
__Source_Watch__[source] = Watches_Size;
UpdateWatch(source);
}
ELSE
{
Listens_Size = Listens_Size + 1;
Delay(2);
__Listen_Source__[Listens_Size] = source;
__Source_Listen__[source] = Listens_Size;
UpdateListen(source);
}
}
}
from crescendo-for-crestron.
from crescendo-for-crestron.
I haven't seen any other issues yet but I've only had one job with a 4 series processor. The job doesn't have that much in terms of "Extras", just a lot of Audio/Video. There's about 20 rooms with Video & Audio and then an additional 10 of Audio only so the Watch/Listen list is the main interaction.
Every now and then I'll see an "System_Initialize" issue on the first load of a project (happened with 3 series as well). I have a stepper that sends a "System_Reinitialize" after 5 seconds from initial project upload. That seems to have fixed that issue but definitely a bandaid type fix.
from crescendo-for-crestron.
@Willis1776 Would you check if PROCESSLOGIC()
resolves the issue as well as a DELAY(2)
? I do not have a 4-Series processor available immediately to test against.
My guess is that there is a slight difference in how the 4-Series handles SIMPL+ analog output read backs (cf. the Crestron SIMPL+ Language Reference Guide p 48).
If it does work, PROCESSLOGIC()
is generally preferable to DELAY(/* hsecs */)
because it invokes a task switch with immediate reentry on the next logic wave rather than the posting to the realtime scheduler.
Let me know either way, and we'll get a fix committed. If you prefer to issue a pull request so that you get full credit, please do so.
from crescendo-for-crestron.
Yeah, I can definitely run those tests with PROCESSLOGIC() and let you know. If it works, I can put in a pull request for it.
from crescendo-for-crestron.
Ok, after doing some testing PROCESSLOGIC() doesn't appear to be doing what it was intended to do on a 4 series processor. The Watches_Size + 1 & Listens_Size + 1 does not get processed right away. Adding any kind of logic step after both of those commands will then allow everything to process correctly (even a TRACE() will cause everything to process correctly).
According to the documentation (If I'm reading it correctly) since Watches_Size and Listens_Size are ANALOG_OUTPUTS, the PROCESSLOGIC() should allow them to update and then the rest of the logic should process which it doesn't appear to be doing. Here's my updated function using local variables for the logic as well as updated the 2 ANALOG_OUTPUTS (Watches_Size & Listens_Size).
If there is a better way let me know. I'll submit a pull request with this change.
FUNCTION UpdateWatchListen()
{
INTEGER i, room, source, watch_size, listen_size;
room = IdToIndex(Room_Is);
IF(room = 0)
{
RETURN;
}
IF(Room_Sources_Is[room] != "")
{
__Sources__ = Room_Sources_Is[room];
}
ELSE IF(Default_Available_Sources != "")
{
__Sources__ = Default_Available_Sources;
}
ELSE
{
__Sources__ = "";
FOR(i = 1 TO #SOURCES_MAX)
{
IF(Source_Name_Is[i] != "")
{
MAKESTRING(__Sources__, "%s%c", __Sources__, IndexToId(i));
}
}
}
watch_size = 0;
listen_size = 0;
SETARRAY(__Watch_Source__, 0);
SETARRAY(__Source_Watch__, 0);
SETARRAY(__Listen_Source__, 0);
SETARRAY(__Source_Listen__, 0);
FOR(i = 1 TO LEN(__Sources__))
{
source = BYTE(__Sources__, i);
source = IdToIndex(source);
TRACE("UpdateWatchListen() source: %u", source);
IF(Source_Has_Video[source])
{
watch_size = watch_size + 1;
Watches_Size = watch_size;
__Watch_Source__[watch_size] = source;
__Source_Watch__[source] = watch_size;
UpdateWatch(source);
}
ELSE
{
listen_size = listen_size + 1;
Listens_Size = listen_size;
__Listen_Source__[listen_size] = source;
__Source_Listen__[source] =listen_size;
UpdateListen(source);
}
}
}
from crescendo-for-crestron.
Related Issues (20)
- C2N-AMP-6x100 resources
- Maximum Number of Rooms? HOT 4
- Using a source volume and receiver volume. HOT 2
- Improving the interface or user experience HOT 4
- Fix Keypad Mute Feedback
- Question on Device-Defaults / List-Focus HOT 3
- New TSR and HR remotes? HOT 1
- What join .do you use for DVR F1-F10? HOT 1
- support for touchpanels? HOT 1
- Modular programming architecture? ?
- Add Volume Sliders for shared and local room. HOT 3
- SWAMP module has input 18 missing on SPDIF2
- Improve SWAMP volume control HOT 5
- Code not switching CRCP between CEN-TRACK tuner 1 and 2 HOT 5
- custom buttons on video page? HOT 1
- sound bar question HOT 1
- Multiple Display HOT 1
- HVAC Send to all HOT 2
- Lights individual load control HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crescendo-for-crestron.