Quote:
Originally Posted by virtuald
I suspect that writing an abstraction over the hardware abstraction layer is a bad idea. 
|
There already IS an abstraction layer over the hardware abstraction layer.
It's called WPILib.
More seriously, the point is that someone's going to have to implement some abstraction for the cRIO either way - the question is at which level, and the HAL might or might not be the best level.
Quote:
Originally Posted by virtuald
The goal of the python WPILib project is to be a python implementation of WPILib, so that it is 100% (ish) compatible, as opposed to a framework extending WPILib such as CCRE.
|
That doesn't disallow you from the first suggestion, which was to detect dynamically which platform you're on and choose the proper implementation. You can do that with still offering the same WPILib-like interface.
Quote:
Originally Posted by virtuald
Given that the HAL is supposed to be the hardware independent piece, I think that makes the most sense to use as our bottom edge.
If one cannot port the HAL to the cRio, perhaps it should be made more abstract 
|
The HAL may work as a layer at which to do the abstraction. However, doing so will require a significant amount of null code for things like the PDP, PCM, Power API, builtin accelerometer, analog outputs, etc. Besides that, there appear to be a large number of platform-specific calls. (These may, however, be very similar to the cRIO calls. The bird's-eye-view of the HAL looks surprisingly similar to the cRIO's FPGA interface.)
While I would agree that it should be made abstract enough to cover both platforms, I doubt that the WPILib team would see this to be important enough to spend time on, as they have a large enough backlog of more relevant tasks.
Still - this is your project. I suspect you could ask the WPILib team for the parts of the HAL code that they're okay with making public (or access them directly after talking to them) and then start the project of supporting the cRIO with it yourself. If you stick it on GitHub or somewhere similar, you might be able to get other teams to help out.
__________________
Software manager alumnus. Developer of
the CCRE, a powerful robot code framework based on dataflow and composibility.
Refer to as she/her/hers. Years of FRC: 2012, 2013, 2014, 2015, 2016. FLL for a few years beforehand.
Team 1540:
The Flaming Chickens | Portland, Oregon |
Twitter |
Facebook