Keyboard Shortcuts
Likes
- Crestron
- Messages
Search
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 |
Re: 3 Series Comparison
On Tue, Feb 28, 2023 at 12:45 PM, <miuljary@...> wrote:
I've just dropped it into the photos section but it doesn't mention processing.I remember? reading somewhere that rmc3/dinap3 were 800mhz, CP3 1000 and pro3/AV3 1200mhz (mind blowing numbers). |
Re: How to get C# trigger a method based on event from Simpl+
I've updated my code as follows:
C# ?public void ButtonPress(ushort localButtonPress)
? ? ? ? {
? ? ? ? ? ? ? //? localButtonPress = ButtonPressID;
? ? ? ? ? ? ? ? ButtonClickHandler(localButtonPress);
? ? ? ? ? ? ? ? CrestronConsole.PrintLine("Button Press is: {0}\n", localButtonPress);
? ? ? ? }
? ? ? ?
? ? ? ?
? ? ? ? public bool ButtonClickHandler(ushort buttonId)
? ? ? ? {
? ? ? ? ? ? CrestronConsole.PrintLine("ButtonClickHandler running and Button is {0}\n", buttonId);
? ? ? ? ? ? // Calculate the button's grid x,y
? ? ? ? ? ? int x = CalculateX(buttonId);
? ? ? ? ? ? int y = CalculateY(buttonId);
? ? ? ? ? ? CrestronConsole.PrintLine("Button {0} has x = {1} and y = {2}", buttonId, x, y); ? ? ? ? ? ?If(evaluateSomething) ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? ?// DoSomething ? ? ? ? ? ? } ? ? ? ? } Simpl+ DIGITAL_INPUT playerPress[64]; push playerPress
{??
? ? ? integer x;
? ? ? x = getlastmodifiedarrayindex();
?
? ? ?_myGame.ButtonPress(x);? ??
}
?
Complies without any errors but get the following error in ErrorLog:?Referencing _myGame.ButtonPress(x); Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object |
Re: How to get C# trigger a method based on event from Simpl+
Trying to create logic similar to the game Othello. this has been causing the following error: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in Simpl+
? C# public class myGame { ? ? ?public ushort BUTTONID { get; set;} ? ? ?public ushort ButtonId? ? ? // being populated from Simpl+ ? ? ?{ ? ? ? ? ? ?get { return BUTTONID; } ? ? ? set { BUTTONID = value; } ? ? ? } ? ? ? ?public RootButtons[] _buttons = new RootButtons[64]; // set board array 8x8 playing grid ? ? ? ?public void ButtonPresses() ? ? { ? ? ? ? ButtonClickLogic(ButtonId); // call method ? ? ?} ? ? ?public bool ButtonClickLogic(ushort buttonPress) ? ? { ? ? ? ? ? If( _buttons[buttonPress].BUTTON_FB = 0) ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? _buttons[buttonPress].BUTTON_FB = 1; ? ? ? ? ? ?} ? ? ? ? ? else ? ? ? ? ? ?{ ? ? ? ? ? ? ? _buttons[buttonPress].BUTTON_FB = 0; ? ? ? ? ? ?} ? ? ?} } public class RootButtons
? ? {
? ? ? ? public ushort BUTTON_FB { get; set; }
? ? } Simpl+ push Button { ? ? ?x = getlastmodifedarrayindex(); ? ? ?myGame.ButtonId = x; ? ? myGame.ButtonPresses(); } I have an EventHandler for return values from C# |
Re: How to get C# trigger a method based on event from Simpl+
¿ªÔÆÌåÓýBool is not a datatype understood by SIMPL+ so you won¡¯t have access to those methods. ? You can wrap it in a ushort equivalent method but SIMPL+ also doesn¡¯t generally deal well with one method having multiple signatures. ? e.g. ? public void doSomethingForSimpl(ushort i) { ????????????? doSomething((I != 0)); } ? Public void doSomething(bool b) { ????????????? // original method } ? In theory ? Public void doSomething(ushort i) { ????????????? doSomething((I != 0)); } ? Should also work. Until it doesn¡¯t. Usually defining it first makes things happy..until something changes. -- Lincoln King-Cliby Commercial Market Director ? From: [email protected] <[email protected]> On Behalf Of
Brad Wykoff via groups.io
Sent: Tuesday, February 28, 2023 6:33 PM To: [email protected] Subject: Re: [crestron] How to get C# trigger a method based on event from Simpl+ ? what if method in C# is public bool? |
Re: 3 Series Comparison
¿ªÔÆÌåÓýI have an MC3 for sale if it¡¯s going to get anyone out of a jam. Location NZTim Greenbank Control Systems Engineer On 1 Mar 2023, at 07:56, Mike Moso via groups.io <AV_Programmer@...> wrote:
|
How to get C# trigger a method based on event from Simpl+
I am able to use EventHandler in Simpl+ to watch for changes from C# but how do you reverse that logic??
Example: I have an integer (16bit) value that periodically changes in Simpl+ that is being sent to C# via public ushort somename; Need C# to watch for changes to somename then do something, like trigger a method.? |