Skip to content

Releases: ssilverman/TeensyDMX

4.0.0-alpha.6

17 Dec 02:54
Compare
Choose a tag to compare
4.0.0-alpha.6 Pre-release
Pre-release

Added

  • There's a new alternative implementation of IntervalTimer that's being used to generate BREAK and MAB timings. This version allows state to be passed to the trigger function. It also has a slightly different API that allows other ways to start and restart the timer.

Changed

  • README updates.

Fixed

  • Receiver::setRXWatchPin didn't allow negative arguments because the parameter was of type uint8_t; it's now an int.
  • When sending a responder-initiated BREAK from the receiver, the routine now properly waits for transmission of any previous characters to complete; it was checking the register containing FIFO capacity instead of the register that indicates idle.

4.0.0-alpha.5

14 Dec 03:05
Compare
Choose a tag to compare
4.0.0-alpha.5 Pre-release
Pre-release

Added

  • There are two new constants, kMinTXBreakTime and kMinTXMABTime, that hold the minimum BREAK and MAB times allowed by the specification for transmitters.
  • Added a new SendTestPackets example that sends standard test packets, as specified in section D3 of the DMX specification. This was enabled by the new ability to specify the transmitter BREAK and MAB times.
  • There's a new Sender::set16Bit function that can set a range of 16-bit channels.

Changed

  • Some improved documentation.
  • Changed Responder::breakLength(), a function that returns the number of 11-bit character times, to Responder::breakTime(), a function that returns a duration in microseconds. Also changed Responder::markAfterBreakTime() to Responder::mabTime().
  • Updated the SIPHandler example to remove the need for using const_cast by using std::copy_n instead of memcpy. Also replacing the checksum function with std::accumulate to be more modern.
  • All the set and action functions in Sender that previously did nothing or ignored the values on bad input now return a bool indicating success. These include in Sender: the two 8-bit set functions, set16Bit, setRefreshRate, the two resumeFor functions, and setPacketSize.

4.0.0-alpha.4

07 Dec 13:45
Compare
Choose a tag to compare
4.0.0-alpha.4 Pre-release
Pre-release

Added

  • BREAK and MAB times can be determined separately in the receiver, in addition to their sum, if the RX pin is monitored by connecting it to a digital I/O-capable pin and calling the new Receiver::setRXWatchPin function. This removes the limitations the receiver has when checking for packets having invalid timing, but only when using this feature.
  • The BREAK and MAB times in the transmitter can now be specified more accurately via new Sender::setBreakTime and Sender::setMABTime functions. The actual times will be close, but the MAB may be a little longer than specified.

Fixed

  • MAB and BREAK-plus-MAB time calculations have been fixed when bytes are received all at once from a FIFO.
  • Data is now discarded at all places a framing error is encountered.

4.0.0-alpha.3

03 Dec 09:12
Compare
Choose a tag to compare
4.0.0-alpha.3 Pre-release
Pre-release

Added

  • Added a way to set and retrieve 16-bit values using new Receiver::get16Bit and Sender::set16Bit functions.
  • Added the ability to enable and disable the transmitter in the receiver via a new Receiver::setTXEnabled function. This is useful when it is known that the receiver will be receive-only and it is not desired to drive the TX line.
  • New Receiver::packetStats() and Receiver::errorStats() functions with associated Receiver::PacketStats and Receiver::ErrorStats classes for examining the latest packet statistics and error counts.

Changed

  • In the sender, changed how the baud rate is set when switching between the BREAK baud rate and slots baud rate. The UART/LPUART parameters are set directly instead of calling begin on the serial port object. This avoids setting values where we don't need to and has the effect of shaving some microseconds off the Mark after BREAK (MAB) so that it is closer to the desired duration.
  • Receiver::begin() now resets all the packet statistics.
  • Error counts and packet statistics functions have been replaced with functions to retrieve Receiver::ErrorStats and Receiver::PacketStats, respectively: Receiver::errorStats() and Receiver::packetStats().
  • Receiver::readPacket has an additional but optional parameter that provides a place to store the packet statistics, a PacketStats*, allowing atomic retrieval with the packet data.

Removed

  • Receiver::packetTimeoutCount(), Receiver::framingErrorCount(), and Receiver::shortPacketCount() were replaced by Receiver::errorStats() and its associated Receiver::ErrorStats class.

4.0.0-alpha.2

25 Nov 03:36
Compare
Choose a tag to compare
4.0.0-alpha.2 Pre-release
Pre-release

Fixed

  • This release should really fix the test-first-stop-bit problem. It turns out that Teensy 3.5, 3.6, and LC all support a 2-stop-bit mode, and so it is never appropriate to test bit R8 for these platforms. Bit R8 is now only tested as the first stop bit if the board is not one of these types.

3.2.2

22 Nov 12:27
Compare
Choose a tag to compare

Fixed

  • This release should really fix the test-first-stop-bit problem. It turns out that Teensy 3.5, 3.6, and LC all support a 2-stop-bit mode, and so it is never appropriate to test bit R8 for these platforms. Bit R8 is now only tested as the first stop bit if the board is not one of these types.

3.2.1

21 Nov 17:20
Compare
Choose a tag to compare

Fixed

  • When a frame error was being recorded due to the first stop bit not being high, the input UART buffer was not being flushed. The buffer is now flushed when this happens. There were reports of DMX receive freezing the device; this should fix the problem. [The fix does not work for Teensy LC.]
  • Teensy LC wasn't able to receive DMX data because the framing check that examined the first stop bit in each byte was always returning false. For some reason, the R8 bit in UARTx_C3, which functions as the first stop bit, is always zero. The check was changed for the Teensy LC to always return true.

4.0.0-alpha.1

17 Nov 21:26
Compare
Choose a tag to compare
4.0.0-alpha.1 Pre-release
Pre-release

Fixed

  • Teensy LC wasn't able to receive DMX data because the framing check that examined the first stop bit in each byte was always returning false. For some reason, the R8 bit in UARTx_C3, which functions as the first stop bit, is always zero. The check was changed for the Teensy LC to always return true.

4.0.0-alpha

16 Nov 22:23
Compare
Choose a tag to compare
4.0.0-alpha Pre-release
Pre-release

Added

  • Added a note to the BasicSend example that the transmit-enable pin may not be needed. The pin's existence was causing some confusion.

Changed

  • The main.cpp example program now uses a smart pointer for the current sketch, currSketch.
  • Responders are now passed as smart pointers instead of raw pointers to Receiver::setResponder.
  • Prep-work for Teensy 4 support. The library compiles but does not yet work on a Teensy 4.

Fixed

  • When a frame error was being recorded due to the first stop bit not being high, the input UART buffer was not being flushed. The buffer is now flushed when this happens. There were reports of DMX receive freezing the device; this should fix the problem.

3.2.0

13 Aug 06:16
Compare
Choose a tag to compare

Added

  • New Responder::preDataDelay() method that returns the time in microseconds to wait after the pre-BREAK or no-pre-BREAK delay times (preBreakDelay() or preNoBreakDelay()), and after the transmitter is turned on.

Changed

  • If a Responder is being used, Receiver now delays for preNoBreakDelay() before enabling the transmitter. After delaying for preBreakDelay() or preNoBreakDelay(), the transmitter is enabled, and then Receiver delays for preDataDelay() microseconds.
  • Improved framing error detection: the case where there's a short BREAK followed by a long MAB is now detected.

Fixed

  • Receiver now checks that the first stop bit of a received byte is logic 1. On the Kinetis chips, the first stop bit of two stop bits is implemented as the 9th bit of the 9-bit mode.