Keyboard Shortcuts
Likes
- Crestron
- Messages
Search
Re: 0-based vs 1-based between C# and Simpl+
¿ªÔÆÌåÓýDepending on what you¡¯re talking about (particularly in terms of memory footprint or use in other contexts) frequently the sanest way is to just throw away index 0 and treat everything as 1-based. ? Alternatively you can apply a +1 offset going to SIMPL and a -1 going from SIMPL ¨C best to make sure you only offset in one place (e.g. do all of the offsetting on the SIMPL+ side or SIMPL# side and arguably better to do it on the SIMPL+ side since it¡¯s working around the S+ limitation and not necessarially useful if you wanted to reuse the S# elsewhere. ? -- Lincoln King-Cliby Commercial Market Director ? ? ? From: [email protected] <[email protected]> On Behalf Of
Brad Wykoff via groups.io
Sent: Thursday, March 2, 2023 3:54 PM To: [email protected] Subject: [crestron] 0-based vs 1-based between C# and Simpl+ ? What methods are commonly used to convert C# array from 0-based to 1-based so that indexing is correct in Simpl+. This is populating but all the feedback for each players move is off by one index.? function updatePlayerChange(integer index, integer feedback) { ? ? GameBlock_Fb[index] = feedback; } ? |
0-based vs 1-based between C# and Simpl+
What methods are commonly used to convert C# array from 0-based to 1-based so that indexing is correct in Simpl+. This is populating but all the feedback for each players move is off by one index.?
C# ?RootButtons[] _buttons = new RootButtons[16]; //array of my player grid Simpl+ function updatePlayerChange(integer index, integer feedback)
{
? ? GameBlock_Fb[index] = feedback;
}
? |
Re: SImpl+ Windows 10 Compile Errors
#simplwindows
After getting a new programming laptop, I noticed that the default user database locations for IR and modules was relocated to the "Public Documents" folder.
I'm assuming that this is due to all of the new "security" implementations in Windows 11 (FIPS/UAC). I'd bet that if you relocated your UserDB, Usrmacro, and Usrsplus libraries to the public or your local user documents folder, then everything would work fine after changing the directory locations in Simpl, etc. Good luck, Brian |
Re: SImpl+ Windows 10 Compile Errors
#simplwindows
I ended up having to re-import all my modules after I turned off FIPS and UAC and that seems to have fixed it.? I re-imported the ones that failed prior to turning off FIPS/UAC and that didn't work.? I'm assuming (dangerous thing to do) that something in the company pushed windows update was blocking the access to the files?? Not sure on that though.
|
Samsung Hospitality Display
Hi all,
Need to program a current model samsung hospitality display remotely.? Its a HG65 something something.? Does anyone know if these use the standard MDC protocol?? I only need Power on/off, channel up/down, volume up/down.? Also input HDMI1 and DTV (built in digital tuner).? Ive used the screens before but only ever controlled them through Tripleplay or Exterity.?? Really hoping the API is the MDC as I cannot find any other API doco out there.? I do vaguely recall the protocol is different though.?? |
Re: Samsung Flip2
Yup done quite a few of these now with the standard mdc protocol. They work just like any other Samsung commercial screen.? ?Standard Samsung port (1515?) and screen ID to 1 if you want feedback.
You will also need to set the hdmi source to automatically go full screen when selected otherwise, by default it will open in a small window on the screen.?? Pretty sure the screen control and Id settings are in the remote management section in the screen menu.? Also note that the one i did last week,? WM65R,? also had a crestron connected option in the main menu.?? |
Re: Unhandled Exception Errors
¿ªÔÆÌåÓýMy guess is that it¡¯s somewhere in the //additional conditional if statements in your original example. Though the error references MyGame.GameGridUtility(uint localButtonPress) that doesn¡¯t appear to be in any of the functions you¡¯ve shared with us. ? It seems like at least for me the easiest way to run into this is to try to do something with a string that hasn¡¯t been set to a value yet¡ But really any nullable object/value type if you¡¯re trying to access it until it¡¯s either been instantiated or assigned a value is behaving properly by throwing a null reference exception. ? Numeric data types are not (generally*) nullable ¨C default value is 0. Likewise Booleans are not (generally) nullable and default to false. Strings are both nullable and default to null, same with most other objects. Check carefully for any of these that may be getting accessed before they have a value assigned or the constructor invoked. (eg ?= new() ) ? Also look at the next few lines in the error log ¨C the stack traces barfed out from S# can be very helpful but they have a tendency to be split across several lines of the error log. If all else fails wrapping ¡°suspect¡± sections of code in a try-catch** and printing the stack trace to console directly can, at least for me, be far easier to read and track down ¨C of course for performance these should be removed when the offending bug has been squashed absent a absent a specific need ? *- Generally = unless declared with a ? at the end ¨C e.g. int? thing, or bool? Value. ? ** -- e.g. ?as very quick almost pseudo code: try { // some things } catch (exception ex) { crestonconsole.printline(¡°In foo caught exception: {0} {1}¡±, e.message, e.stacktrace); } ? -- Lincoln King-Cliby Commercial Market Director ? From: [email protected] <[email protected]> On Behalf Of
Brad Wykoff via groups.io
Sent: Wednesday, March 1, 2023 5:22 PM To: [email protected] Subject: Re: [crestron] Unhandled Exception Errors ? CalculateX and Y private int methods and has worked before trying to get ButtonPress method introduced ? private int CalculateX(int index) ? ? ? ? { ? ? ? ? ? ? return (index - 1) % 4; ? ? ? ? } ? ? ? ? ? private int CalculateY(int index) ? ? ? ? { ? ? ? ? ? ? return (index - 1) / 4; ? ? ? ? } |
Re: AprilAire TStats
Bump.
Anyone have these on any sites???? We have 12 8840's on this site. We found that the recent AprilAire software updates seemed to cause issues. when we forced them up to the latest, they seemed much better, but we're still seeing 1-2 random TStats occasionally (~1-2 days) go off-line. This wouldn't be bad but we have to restart/reboot to get them connected again. TIA! |
Re: Unhandled Exception Errors
CalculateX and Y private int methods and has worked before trying to get ButtonPress method introduced
? private int CalculateX(int index)
? ? ? ? {
? ? ? ? ? ? return (index - 1) % 4;
? ? ? ? }
?
? ? ? ? private int CalculateY(int index)
? ? ? ? {
? ? ? ? ? ? return (index - 1) / 4;
? ? ? ? } |
Unhandled Exception Errors
What am I missing here. Error message is at bottom of page.
C# ?
public void ButtonPress(ushort GameButtonPress)
{
? ? if (GameButtonPress != 0)
? ? ? ? {
? ? ? ? ? ? PlayerClickHandler(GameButtonPress);
? ? ? ? }
else
? ? ? ? {?
? ? ? ? ? ? throw new NotImplementedException();
? ? ? ? }
}
?
?
public bool PlayerClickHandler(ushort ButtonId)
{
?
? ? ? ? // Calculate the button's on game board x,y
? ? ? ? int x = CalculateX(ButtonId);
? ? ? ? int y = CalculateY(ButtonId);
?
//addtional conditional if statemnets to evaluate player choice of placement.
?
}
?
Simpl+
?
push PlayerPress
{??
? ? integer x;
? ? x = getlastmodifiedarrayindex();
? ? delay(50);
_myGame.ButtonPress(x);? ??
}
?
?
Produces the following error:
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at MyGame.GameGridUtility.PlayerClickHandler (System.UInt16 buttonId)? at MyGame.GameGridUtility (System.UInt16 localButtonPress) |
Re: SImpl+ Windows 10 Compile Errors
#simplwindows
Seems this driver is only suppose to work for 4series. Test it with recompiling it after changing the processor type to 4series.
toggle quoted message
Show quoted text
Thanks Mayank
|
Re: SImpl+ Windows 10 Compile Errors
#simplwindows
On Wed, Mar 1, 2023 at 10:21 AM, jmill210 wrote:
CiscoRoomDeviceDriver4.0.clzHave you checked to see if this CLZ is in your S+ modules folder (or in your project directory, if you use that instead)? |
SImpl+ Windows 10 Compile Errors
#simplwindows
After a windows update I've not been able to compile any projects that have simpl+ modules.? Programs without Simpl+ will compile.? Below is an example from a cisco module but I have the same errors on a program that has the BiAmp module as well.? In the past I was able to disable FIPS and turn off UAC and that fixed the issue.? That has no worked this time.? I reached out to TrueBlue and they had me re-install everything with Master Installer but running into the same issue.? Any help would be greatly appreciated.? The only anti virus on the computer is VIPRE.? I've disabled that and still get the same error messages. ? ERROR? (LGSPLS1702)? File: ** C:\Users\Public\Documents\Crestron\SIMPL\Usrsplus\CiscoRoomDevicesWrapper v4.0.usp, Line 63 |
Topics in Home Automation - New Article in Residential Tech Today
My latest article, "Delivering a Crestron-based Smart Homes Despite Supply Chain Delays¡± is being published by the good folks at Residential Tech Today Magazine on their web site.
Many smart home manufacturers are facing product delivery delays. But, the delays in delivery of Crestron hardware seem to be some of the worst.? I have heard Crestron integrators complaining of delays of up to a year on key products.? The question then becomes, how do integrators meet the needs of their customers under these circumstances.? This article looks at a number of solutions to help integrators work around the issues they face from delays in hardware deliveries. You can find the article here: For those interested in earlier articles that I've written, you can find those here: Finally, for those that want to see even more content I've written about smart home technology you can find that here: Thanks |