New to the forum here and had a question or two about the WpfSample project in C#.
I loaded everything up using Microsoft Visual Studio. The project bulids without error and works fine however, when double clicking on "MainWindow.xaml" the follow error occurs.
Main Window: "Invalid Markup".
XAML Window: Highlights LEDSelector "Value"
Error List: "The member "Value" is not recognized or is not accessible.
If I start deleting these I can get the MainWindow to load - but quickly run into other issues. Does anyone know how to solve this problem?
Second: I was hoping to get a little help with something.
What I'd like to do is create a loop (timing adjustable down to 10ms) that outputs all controller button presses, thumbstick movements, trigger pulls etc, to a text file with a timestamp of each. This would be fine if done after "Start I/O Requests" is clicked in the Device I/O Status screen. The text file could stop recording controller outputs when the "Stop I/O Requests" button is pressed.
Any help would be greatly appreciated!
The way to do what you ask for is to have a thread running that sends a RequestIOStatus command and having a eventhandler for the IOStatusChanged (this event has all the inputs/outputs in a object for you to use...
You probably should stick to windowsforms if you're new to programming as WPF can be a bit tricky to handle at times
Closing the designer, recompiling, and re-opening unfortunately is not working as you suggested. For your reference I'm using a fresh install of Visual Studio Community 2017 edition.
I'm not new to coding but I am new to WPF. I'm figuring things out and I already have an output working - but it's rudimentary at best. It's outputting everything regardless of change - so I'll try using the IOStatusChanged as you suggested. Should be much better.
Thanks for the help.
I will look into the WPF Sample project and see if it's something i can make properly work with the designer in VS 2017, I've only used VS 2015 for this particular project...
Currently the way I'm doing it is I have edited IoStatusDisplay.xaml.cs. After line 96 I added a series of checks to see if In00.Value != status.InputStatus.Input00 and so on. It works for the most part however, I'm seeing a bit of a problem with getting accurate thumb stick press data. I believe I'm "missing" the press or release at times possibly because of the loop timing or because there is other thumb stick traffic. Not sure what's going on there. If you have some better thoughts on how to do it that would be great!
And yes, possibly there's some differences in VS 2017 that are causing the issue with the designer.
Appreciate all the help Swizzy!
Actually I found the issue with my thumbstick presses... it was due to how I was writing the strings. Thanks again
Oddly enough the designer just started working. I didn't do anything different - one day it just started working. Strange.
On to my next topics:
1) If I wanted to connect several Cronus devices to the same APP (WpfSample for example), what would be the best way to do that? Currently I have to run several instances of the application to connect multiple devices but would prefer to do that in one application.
2) Is there a way to pull the serial number or device ID info off of the cronus? Since I want to plug in several cronus devices at once, I'd like a way to identify which is which easily.
Any help is greatly appreciated!
The current API was only designed for single device communication...
The current API does not translate the Serial at this time, i did write another version of the API that is much better (can handle multiple CM's simultaneously and can do almost everything you can do with CronusPRO, pretty much everything except for programming the firmware/slots) however, i am not allowed to share it at this time :/