Skip to content

Releases: ssilverman/TeensyDMX

3.1.1

16 May 08:55
Compare
Choose a tag to compare

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

14 May 16:10
Compare
Choose a tag to compare

Added

  • New Sender::clear() method that sets all the channels to zero.
  • New Sender::breakTime() and Sender::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 or Receiver is stopped, i.e. never started or had its end() method called.
  • Receiver::setConnected wasn't actually changing the internal connected state. The state is now updated correctly so that Receiver::connected() returns the correct value.

3.0.0

18 Feb 19:59
Compare
Choose a tag to compare

Added

  • Two new examples, BasicSend and BasicReceive.

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 to Receiver::setResponder; also changed its behaviour so that setting a responder to nullptr 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 the set functions. Instances of Sender 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 in TeensyDMX.h and the README was updated. The caller can check the ENOMEM condition in errno 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 to Receiver::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

22 Jan 22:45
Compare
Choose a tag to compare

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 to setTXNotRX, in Receiver.
  • Small updates to the examples.
  • Some concurrency improvements.

Fixed

  • ISR-triggering status bits are now cleared properly for Teensy LC.

3.0.0-alpha

29 Nov 08:12
Compare
Choose a tag to compare

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, via onConnectChange.
  • 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 new Responder 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 and TextPacketHandler.

Changed

  • Renamed:
    • Sender::getRefreshRate() to Sender::refreshRate().
    • Sender::getResumedRemaining() to Sender::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 the setup() and loop() definitions in main.cpp from interfering with the Arduino program.
  • Receiver::get now respects the current received packet size and behaves more similarly to Receiver::readPacket.

2.5.0

19 Nov 22:52
Compare
Choose a tag to compare

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.
    New Sender functions include:
    • pause()
    • isPaused()
    • resume()
    • resumeFor(int)
    • getResumedRemaining()
    • isTransmitting()
    • onDoneTransmitting
  • Two examples that show how to send SIP packets using synchronous transmission: SIPSenderAsync and SIPSenderSync.

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 for Receiver::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

13 Nov 07:01
Compare
Choose a tag to compare

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 now protected.
  • 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 into Receiver.

Fixed

  • Added some missing disable-interrupt cases to Sender::end().

2.3.2

02 Nov 01:20
Compare
Choose a tag to compare

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

01 May 16:56
Compare
Choose a tag to compare

Added

  • Added a CHANGELOG.

Changed

  • Updated the keywords.txt file.

2.3.0

28 Feb 20:52
Compare
Choose a tag to compare

Fixed

  • Better handling for packet boundaries and timeouts.