Releases: ssilverman/TeensyDMX
Releases · ssilverman/TeensyDMX
3.1.1
Added
- New section in the README that describes how to connect DMX via a transceiver to a Teensy. See the new "Hardware connection" section under "Technical notes".
Changed
- Updated library description.
Fixed
- Added some missing literals to
keywords.txt
.
3.1.0
Added
- New
Sender::clear()
method that sets all the channels to zero. - New
Sender::breakTime()
andSender::mabTime()
methods that return the BREAK and MARK after BREAK (MAB) times in microseconds, respectively. - Added a section to the README that describes when connection detection doesn't work and what to do about it.
Changed
- Made the constructors
explicit
because they're single-argument. - There's now less protected data in the base
TeensyDMX
class. - Made
Sender::set
behave atomically. - Class documentation updates.
- The packet count is now reset to zero when the receiver or transmitter is either started for the first time or restarted.
Fixed
- Interrupts are now correctly not enabled if an instance of
Sender
orReceiver
is stopped, i.e. never started or had itsend()
method called. Receiver::setConnected
wasn't actually changing the internal connected state. The state is now updated correctly so thatReceiver::connected()
returns the correct value.
3.0.0
Added
- Two new examples,
BasicSend
andBasicReceive
.
Changed
- Updated
keywords.txt
. - The internal array that keeps track of responders in
Receiver
is now dynamically allocated; this saves about 1k of memory. - Changed
Receiver::addResponder
toReceiver::setResponder
; also changed its behaviour so that setting a responder tonullptr
removes any responder for the given start code. - Changed the behaviour of
Sender::pause
so that the caller must wait until transmission is complete before setting any values with one of theset
functions. Instances ofSender
are smaller by about 0.5k because there's no need to hold an internal "paused" array.
Fixed
- It was technically possible to overwrite the contents of a packet in the process of being sent if pause->set->resume was done quickly. Requiring any
set
call to wait until transmission is complete removes having to manage the concurrency. - On small systems such as the Teensy LC, dynamic memory allocation in
Receiver::setResponder
may fail. This was fixed and the documentation inTeensyDMX.h
and the README was updated. The caller can check theENOMEM
condition inerrno
to detect this condition. - The behaviour of
Receiver::get
was changed so that it always returns the last received value for a channel. It is no longer affected by a previous call toReceiver::readPacket
for the same received packet, where the packet was reset to empty. This change makes the function behave closer to expected.
3.0.0-beta
Added
- New document describing BREAK timing in relation to serial ports.
Changed
- Unified the RX status and error ISRs because framing errors and data should have the same priority.
- Refactored all the synchronous UART TX routines in
Receiver
to common #defines. - Minor documentation updates.
setRXNotTX
concept renamed tosetTXNotRX
, inReceiver
.- Small updates to the examples.
- Some concurrency improvements.
Fixed
- ISR-triggering status bits are now cleared properly for Teensy LC.
3.0.0-alpha
Added
- Short packet detection. These are packets that are smaller than 1196us.
- Ability to get the current transmitted packet size with
Sender::packetSize()
. - The concept of being connected in
Receiver
. There is a polling function,connected()
, and also a way to register a callback for when the state changes, viaonConnectChange
. - Associated with the concept of being connected in the receiver, and in addition to the improved BREAK plus MAB timing checks,
Receiver
now also checks for inter-slot and Mark before Break (MBB) IDLE times that are too long. Detecting these conditions will register as a change to the connected state. - Synchronous operation in
Receiver
. Using the newResponder
class, it's now possible to intercept, and even respond to, each packet as it comes in. - Two examples that use the new
Responder
feature:SIPHandler
andTextPacketHandler
.
Changed
- Renamed:
Sender::getRefreshRate()
toSender::refreshRate()
.Sender::getResumedRemaining()
toSender::resumedRemaining()
.
- The licence changed from BSD-3-Clause to BSD-3-Clause-Clear.
Fixed
- Documentation fixes.
- Improved packet timeout detection. It now detects when the BREAK plus MAB duration is too short, but not when they are individually too short.
- Added a define around the contents of
main.cpp
so that the project can be used in an Arduino environment. This prevents thesetup()
andloop()
definitions inmain.cpp
from interfering with the Arduino program. Receiver::get
now respects the current received packet size and behaves more similarly toReceiver::readPacket
.
2.5.0
Added
- The sender can now be paused and resumed. This allows implementations to send packets that must be adjacent to other packets, for example, System Information Packets (SIP) (see Annex D5 of ANSI E1.11). Essentially, the effect is being able to use the asynchronous transmitter synchronously.
NewSender
functions include:pause()
isPaused()
resume()
resumeFor(int)
getResumedRemaining()
isTransmitting()
onDoneTransmitting
- Two examples that show how to send SIP packets using synchronous transmission:
SIPSenderAsync
andSIPSenderSync
.
Changed
- The receiver no longer keeps packet data if it's followed by a framing error having non-zero data. Framing errors are used to detect BREAKs and must consist of all zeros in order for it to be considered a valid BREAK. This choice was made because the condition may indicate corrupt data.
See: BREAK timing at the receiver - Reduced the amount of duplicated code in the UART transmit and receive ISRs via macros.
- Internally, when
Sender
needs to disable interrupts, only the UART interrupts are disabled for the required duration. This change is similar to the change made in the previous release forReceiver::readPacket
. - Updated
keywords.txt
. - Now allowing packet sizes less than 25 (i.e. less than 24 channels) in
Sender::setPacketSize
.
Fixed
- UARTs 2 and above (Serial3 and above) were not correctly detecting BREAKs because the framing error detection appeared to be overidden by the other receive routines. This was fixed by increasing the priority of the framing error interrupts to one greater than the priority of the status interrupts.
- Sending via UARTs having FIFOs now works correctly with transmission-complete timing.
Sender::completePacket()
is now called at the correct place.
2.4.0
Added
- A basic main program so that it's easy to compile the project.
- Support for Teensy 3.6's LPUART0 (Serial6).
- Support for Teensy LC.
- The ability to change the transmit refresh rate, via
Sender::setRefreshRate
.
Changed
- Reading from a packet via
Receiver::readPacket
no longer disables all interrupts. Only the serial interrupts are disabled. - The
TeensyDMX
constructor and destructor are nowprotected
. - BREAK/Mark-After-Break timing changed from 108us/12us to 180us/20us. This more closely matches the "typical" DMX BREAK timing specified in the DMX specification (ANSI E1.11).
- Some function and README documentation updates.
- Moved the
kMaxDMXPacketTime
constant intoReceiver
.
Fixed
- Added some missing disable-interrupt cases to
Sender::end()
.
2.3.2
Changed
- Chaser.ino and Flasher.ino examples now properly wait for the serial monitor at program start. The baud was also changed to 115200.
- Changed print interval in Flasher.ino to 1000ms.
- Slightly optimized the Flasher.ino wave calculation.
2.3.1
Added
- Added a CHANGELOG.
Changed
- Updated the keywords.txt file.
2.3.0
Fixed
- Better handling for packet boundaries and timeouts.