Commit Graph

32 Commits

Author SHA1 Message Date
MicroBahner
09d8d7fad9 restore ackCV
delete ackAdvancedCv and call ackCV only in servicemode
Don't allow setting the RailcomBit in CV29
2019-12-07 14:31:55 +01:00
Alex Shepherd
a8081526ba Merge commit '71bb657e3a7d80edc096094564f5d279e8a1fb69'
* 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
2019-10-28 18:58:02 +13:00
Alex Shepherd
828b1feaba corrected method description 2019-08-09 08:19:53 +12:00
Franz-Peter
71bb657e3a Esp32 iram attr (#26)
* 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)
2019-08-06 01:14:58 +12:00
Alex Shepherd
f3a2b87693 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
2019-08-06 00:22:04 +12:00
Alex Shepherd
b249762550 changed the version to 201 in the header 2019-05-02 21:42:59 +12:00
Thierry Paris
ff3e24dff4 Add ESP32 support (#21)
* Update README.md

* Added ESP32 support.
2019-01-23 14:15:46 +13:00
Alex Shepherd
7a3845cbdf Changed the architectures to now be * as we're no longer tied to AVR specific hardware, however I've listed the architectures its been tested on
Fixed a bug with CV bit-write
2018-07-08 00:54:21 +12:00
Alex Shepherd
1717a2efb0 Made some minor tweaks / tidy-ups after committing Franz-Peter's changes 2018-07-07 19:21:48 +12:00
Franz-Peter
32c5597870 Additional changes regarding output addressing and new callback notifyDccCVChanged() (#17)
* 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
2018-07-07 13:26:51 +12:00
Alex Shepherd
f171dd3894 Added new FLAGS_AUTO_FACTORY_DEFAULT flag to enable checking CV 7 & 8 and if value of both is 255 then call notifyCVResetFactoryDefault() if defined 2018-04-18 23:53:01 +12:00
Franz-Peter
778de8ce74 Changes regarding output addressing (#16)
* 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
2018-04-15 20:20:57 +12:00
M1118
ba3264bd87 Addition of notifyServceMode call to allow decoders to turn off high current outputs (#14)
* 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
2018-04-15 20:13:12 +12:00
Alex Shepherd
ec801bf463 updated the examples to reflect the removal of support for the two call-back functions: notifyDccAccState(), notifyDccSigState() 2018-02-28 23:50:59 +13:00
Alex Shepherd
90470987a8 Merge branch 'AddOutputModeAddressing'
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
2017-12-24 16:53:22 +13:00
Alex Shepherd
0656f58c5b 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..
2017-06-08 09:58:41 +12:00
Alex Shepherd
07933e42a8 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
2017-04-27 01:26:25 +12:00
Franz-Peter
f8f106962f Stm32 support (#12)
* 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
2017-01-30 17:08:41 +13:00
Alex Shepherd
3a5986d10d added esp8266 to supported architectures
added addition #include file for esp8266 to resolve missing SPI_FLASH_SEC_SIZE symbol
2016-11-16 10:01:36 +13:00
Alex Shepherd
3eee73f6cd replaced '4096' with definition SPI_FLASH_SEC_SIZE from header file 2016-08-20 17:36:47 +12:00
Sven Bursch-Osewold
d3059d2f4e ESP8266 Support 2016-08-18 19:57:47 +02:00
MicroBahner
e0d46ff9b9 DCC_DEBUG: new function getNestedIrqCount()
getNestedIrqCount() returns how often the DCC-Irq interrupted itself.
This is a hint that the DCC Signal is not clean and there are glitches.
2016-07-18 16:21:20 +02:00
Alex Shepherd
9e656f49c6 Commented out #define NMRA_DCC_ENABLE_14_SPEED_STEP_MODE 2016-06-11 15:46:05 +12:00
Alex Shepherd
b8dac78697 merged in master and added initAccessoryDecoder method 2016-03-25 17:46:22 +13:00
Alex Shepherd
e087dc9052 Merge branch 'master' into MicroBahner-Without-use-of-HW-timers 2016-03-24 18:51:12 +13:00
Alex Shepherd
4e4007ebf7 Added new call-back functions: notifyDccAccTurnoutBoard and notifyDccAccTurnoutOutput
Added new example NmraDccAccessoryDecoder_Pulsed_8
changed version to 1.2.0
2016-03-19 23:24:55 +13:00
MicroBahner
3cff15994c Switchoff DBGVAR
No Debug-Output
2016-01-03 14:23:45 +01:00
MicroBahner
d47795e54a No HW dependencies
Compiles for AVR and Teensy (Arm) without modifications
2016-01-03 14:17:02 +01:00
Alex Shepherd
ed03e292e4 corrected information in the file headers to reflect change to MRRwA from OpenDCC 2015-11-29 16:34:10 +13:00
Alex Shepherd
f903b3ab53 Added in enhancements from Martin Pischky for 14 & 28 speed steps and merged in more examples from Geoff into the examples/SMA folder 2015-11-16 23:49:12 +13:00
Alex Shepherd
8f6fbdead1 Added extern "C" wrapper around C call-back functions 2015-09-27 09:36:25 +13:00
Alex Shepherd
b01ca7f31e Initial checkin to git and added library.properties 2015-05-12 18:46:14 +12:00