Posted on Leave a comment

RaceCapture/Pro 2.8.5 release – Love for LUA and MK1

Its time… time for another firmware release. 2.8.5 is now available and is packed with improvements crafted with love, for you, the user. This release includes fixes all over the board, but primarily focuses on Lua and MK1.

Lua Love

Lua is our workhorse on RaceCapture, allowing you to customize the units behavior without having to be a firmware programmer. For those unfamiliar with Lua, here are some examples of what you can do. In this release we fixed the Lua libraries in MK2 so methods like math.sin() now work properly. We also increased the maximum Lua script size on MK2 to 16K (up from 10K). But most importantly, we have worked hard to stabilize the Lua run time by adding better memory management. This means that Lua can no longer crash the firmware by consuming too much memory (a problem that has previously plagued users). If Lua’s memory footprint gets too big, we simply reset Lua, leaving the rest of the system alone. This dramatically improves the stability of the system and prevents run-away scripts from causing crashes. We also added a new Lua bypass handle for dealing with crash scenarios. If Lua is causing a system reset, you can bypass it by pressing the front button when the red light is flashing during the first five seconds of start up on RCP. This allows you to get your system back to a working state quickly in the event of failure without having to reset or reflash it. But with any luck, you won’t need that feature.

MK1 Love

As new features get introduced, more and more RAM gets consumed. Its inevitable really. Unfortunately for MK1, this was a problem as its limited RAM size was leading to instability in the field. Users told us, and we listened. This release includes a nice set of features to recover more RAM during certain memory hungry operations. This in turn fixes all the configuration update issues reported in the field. Configuration updates should be smooth and flawless again. We also increased buffers and stack sizes where appropriate to eliminate a few overrun issues we saw under heavy load testing. As a result, MK1 is now much happier and is more stable.

Special note for MK1 users: The stability improvements requires that we factory reset the Lua script inside your unit. Please back-up and save your configuration before upgrading firmware. You’ll be able to restore it after the upgrade.

Minor Fixes

This release also includes a couple of minor fixes, including a fix for removing OBI-II channels in the log when OBD-II sampling is disabled, and fixing a sector issue while users were at the start/finish line.

Real World Testing

Testing has become a high priority as part of our releases, and this release was no exceptions. As part of this release, we recruited two Lemons teams to help out and verify that our units were working in the field. Both Team Sheen and Turtle Head Racing ran the release candidate builds of the firmware at the 24 Hours of Lemons Race in Joliet on October 10th and 11th. We did this prior to this release to ensure everything was stable and to flush out any bugs that might appear in the field. In both cases, we saw uptimes consistently over 120 minutes (at which point the teams would have to come in to fuel, and would hence shut off the unit), thus validating that the firmware was stable and ready.

Full Change Log

* Increased GPS task stack size from 200 to 256 to prevent HULK smash.
* Increased printing precision in Lua from 3 to 6 decimal places (as needed).
* Fixed a bug in Lua libraries.  Now functions like `math.sin()` no longer
cause the interpreter to crash.
* Prevent OBD-II channels from being included if OBD-II is disabled
* Expanded track detection radius from 1 KM to 5 KM to handle cases when users are
pitted far away from start/finish
* Release more RAM up by disabling Lua prior to flashing script.  This fixes
many MK1 issues reported by customers when resetting or programming Lua.
* Fix intermittent hang due to USART receive overflow interrupt storm
* Add in Lua garbage collection parameters to help Lua work in high
memory pressure situations
* Reduce max Lua script size on MK1 to 4K for stability reasons and increased
max script size on MK2 to 16K.  This will result in the Lua script being
restored to the default.  Please back up your scripts prior to upgrading.
* Fix sector bug with no sector definitions.  Now sectors will not arbitrarily
count up.

Enjoy! And send us your feedback. We would love to hear from you.

Leave a Reply

Your email address will not be published. Required fields are marked *