# Firmware 2.1.4

**URL:** <https://forum.electra.one/t/firmware-2-1-4/1141>\
**Category:** Releases\
**Created:** [November 25, 2021, 10:37pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141 "2021-11-25T22:37:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 25, 2021, 10:37pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141/1 "2021-11-25T22:37:58Z")

</div>

The firmware 2.1.4 is available for the download.

The firmware is available on the [Downloads page](https://docs.electra.one/downloads/firmware.html).

This release brings number of fixes and improvements of Lua extension. The memory management of Lua Extension has been improved and functions to switch pages and control sets has been added.

**Changelog** :

- Trim the label if the width of the label is bigger than the width of the pad. (reported by @RobinC)
- Fix the issue of the pitchbend range. The value is now bipolar (-8192 … 8191). (reported by @petruccigp)
- Add Lua functions for switching pages and control sets ([Pages functions](https://docs.electra.one/developers/luaext.html#pages))
- Call Lua functions only when pad’s on or off value is defined (requested by @oldgearguy)
- Improve Lua script garbage collection. Memory is now freed automatically. (reported by @Flyweight and @oldgearguy)
- Lower memory requirements of Lua function storage.
- Fix issue of backlight going completely dark on hw 2.4. The range of the slider is still not 100% accurate on 2.4 but it does not allow the screen to go completely dark. (@jan)

An example preset of page switching with Lua is available at [Page switching demo](https://app.electra.one/preset/SsyU03QbnNjwxXDSyYF0).

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 25, 2021, 10:38pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141/2 "2021-11-25T22:38:23Z")

</div>



---

<div class="post-metadata">

**Author:** ![scottmoon](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/scottmoon/32/611_2.png) [@scottmoon](https://forum.electra.one/u/scottmoon)\
**Post date:** [November 26, 2021, 6:56am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/3 "2021-11-26T06:56:11Z")

</div>

I’m still seeing 2.1.3 on the Download Page. Am I missing something?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 26, 2021, 6:59am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/4 "2021-11-26T06:59:56Z")

</div>

hmm, just checked that, it looks ok on my side:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/1X/7695b5e7d9c873d404093e6dd9f9e795e4198a4f.jpeg)

Maybe you have the page cached or something?

---

<div class="post-metadata">

**Author:** ![scottmoon](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/scottmoon/32/611_2.png) [@scottmoon](https://forum.electra.one/u/scottmoon)\
**Post date:** [November 26, 2021, 3:58pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141/5 "2021-11-26T15:58:28Z")

</div>

Sorry. My browser wasn’t updating the page. Reloaded and I see it now. Thanks.

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 28, 2021, 12:02pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141/6 "2021-11-28T12:02:36Z")

</div>

BUTTON\_1 to BUTTON\_6 are no longer defined constants?  
No big deal since I was mainly concerned with the Patch Request button and that is still identifiable as PATCH\_REQUEST

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 29, 2021, 7:51am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/7 "2021-11-29T07:51:52Z")

</div>

just checked that, I can see the constants are present and I can use them. Well, I verified that with

```auto
print("button: " .. BUTTON_1)
print("button: " .. BUTTON_6)

```

giving me …

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/1X/8d351bf6d3a3044097df8317b091f517a0d41426.jpeg)

What error do you get and when? Thx!

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 29, 2021, 10:25am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/8 "2021-11-29T10:25:57Z")

</div>

I was using a conditional in the patch.onRequest() method to see if it was because BUTTON\_4 was pressed and that test was always failing.

```auto
if (buttonId == BUTTON_4) then

```

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [November 29, 2021, 10:27am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/9 "2021-11-29T10:27:45Z")

</div>

And do you get an error message in the log or something like that?

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 29, 2021, 10:33am UTC](https://forum.electra.one/t/firmware-2-1-4/1141/10 "2021-11-29T10:33:07Z")

</div>

oh, you want me to actually do serious development and check log files??? lol

I didn’t look. I’ll have time later today to plug that code back in and see what is in the log file.  
From the execution path, it appeared that the check was never succeeding.

---

<div class="post-metadata">

**Author:** ![oldgearguy](https://avatars.discourse-cdn.com/v4/letter/o/f4b2a3/32.png) [@oldgearguy](https://forum.electra.one/u/oldgearguy)\
**Post date:** [November 29, 2021, 8:45pm UTC](https://forum.electra.one/t/firmware-2-1-4/1141/11 "2021-11-29T20:45:34Z")

</div>

well yeah, I guess it’s a(nother) misunderstanding on my part.  
Based on the docs, I assumed onButtonDown() was a built in function that was invoked every time a button was pressed.

Apparently it is not. Therefore the variable was never being set therefore it never matched BUTTON\_4.

Are there built-in callbacks for buttons/pots/screen touches?
