Go to Post I never wanted to be a teacher. This was the year I learned that I am one. It turns out mentors are teachers. Oops. - marshall [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2006, 09:42
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Thread created automatically to discuss a document in the White Papers.

.NET (2.0) Composite Dashboard Viewer by seanwitte

[EDIT]
More than one person has asked for the source code. I need to finish putting together a guide to create new dashboard views first, but will make the source available sometime this week. My hope is that people who choose to use the software will add functionality by creating and sharing views that can be imported into the application. I'm also aware that there are many open source advocates and linux users in this community, but I chose this platform because it was the fastest means to an end because these are the tools that I use professionally. Now that Microsoft is giving away the IDE the tools are free, but Windows is still a requirement.
[/EDIT]

Last edited by seanwitte : 23-01-2006 at 09:49.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2006, 07:30
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Attached to this post is a guide for creating custom views for use with this dashboard application. If you create custom controls that other teams may find useful I encourage you to make them available.

You can download the C# solution files from the URL below. Please do not redistribute the source with or without modification.

http://members.cox.net/seanwitte/FRC...ard_Source.zip
Attached Files
File Type: txt CreateDashboardView.txt (5.8 KB, 189 views)
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2006, 11:31
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

This is in response to a few private messages and emails I've received. I made the source available, but the whole point of this application is that you don't need to modify the source code to add custom views. You really don't have to know anything about the dashboard data at all. You only need to follow the instructions in the previous post to create a new user control and add UI elements to display the data. There are a few custom dashboardy (thats a technical term) widgets included, including a sliding bar, LED, CMU camera FOV, and last year's field.

The dashboard views are just user controls that inherit from a base class in the FRC.Dashboard.Typelib assembly. The base class inherits from UserControl, but adds methods that are used as callbacks to notify your control when new dashboard packets are available. The dashboard application loads the controls at runtime and lays them out on tabs in the UI. When a new packet is received it calls the appropriate callback on control loaded in the active tab. When a packet of type data frame1 is received and parsed it will call ShowDataFrame1() on the active view control. Its pretty simple when you dig into the code, but the architecture allows you to extend the functionality without modifying the original source code.

[EDIT]
I forgot to mention that you can use any CLR 2.0 compatible language (C#, VB.NET, or Managed C++) to build custom dashboard views. The step are the same, but the syntax depends on the language. VB.NET 2005 Express Edition is available here: http://msdn.microsoft.com/vstudio/ex...b/default.aspx. I haven't used it and I'm not familiar with the syntax differences.
[/EDIT]

Last edited by seanwitte : 31-01-2006 at 13:43.
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2006, 20:45
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Sean,

First of all, let me genuflect to you (and this something I rarely do). Your post is a wonderful example of structured code in a Windows environment.

I did, however, notice an error today. The Team Number was not displaying.

I believe that the root cause might be here (from DataFrameBase.cs):

Code:
//control byte breakdowns
public int Team_Number { get { return ((data[iCTRL_A] & 0x0F) << 8) & data[iCTRL_B]; }}
public int Channel_Number { get { return (data[iCTRL_C] & 0x3F); }}
I think that the bitwise AND of CTRL_B and the masked CTRL_A should be an addition or a bitwise OR.

I might be off base on this... I'm more of an embedded oriented engineer.

Your thoughts kind Sir?

Respectfully,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Reply With Quote
  #5   Spotlight this post!  
Unread 05-02-2006, 15:51
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

There is an error in the type library that will cause team numbers to be incorrect. Attached is a patch to correct problem. Thanks to Mike Betts for not only finding the problem, but proposing the correct solution. Unzip the two dll's in the attachment and drop them into the folder with FRCDashboard.exe.

The controls assembly is included because I added a widget to display the robot's heading. Its very simple, looks sort of like a compass. The UpdateHeading() method does exactly what you'd think.
Attached Files
File Type: zip FRCDashboardPatch_20050205.zip (212.7 KB, 97 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2006, 11:13
cjelly's Avatar
cjelly cjelly is offline
Christopher Jelly
FRC #0177 (Bobcat Robotics)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2005
Location: South Windsor, CT
Posts: 29
cjelly is just really nicecjelly is just really nicecjelly is just really nicecjelly is just really nicecjelly is just really nice
Send a message via AIM to cjelly
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Do you think you can release the source for the patch? My team has been working on the dashboard and the new update source code should be helpful.

I am also recieving "Cross-Thread Operation Not Valid" error messages when I run the main application. Has anyone else experienced this? Do you have a proposed solution?

Thank You,

Chris
Reply With Quote
  #7   Spotlight this post!  
Unread 11-02-2006, 13:26
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Quote:
Originally Posted by cjelly
Do you think you can release the source for the patch? My team has been working on the dashboard and the new update source code should be helpful.
If you're already working with the source, the only change is to replace line 55 in DataFrameBase.cs in the typelib project with the following:

public int Team_Number { get { return ((data[iCTRL_A] & 0x0F) << 8) | data[iCTRL_B]; }}

I updated the source linked earlier in the thread as well if you want a fresh copy.

Quote:
Originally Posted by cjelly
I am also recieving "Cross-Thread Operation Not Valid" error messages when I run the main application. Has anyone else experienced this? Do you have a proposed solution?
Sorry, this I have not seen. Have you changed anything?
Reply With Quote
  #8   Spotlight this post!  
Unread 16-02-2006, 02:27
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

Attached is the DLL for the old version of the dashboard with the team number fix applied, for those of us with old views that we don't want to reprogram

EDIT: I found an error that is probably common to both dashboards. iCTRL_B is defined as byte 10 in the dashboards, but the specification (and in real life) says it should be byte 9. I have uploaded the doubly corrected file for the older version, but do not have the tools to correct the newer version.
Attached Files
File Type: zip DashboardTypeLib_Fixed.zip (4.2 KB, 95 views)
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL

Last edited by Eldarion : 16-02-2006 at 17:44.
Reply With Quote
  #9   Spotlight this post!  
Unread 12-02-2007, 16:24
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

I added the source code to the whitepaper record.
Reply With Quote
  #10   Spotlight this post!  
Unread 08-02-2008, 00:15
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
Re: White Paper Discuss: .NET (2.0) Composite Dashboard Viewer

The 2008 Control Library has a few .NET 2.0 dashboard controls. All controls are updated using the Value property. The controls will render themselves to fill space provided. If the size is invalid it may display an exception in the designer. You can clear the exception in the designer by resizing the control to valid dimensions and reopening the designer. The compass will always render as a square and the gyro will render as a rectangle with 2:1 aspect ratio.

1) CompassControl - displays a heading value. Use the MinValue and MaxValue properties to set the upper and lower bounds. Use ArrowDirection to adjust for clockwise/counter-clockwise rotation (value is 1 or -1). Use ArrowOffset property to adjust where the min value is rendered.

2) PwmControl - displays PWM value as a double-headed arrow.

3) GyroControl - displays an analog value that has a zero value centered in the total range. Use the MinValue and MaxValue properties to set the range displayed.

4) RangeControl - displays range information. Use the Invert property to display the inverse depending on the sensor being used. Use the MinValue and MaxValue properties to set the range.

Last edited by seanwitte : 08-02-2008 at 09:29.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
White Paper Discuss: NEMO White Paper: 25 Ways Sponsors Can Help Your Team Jessica Boucher Extra Discussion 1 20-11-2005 20:01
White Paper Discuss: .NET Composite Dashboard Viewer seanwitte Extra Discussion 8 06-04-2005 00:15
White Paper Discuss: 2004 Visual Basic 6 Dashboard Control CD47-Bot Extra Discussion 2 01-02-2005 01:56
White Paper Discuss: 2004 .NET dashboard control dll CD47-Bot Extra Discussion 7 13-01-2005 17:32
White Paper Discuss: Team 810's 2004 Dashboard Backend CD47-Bot Extra Discussion 1 07-03-2004 10:32


All times are GMT -5. The time now is 22:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi