Added preliminary gui
Each jag appears in the window. The description (set on the 2CAN) VBus Vout Iout Firmware Version and active status is displayed
If the program thinks the jag is alive the circle and subsequent text will appear in green to give a quick visual cue. Otherwise the alive circle and subsequent text will be red.
–See image attached for overview
–New zip file added with gui. Extract all files to same folder. Run it the same as before.
Automatic reconnection to 2CAN if it gets disconnected
2CAN Status below jag status
Will take that into consideration. I will bold the text. May just make all the text black and have the active circle change green or red.
To launch it with your dashboard you need to go to users\public\public documents. Make a backup of “frc ds data storage.ini” then change the cmd line to java c:\frc wocansam 10.99.99.10 TVCB changing the variables to your needs.
Also next update:
Set monitoring to all for default if no parameters are passed
Throw a flag if a fault occurs or if a jag disconnects
Added - auto reconnect
2CAN status - in separate window (can be closed without stopping program) FIXED All text is now black and tho only color changing is the circles
All monitoring enabled if no mode parameters are passed
Fault indicator (Green if no fault has occurred. Red if it has.)
Jag Communications Lost Indicator (Green if communication was constant, Red if it was lost)
That’s all for tonight. Will start cracking on logging tomorrow. Let me know if there are any features I should add.
JUST KIDDING. Got stuck in a tight spot today and had nothing better to do. Got logging running. Gotta test when I am back at the lab. Once tested I will release 0.4
—Data appears as bar graph. Blue is normal red is if a fault is detected
—The red line is the front of the log
—Windows are shown only when that particular logging is enabled
—Example if you put B in the mode a window will pop up with v-Bus logging
—NOTE VOLTAGE IS SET TO A 24V SCALE
Added 2CAN Debug Window
—Enable it by adding a D in the mode parameter
Fixed Bug where main page would need to be open in browser
Fixed Bug where only logged data was being shown on the main window
Menu to show/hide logging
Labels for scales
Ability to save logs
The left dot signifies if the jag is seen as active
The middle dot signifies if a fault was detected (untested though)
—If at any point a fault is detected the dot will become and stay red
the right dot signifies if communications have been constant
—If at any point communications appears to have been lost the dot will become and stay red
Actually all of the information needed is contained in the open-source project located on our web site. Also a free Android apk is also available. The apk is called uCANdrive, unlike the RCS the uCANdrive is closed source.
I pull data from ip/status.xml which contains xml with all of the individual jag data. I found it by stumbling through the index pages html for a couple of minutes.
The main XML container is a response tag
Each jag has the following tags
Using the xpath library (java.xml.xpath.*) I can then retrieve the appropriate values via a simple path such as getting the voltout for jag number 7 like this
“response/voltout7” While that will work for jag number 7, i put in a loop to read all of the information from all of the jags so in reality its “response/voltout” + loop_counter but that is just logistics …
To do it without xml and save memory you should think along this line
Open a stream over http to ip/status.xml read the response line for line looking for patterns. (eg <v* can only be 1 of 2 bits of information voltout or voltbus) find the first > character go 1 or 2 characters left to get the jag number then take the data from the right of the > character until you reach a < character
If you think it will help I will release source for 0.5 when I get it done.
BEFORE I FORGET the little problem I ran into was that the 2CAN doesn’t log information unless the index page is loaded with POST data. Using the same http stream open ip/index.htm?enables=65535 and data should start rolling.
I downloaded the uCANdrive app about a week ago, when one of the students showed me the iPhone driver station app. It was cool to be able to drive the bot via his iPhone, although our controls are really too complicated for the interface so I went to see if there was anything similar for Android. I saw the uCANdrive and put it on my phone but it really does more than I want, and not enough of what I really want. I’ll take a crack at coming up with an app that does something similar to your monitor which is really all I want. Of course I could just point my browser at the 2CAN and use the web interface but would be the fun in that.
0.5 is nearly ready I will be conducting testing today to make sure everything is in order. I want to do some cleanup of the gui first (menus appear not where menus should) then I can release.
Currently the log spits out the description then each value in the log (currently capped at 500 items updated at every 0.5 second which should amount to a bit over four minutes of log. I want to add a flag to log every 0.25 seconds which would make the logs a little over 2 minutes long. The values will be printed in order from the oldest value to the most current value. Id advise you to pause the log before saving because it will continue to log even while you have the save dialog open!
If you left click on a log it will pause it. Right click and the value at that point in time will be displayed
I also added a menu item on each log view to pause all of the values at once.
—Fixed silly bug where any value between -9.99 and -0.01 would cause an exception to be thrown (values were read as - 9.99 not -9.99)
—Bundled everything into an executable jar file
—Added a batch file to start the program
—Modified the V-Out scale to show a negative throttle on the graph (note the scale will say 200 instead of 100 - will be fixed in the next release)
Unpack the zip file into a folder
Modify the driverstation storage ini file:
—open the file
—copy the cmd line
–change to c:\frc\start.bat (or wherever you extracted the zip)
—Paste the command line into a new line on start.bat
Sorry folks i dont have access to our driver station so I cannot create the line for you. If someone is kind enough to do this and post their line it would be greatly appreciated
Have not had time to add the logging rate modifier like I had promised. For those without broken promises under hardship may cast the first bit (either a 1 or a 0)