|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|
|
Re: Feedback Thread: WPILib
Quote:
Instead of a C++ assert that prints on the debug, the java implementation uses an unchecked exception. Seeing as the exception doesn't have a compile time warning, it is easy to overlook. If not handled, the exception will kill the main thread thus the bot, which means that one jag failure results in a dead bot. |
|
#17
|
||||
|
||||
|
Re: Feedback Thread: WPILib
Several things I'd like integrated into the WPI library:
I think all of these things would be pretty simple to implement. I can provide examples if my descriptions are unclear. |
|
#18
|
|||
|
|||
|
Re: Feedback Thread: WPILib
Quote:
|
|
#19
|
||||
|
||||
|
Re: Feedback Thread: WPILib
One thing that particularly annoys me in C++ (but I realize isn't exactly a WPILib problem) is that calling assert() doesn't trigger a breakpoint in the debugger at all -- which really, that is the whole *point* of assert().
|
|
#20
|
||||
|
||||
|
Re: Feedback Thread: WPILib
How about more use of the semaphore notification lists (in Axis camera, they "fire an event" when a new image is received)
some areas where that would be nice: DS new Data DS send data (dashboard) limit switch/digital input It would be helpful if there was a class for these semaphore events (how about SemaphoreEvent?). It would also be nice if the simple robot (which need a better name, IMO) was threaded, and you could tell it to kill auto if it is taking too long: Code:
class myrobot:public betternameforsimplerobot
{
//..
myrobot()
{
this->killAutoifItRunsTooLong=true
}
void Auto()
{
while(true)
{
printf("Bwa ha ha! You are stuck in an infinite loop!");
}
}
|
|
#21
|
||||
|
||||
|
Re: Feedback Thread: WPILib
Well, I just thought of another thing I'd like to be able to do:
The FPGA is capable of reading inputs at a much faster rate than the processor. Why not leverage this so that the FPGA can be used for short periods of high-speed data collection on the Analog inputs? Say you configure the sample rate and the number of samples in begin.vi, and then you just use a VI to trigger the collection? |
|
#22
|
||||
|
||||
|
Re: Feedback Thread: WPILib
Quote:
~ |
|
#23
|
||||||
|
||||||
|
Re: Feedback Thread: WPILib
Quote:
|
|
#24
|
||||
|
||||
|
Re: Feedback Thread: WPILib
No, I don't know what DMA is. I'll look into those now.
How about a boolean latch function? I think this might be possible with the "time since last pulse" counter, but that would require storing how long ago the last pulse was. A latch function might be configurable for "a pulse at least this length" so it could be used on things like switches. (In this past year, it could be used for a kicker passing by a switch to determine if it is at or past the frame perimeter.) |
|
#25
|
||||||
|
||||||
|
Re: Feedback Thread: WPILib
Quote:
|
|
#26
|
|||
|
|||
|
Re: Feedback Thread: WPILib
Quote:
-Joe |
|
#27
|
|||
|
|||
|
Re: Feedback Thread: WPILib
Quote:
http://www.chiefdelphi.com/forums/sh...ad.php?t=86289 |
|
#28
|
|||
|
|||
|
Re: Feedback Thread: WPILib
If there was one part of the WPILib that bothered me, it was that when it got ported to the java platform, it didn't get redesigned to match java paradigms and features. As an example, it doesnt use OOP or exceptions as effectively as it might.
The bigger, and more interesting, feature that seems to be wholly missing from the WPILib is events & asynchronous action. In my experience, these are particularly useful, if not essential, in robotics & other realtime applications... Case in point, see TinyOS, the embedded development platform where EVERYTHING is event based and asynchronous. The iOS platform also actively demonstrates this system effectiveness. Developers from my team implemented and successfully used our own event models in java, and I would encourage you to look at their work in improving the WPILib. http://code.google.com/p/grtframework |
|
#29
|
||||
|
||||
|
Re: Feedback Thread: WPILib
In the LabVIEW version, I'd like the refnum registries more tightly integrated with the act of opening and closing references for diagnostic purposes, so that when a reference is opened twice, the second time it will state for what purpose that channel was originally opened.
I realize that it's only as good as the naming, but I think it's a good attempt to aid in diagnostics and troubleshooting. (For that matter, it'd be neat to automatically start the execution trace tool when the watchdog starts timing out in Teleop. However, I think that could impact the performance of the user code.) But more about the refnum registries: There are some things that should not require a name, because there cannot be more than one of them. Here's a list:
Last edited by kamocat : 15-08-2010 at 03:02. |
|
#30
|
|||||
|
|||||
|
Re: Feedback Thread: WPILib
Quote:
There is only one watchdog and only one DMA resource available to the user, but keeping the general scheme intact and avoiding special cases seems worthwhile. The robot rules customarily permit only one air compressor. The software support is not that limited; you can define as many as you want until you run out of relay outputs. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Feedback Thread: Driver Station and Dashboard | Greg McKaskle | FRC Control System | 10 | 13-10-2010 23:26 |
| WPILib in Dev C++ | mikelowry | C/C++ | 2 | 22-09-2009 10:41 |
| Importing WPILib? | lingomaniac88 | C/C++ | 1 | 12-01-2009 20:39 |
| Using WPILib | RyanW | Programming | 1 | 19-01-2008 17:15 |