Make naming consistent with our marketing of ex-rail for files and defines
* Rename RMFT.h to EXRAIL.h
* Rename RMFT2.cpp to EXRAIL2.cpp
* Rename RMFT2.h to EXRAIL2.h
* Rename RMFT2MacroReset.h to EXRAIL2MacroReset.h
* Rename RMFTMacros.h to EXRAILMacros.h
* Rename RMFT references to EXRAIL
The range of accessory decoder addresses for the <a> command is 0-511 in line with the DCC packet contents. The turnout command previously rejected address 0; this has been changed to the same range of addresses can be used by both commands, i.e. address 0-511 and subaddress 0-3. The linear address mapping remains so that linear address 1 is addr/subaddr 1/0; i.e. the first decoder address is not accessible by linear address.
When writing to a PWM device (servo or LED for example), it is possible to request the target position in the call, or to ask for a SET or RESET position. In the latter case, the positions corresponding to SET and RESET must be known, i.e. preconfigured. Defaults were assigned for this, but because the correct values will depend on the hardware device being driven, the defaults have been removed.
In addition, the <T> command, when defining a servo turnout, now configures the PWM positions (not required by <T> commands, but desirable for consistency with other commands).
* Re-enable native I2C driver.
* Minor non-functional changes to native I2C Manager.
* Minor changes to make variable types explicit in comparisons.
* Fix IODevice::loop() to avoid null pointer dereference.
Strange problems with LCD driver tracked down to being caused by a call to p->_loop() when p is NULL.
* Correct sense of comparison in LCN support function Turnout::setClosedStateOnly()
* Remove code (now unused) from LCD driver.
* Add I2C textual error messages.
* Add I2C textual error messages.
* Fix compile error in 4809 I2C driver.
* Remove init function call from SSD1306 driver.
Ensure state is saved and restored from EEPROM as expected.
Make constructors for turnouts private. Otherwise, a statically created turnout may be initialising itself before the underlying HAL device has been created. By requiring the create() call be used, there is more control over the timing of the turnout object's creation.
<s> command currently prints the current states for outputs and for sensors, but prints the full configuration of turnouts. This change makes the turnout output consistent, i.e. just <H id state> is output for each turnout. The <T> command still outputs the full turnout definition.
Ensure that the <H> message is sent on the serial USB (to JMRI) whenever the turnout is closed or thrown, even if the request didn't originate on the serial USB.
Turnout class split into a base class for common code and specific subclasses for Servo, DCC, VPIN and LCN turnouts.
Interface further narrowed to reduce direct access to member variables.
Turnout creation command handling has been moved into the DCCEXParser class.
Turnout function and parameter names changed to make the Throw and Close functionality explicit.
Turnout commands <T id C> (close) and <T id T> (throw) added.
* Add <D SERVO vpin position> command
Allow a PWM servo to be driven to any arbitrary position.
* Enhancements for HAL drivers
Add state change notification for external GPIO module drivers;
Allow drivers to be installed statically by declaration (as an alternative to the 'create' call).
* Create IO_HCSR04.h
HAL driver for HC-SR04 ultrasonic distance sensor (sonar).
* Enable servo commands in NO-HAL mode, but return error.
Avoid compile errors in RMFT.cpp when compiled with basic HAL by including the Turnout::createServo function as a stub that returns NULL.
* Update IO_HCSR04.h
Minor changes
* Change <D SERVO>
Give the <D SERVO> command an optional parameter of the profile. For example, <D SERVO 100 200 3> will slowly move the servo on pin 100 to PWM position corresponding to 200. If omitted, the servo will move immediately (no animation).
* IODevice (HAL) changes
1) Put new devices on the end of the chain instead of the beginning. This will give better performance for devices created first (ArduinoPins and extender GPIO devices, typically).
2) Remove unused functions.
* Update IO_HCSR04.h
Allow thresholds for ON and OFF to be separately configured at creation.
* Update IODevice.cpp
Fix compile error on IO_NO_HAL minimal HAL version.
* Update IO_PCA9685.cpp
Remove unnecessary duplicated call to min() function.
On activation, Turnout code was saving entire EEPROM twice, even if EEPROM save was switched off with the <e> command. It's now been changed so that only the tStatus byte is updated, and only if the turnout has previously been saved into EEPROM.
In prep for Wifi siolution, all output functions changed to expect Print class instead of Stream... Can still pass Serial1 etc because Stream extends Print, but this allows for an output-only class extending Print to collect a response buffer for Wifi sending with AT commands.