View Single Post
  #1   Spotlight this post!  
Unread 15-12-2009, 22:15
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
replace WPILib part

In the C programming manual that comes with WPILib, I remember it saying you can replace parts of WPILib by adding the source code to your class, and then just compiling. I was testing a modified Dashboard class (removed all functions, except Printf and Finalize, both renamed Add and Send (and inner code tweaked), and no matter what I tried, It would give either a compiler or linker error. The one tricky thing is I must get my custom dashboard class from ds->GetDashboardPacker() because it needs access to a shared status pointer the dashboard updates. How do I get this to work?

Things I have tried:
Dashboard.c & h in project dir
copy h to WPILib folder, overwriting original h
delete my .h
#if trickery (from my c new, else old, and a few other...)
h style trickery (forward declarations, etc...)
restore my h
combine my H and c
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote