Releases: ssilverman/TeensyDMX
Releases · ssilverman/TeensyDMX
4.0.0-alpha.6
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 typeuint8_t
; it's now anint
.- 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
Added
- There are two new constants,
kMinTXBreakTime
andkMinTXMABTime
, 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, toResponder::breakTime()
, a function that returns a duration in microseconds. Also changedResponder::markAfterBreakTime()
toResponder::mabTime()
. - Updated the
SIPHandler
example to remove the need for usingconst_cast
by usingstd::copy_n
instead ofmemcpy
. Also replacing thechecksum
function withstd::accumulate
to be more modern. - All the
set
and action functions inSender
that previously did nothing or ignored the values on bad input now return abool
indicating success. These include inSender
: the two 8-bitset
functions,set16Bit
,setRefreshRate
, the tworesumeFor
functions, andsetPacketSize
.
4.0.0-alpha.4
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
andSender::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
Added
- Added a way to set and retrieve 16-bit values using new
Receiver::get16Bit
andSender::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()
andReceiver::errorStats()
functions with associatedReceiver::PacketStats
andReceiver::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
andReceiver::PacketStats
, respectively:Receiver::errorStats()
andReceiver::packetStats()
. Receiver::readPacket
has an additional but optional parameter that provides a place to store the packet statistics, aPacketStats*
, allowing atomic retrieval with the packet data.
Removed
Receiver::packetTimeoutCount()
,Receiver::framingErrorCount()
, andReceiver::shortPacketCount()
were replaced byReceiver::errorStats()
and its associatedReceiver::ErrorStats
class.
4.0.0-alpha.2
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
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
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
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
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
Added
- New
Responder::preDataDelay()
method that returns the time in microseconds to wait after the pre-BREAK or no-pre-BREAK delay times (preBreakDelay()
orpreNoBreakDelay()
), and after the transmitter is turned on.
Changed
- If a
Responder
is being used,Receiver
now delays forpreNoBreakDelay()
before enabling the transmitter. After delaying forpreBreakDelay()
orpreNoBreakDelay()
, the transmitter is enabled, and thenReceiver
delays forpreDataDelay()
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.