After several iterations of modifying lua scripts I will eventually get the following error:
lua: Failed to allocate memory for script buffer.
When this error pops up the RCP gets very unstable and has to be hard-reset. Usually I would expect this error would happen with a lua script that is too long. However, even with lua scripts that I *know* have worked before and also tried examples from the wiki.
So, naturally, I went to do a resetConfig over the TTY (which usually fixes any bad state with RCP). And I get the following error when doing resetConfig:
Code: Select all
0 [email protected] ~$ sudo miniterm.py /dev/ttyACM0 115200 --- Miniterm on /dev/ttyACM0 115200,8,N,1 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- ============================================= Welcome to RaceCapture/Pro MK3 version 2.12.0 ============================================= Available Commands: resetConfig : Resets All configuration Data to factory default Usage: resetConfig testSD : Test Write to SD card. Usage: testSD <lineWrites> <periodicFlush> <quietMode> startTerminal : Starts a debugging terminal session on the specified port. Usage: startTerminal <port> <baud> [echo 1|0] setLogLevel : Sets the log level Usage: setLogLevel <level> logGpsData : Enables logging of raw GPS data from the GPS Mouse Usage: logGpsData <1|0> viewLog : Prints out logging messages to the terminal as they happen Usage: viewLog setSerialLog : Enables/disables logging of serial device for debug purposes Usage: setSerialLog <port> <0|1> flashConfig : Flashes the NVRAM with the current configuration of the LoggerConfig Usage: flashConfig showTasks : Show status of running tasks Usage: showTasks version : Gets the version numbers Usage: version showStats : Info on system statistics. Usage: showStats sysReset : Reset the system Usage: sysReset [bootloader 0|1] lua : Enter the lua script interpreter. Usage: lua reloadScript : Reloads the current script. Usage: reloadScript RaceCapture/Pro MK3 > resetConfig Flashing Default Logger Config: PASS Flashing Default Script: FAILED <<<<< UH OH?!? Flashing Default Tracks: PASS
Now when I go in through the RCP App interface and delete the script, then do a resetConfig it works.
I guess my ultimate question is now that the interface supports CAN Mapping, is there any reason to be using the E46 Lua script on the wiki? Is the built-in CAN mapping feature going to be more stable than the lua script method?