* commit '71bb657e3a7d80edc096094564f5d279e8a1fb69':
Esp32 iram attr (#26)
The merge adds extra STM32 handling
Als manually resolved the conflict around the type for lastMicros, to now be:
static unsigned int lastMicros = 0;
Howefully this does the right thing on each platform
Changed the Service Mode duplicate packet comparison to only compare the packet Size and Data fields and ignore the number of Preamble bits as some command stations appear to send different numbers of preamble bits for otherwise duplicated packets, so we detecting the required two identical packets in sequence and performing the ServiceMode Operation
* AdvancedCVAck:
corrected method description
split out ServiceMode ackCV from Ops Mode AdvancedCVAck as doing a ackCV in Ops Mode is wrong and adds 6ms busy delay add cache of CV29 value
* changed the version to 201 in the header
* added conditional compilation for ESP8266 to add ICACHE_RAM_ATTR to ExternalInterruptHandler
changed storage for Micros to unsigned long
* some tuning to bit recognition and nested IRQ (STM32)
* outputaddressing corrected
declared notifyDccAccState for backward compatibility
* version define in NmraDcc.h
* DB_PRINT introduced
Changed debug printing to a macro.
Added cv29 to CV-addresses that reset caching of myAddress
* Corrections regarding Outputaddressing
OutputAddress must be a signed variable
* Changes/additions regarding output addressing and CVChange callback
Change Flag FLAGS_OUTPUT_ADDRESS_MODE accordingly, when CV29 Bit 6 (output addressing) is changed.
New callback 'notifyDccCVChange' which is NOT called if the CV is changed by means of the setCV() method
* Shorten Debug Messages
Because of Buffer overrun in the serial output. This leads to blocking
Serial.write() calls
* notifyDccSigState restored
Restore the old callback notifyDccSigState for compatibiltity to version
1.4.2
* switch off debug printing
* ESP32 specific changes
insert ESP32 specific changes reagarding the ISR by Hans Tanner
Each field of keywords.txt is separated by a single true tab. When you use multiple tabs it causes the field to be interpreted as empty. On Arduino IDE 1.6.5 and newer an empty KEYWORD_TOKENTYPE causes the default editor.function.style coloration to be used (as with KEYWORD2, KEYWORD3, LITERAL2). On Arduino IDE 1.6.4 and older it causes the keyword to not be recognized for any special coloration.
Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
* outputaddressing corrected
declared notifyDccAccState for backward compatibility
* version define in NmraDcc.h
* DB_PRINT introduced
Changed debug printing to a macro.
Added cv29 to CV-addresses that reset caching of myAddress
* Corrections regarding Outputaddressing
OutputAddress must be a signed variable
* Changes/additions regarding output addressing and CVChange callback
Change Flag FLAGS_OUTPUT_ADDRESS_MODE accordingly, when CV29 Bit 6 (output addressing) is changed.
New callback 'notifyDccCVChange' which is NOT called if the CV is changed by means of the setCV() method
* Shorten Debug Messages
Because of Buffer overrun in the serial output. This leads to blocking
Serial.write() calls
* notifyDccSigState restored
Restore the old callback notifyDccSigState for compatibiltity to version
1.4.2
* switch off debug printing
* outputaddressing corrected
declared notifyDccAccState for backward compatibility
* version define in NmraDcc.h
* DB_PRINT introduced
Changed debug printing to a macro.
Added cv29 to CV-addresses that reset caching of myAddress
* Add notification for entering and leaving service mode to allow the
decoder to swithc off high current outputs
* Add notification for entering and leaving service mode to allow the
decoder to swithc off high current outputs
Added more detail to the README.md
NOT READY FOR PRODUCTION YET, needs more checking and change to provide some backwards compatibility for call-backs that had been removed
AddOutputModeAddressing:
Fixed off-by-one (x4) error with DCC Accessory Output Mode Addressing. Made compatible with the DCC Spec for DCC Accessory Output Mode Addressing CV storage in CV 1 & 9. Its a bit wierd but...
Added heaps of DEBUG PRINT to the Accessory Decoder section to follow/test the various test cases through the code and to figure out how to make this stuff work. Added more code to make the existing supported functions to be more selective about which packet bits patterns they take notice of as it was too broad previously Will remove some of the notifyCall-Back functions as some were not well conceived at the time and now need to go Testing is NOT complete as there were issues in JMRI that also need to be resolved in sync with this so we're not quite there yet..
With eeprom_is_ready() for AVR-processors (#13)
Fixed some bugs around DCC Accessory Output Mode Addressing and handling of edge cases Add function to set Accessory Decoder Address from next received Accessory Decoder command and new notify call-backs when a new address is set Added new notifyDccSigOutputState() with no OutputIndex parameter Bumped version but have NOT tagged the library as it needs more testing and checking for breakage
Added NmraDcc.h documentation changes and logic changes to correct a couple of issue that arose from Ken West performing a standard NMRA DCC Decoder Confirmance test. Added his test sketches and output reports
Added more code to make the existing supported functions to be more selective about which packet bits patterns they take notice of as it was too broad previously
Will remove some of the notifyCall-Back functions as some were not well conceived at the time and now need to go
Testing is NOT complete as there were issues in JMRI that also need to be resolved in sync with this so we're not quite there yet..
Add function to set Accessory Decoder Address from next received Accessory Decoder command and new notify call-backs when a new address is set
Added new notifyDccSigOutputState() with no OutputIndex parameter
Bumped version but have NOT tagged the library as it needs more testing and checking for breakage
* 1st version for STM32
bit detection and EEPROM changed to support STM32
* added STM32F1 support
updated files: library.properties. NmraDcc.cpp, NmraDcc.h
* switch off debug output
* missing #endif added
Testports for esp8266 defined
Bug Fix to allow maximum of 17 servos
Bug Fix to correct 2 reload #define definitions
Change to major Loop Delay cut in half to allow for fewer misses of DCC
packet detection