- new: make
Jled::Update(unit32_t t)
public, allowing optimizations and simplified tests
- fix:
Update()
sometimes returning wrong state (#122)
- new:
Stop()
takes optional parameter allowing to turn LED fully off
- fix:
JLedSequence
starting again after call toStop
(#115)
- fix: add missing keywords to keywords.txt
- new: add
MinBrightness
method and scale output to interval defined byMinBrightness
andMaxBrightness
.
- improve: reduce memory consumption of JLed objects by 3 bytes, simplify state management.
- change:
JLedSequence
objects are now assignable, making switching effects easier. See https://github.com/jandelgado/jled-example-switch-sequence for an example.
- new:
On
,Off
andSet
now take an optionalduration
value, making these effects behave like any other in this regard. This allows to add anOn
effect to aJLedSequence
for a specific amount of time.
- fix: make sure JLedSequence methods like
Repeat
andForever
are chainable like in theJLed
class
- new: support ESP-IDF platform for the ESP32 (#87, thanks to @troky for the initial work). See also repositories https://github.com/jandelgado/jled-esp-idf-example and https://github.com/jandelgado/jled-esp-idf-platformio-example
- new: make
Breathe
method more flexible (#78, thanks to @boraozgen)
- fix: correct handling of time rollover (#80, thanks to @boraozgen)
- new: support for Raspberry Pi Pico added
- fix:
Forever()
on sequence had no effect (#68)
- new: JLedSequence can be configured to play the sequence multiple times
using the
Repeat()
andForever()
methods - drop travis-ci, use github actions
- fix: ESP32 led glimming when using low-active connection (#60)
- fix: support for Nano 33 BLE (#53)
- new:
JLed::MaxBrightness(uint8_t level)
method to limit output of effects (implements #43).
- JLed now supports the mbed framework. See README.md and
examples/multiled_mbed
for examples.
- new example: custom HAL showing how to implment a custom HAL.
- fix: make sure memory alignment is correct (caused hard fault on SAMD21). Fixes #27.
- changing an effect resets the Jled object so it starts over with the
new effect (see #25). Prior to this change, calling
Reset()
was necessary.
- fix: ESP32 dynamic channel assignment fixed. Sequence demo now working as expected (see #22).
- fix: version format in library.properties (removed leading
v
; see #21)
- change: clean up interface and simplify code:
On()
no longer takes an optional brightness argument. CallSet(uint8_t brightness)
instead. - documentation update
In addition to the changes introduced with v4.0.0-rc0
and v4.0.0-rc1
, the
v4.0.0
relases adds/changes the following:
- new
Candle()
effect added for candles and fire like effects
- The user provided brightness class no longer needs a
Clone()
method. See example for an example
- Makefile (unit testing) dependency checking fixed
- fix: byte buffer alignment for ESP8266 set to DWORD boundary making ESP8266 run again with JLed 4.x
- arduino HAL now does lazy call to pinMode() to prevent STM32 problems
- simplified morse example code
JLed::Reset()
- resets the led to it's initial state allowing to to start overJLed::IsRunning()
- return true if effect is active, else false- new class
JLedSequence
to update JLed objects simultanously or sequentially. See README for details. - added new morse example
- clean separation between hardware specific and common code, making extendability easy
- added STM32 example to platformio.ini
- the brightness user function pointer was replaced by an object of type BrightnessEvaluator. Migration of code should be straight forward, see below
In JLed version prio to version 4.0.0, a function pointer was used to specify a user provided brightness function.
// this function returns changes between 0 and 255 and vice versa every 250 ms.
uint8_t blinkFunc(uint32_t t, uint16_t, uintptr_t) {
return 255*((t/250)%2);
}
// Run blinkUserFunc for 5000ms
JLed led = JLed(LED_BUILTIN).UserFunc(blinkFunc, 5000);
The user function is replaced by a class, which provides more flexibility:
class UserEffect : public jled::BrightnessEvaluator {
uint8_t Eval(uint32_t t) const {
// this function returns changes between 0 and 255 and
// vice versa every 250 ms.
return 255*((t/250)%2);
}
uint16_t Period() const { return 5000; }
};
UserEffect userEffect;
JLed led = JLed(LED_BUILTIN).UserFunc(&userEffect);
JLed::Invert()
method was removed since became redundant with LowActive()
- Major refactoring making support of different platforms easier
- ESP32 support added
- Unit tests refactored
JLed::Update()
now returns abool
indicating if the effect is still active (true), or finished (false).
- ESP8266 platform: scaling from 8 to 10 bit improved. The scaling makes sure that 0 is mapped to 0 and 255 is mapped to 1023, preserving min/max relationships in both ranges.
- ESP8266 platform: analogWrite() resoultion of 10 bit is now honoured. Previously only a range of 0..255 was used, which resulted in output being dimmed.
- It's never to late for a changelog ;)
- ESP8266 environment added to platform.ini