Commit Graph

17 Commits

Author SHA1 Message Date
Tyler Veness
45b8e9ab4f Renamed "pin" to "channel" and variables with underscores now use mixed case (#194) 2016-08-12 13:45:28 -07:00
Tyler Veness
3819cd0768 Updated cpplint.py and fixed its regexes for C-style casts (#193)
Additional C-style cast warnings thrown were also fixed.
2016-08-11 23:38:45 -07:00
Thad House
512ecf6490 Makes SensorBase checks use HAL check methods (#182) 2016-07-20 22:47:29 -07:00
Thad House
1ca291f20b Fixes a missed HAL_Bool change from int32 (#181) 2016-07-17 20:54:39 -07:00
Thad House
d2aa168f66 Implements Better Error Messages from the HAL (#172)
* Makes the HAL provide a better error message for certain things.

* Makes Java error messages better

* Updates C++ errors.

* Moves handles header folder to HAL directory
2016-07-13 20:29:28 -07:00
Thad House
b51e85ae26 Switches HAL to fixed length signed integers, and adds our own HAL_Bool Type (#155)
* Switches HAL to fixed length signed integers, and adds our own HAL_Bool type

* Replaces HAL Floats with Doubles

Doubles are just as fast as floats with optimizations turned on, so
switches to all doubles. All made doubles for consistency.

* Prepends HAL/ to HAL include files. Also fixes some range errors
2016-07-12 10:45:14 -07:00
Tyler Veness
0cb288ffba Fixes warnings thrown by cpplint.py (#154)
* Fixed cpplint.py [runtime/int] warnings

* Fixed cpplint.py [readability/casting] warnings

* Fixed cpplint.py [readability/namespace] warnings

* Fixed cpplint.py [readability/braces] warnings

* Fixed cpplint.py [whitespace/braces] warnings

* Fixed cpplint.py [runtime/explicit] warnings

* Fixed cpplint.py [runtime/printf] warnings

* Fixed cpplint.py [readability/inheritance] warnings

* Fixed cpplint.py [whitespace/tab] warnings

* Fixed cpplint.py [build/storage_class] warnings

* Fixed cpplint.py [readability/multiline_comment] warnings

* Fixed cpplint.py [whitespace/semicolon] warnings

* Fixed cpplint.py [readability/check] warnings

* Fixed cpplint.py [runtime/arrays] warnings

* Ran format.py
2016-07-10 17:47:44 -07:00
Thad House
b637b9ee4c Prepends all HAL functions with HAL_ (#146) 2016-07-09 00:24:26 -07:00
Thad House
fb865d3ee7 Adds a special exception and status message for a handle error (#127) 2016-07-03 17:27:06 -07:00
Thad House
b45e0917ae Adds port constants to the HAL (#130) 2016-07-02 23:19:14 -07:00
Thad House
47694ef810 Switches DigitalPWM to Handles (#121) 2016-06-30 23:43:00 -07:00
Thad House
3593ecb17e Switches PWM and DIO to Handles (#120) 2016-06-30 21:39:09 -07:00
PatrickPenguinTurtle
95d40ed01f Fixed issue with digital outputs used as pwm on mxp (#14)
When a digital output object that was tied to an mxp pin had enable pwm called on it
it would pwm on a pin 6 lower
 (although if this wasn't an mxp pin it wouldn't do anything at all.)
Fixed in Digital.cpp by adding 6 if it is an MXP pin in setPWMOutputChannel()
This should fix the CanJaguar test because when digitalOutputs used as PWM
were freed, the PWM generator was set to the number of pins, which meant it
was actually outputing on pin 20.

Change-Id: Ib48db3e6e3bf78659622145969d24011cc231ea6

Updated Hal to include some documentation about swaping mxp pins.

Cannot find NI related documentation as to the pin numbers being wrong though

Change-Id: I71d84431dc9bc7bf22aa29b6633e49723311b5f7

fixed formatting on changed files

Change-Id: I5b7c16cd798132b6b20c1d03f334a95b42d2ee11
2016-06-24 19:46:43 -07:00
Thad House
c3908660b1 Switches all HAL Handle errors to be zero (#100)
As discussed, we don't really need the error checking specifically, as
we are just going to throw exceptions anyway, so this will make sure you
can check for 0 and be sure you catch any handle errors.
2016-06-17 20:21:25 -07:00
Thad House
fc515f4572 Changes HAL Port from a pointer to a handle (#93)
HAL Port is using a special handle, where the module and pin are bit
shifted straight into the handle. This is one of the few special cases
we have, but for the way port is used it is much cleaner and uses much
less memory.  Plus it is generic and not specific to one type.
2016-06-05 15:23:58 -07:00
Tyler Veness
5a82f73d9b Replaced .h C headers with c-prefixed version and added std:: prefix to C standard library usage (#90)
This was not done to stdint.h for brevity in type names. Also removed "using namespace std;".
2016-06-05 07:33:37 -07:00
Thad House
da6b8c7ae1 Split HAL Digital Implementation files (#59)
Split to match the new headers. Uses a namespace 'hal' for internal functions and globals.
SPIAccumulator merged back into SPI header, as it was not a good split. Analog
accumulator will move back to analog input when the analog split is done.
2016-05-26 12:56:39 -07:00