Search found 46 matches

by lightningrod
Thu Aug 08, 2019 6:12 pm
Forum: Lua Scripting
Topic: Need Help - Using Channels from AIM SmartyCam CAN
Replies: 8
Views: 1762

I'm glad you got it figured out. I'm curious as what the issue is with printing from within that loop.
by lightningrod
Thu Aug 08, 2019 4:31 pm
Forum: Hardware and Installation
Topic: Amazon Fire and OTG
Replies: 3
Views: 1263

I have this cable. It works perfectly with an old Nexus 5 (not rooted).

https://www.amazon.com/gp/product/B01KG ... UTF8&psc=1
by lightningrod
Fri Jul 05, 2019 1:01 am
Forum: Lua Scripting
Topic: Can't "Run" my script
Replies: 3
Views: 1152

FWIW: this script still exhibits the same symptoms under 2.17.1.
by lightningrod
Sun Jun 30, 2019 5:36 am
Forum: Lua Scripting
Topic: Can't "Run" my script
Replies: 3
Views: 1152

The following script exhibits the symptoms under 2.16.0 r1=0 r2=0 function ah() local r0=r1 r1=r2 r2=r1+(getChannel("RPM")/60-r0)/2 return r2 end a1=0 a2=0 function ai() local a0=a1 a1=a2 a2=a1+(-getImu(0)-a0)/2 return a2 end function u() ret=g...
by lightningrod
Fri Jun 21, 2019 4:10 am
Forum: Lua Scripting
Topic: Need Help - Using Channels from AIM SmartyCam CAN
Replies: 8
Views: 1762

There is a step where you supply a (unique) name for your channel. I'd be surprised if you can't access it via that name.
by lightningrod
Fri Jun 21, 2019 3:13 am
Forum: Lua Scripting
Topic: Need Help - Using Channels from AIM SmartyCam CAN
Replies: 8
Views: 1762

It looks like the recommended way of handling this is to set the CAN channels up through the RCP app and save the configuration there. That will offload the reading of the CAN bus data stream to the firmware rather than doing it in lua. Then you won't need the processCAN function in your onTick func...
by lightningrod
Thu Jun 20, 2019 4:59 pm
Forum: Lua Scripting
Topic: Need Help - Using Channels from AIM SmartyCam CAN
Replies: 8
Views: 1762

I haven't got any experience with the AIM SmartyCam but just looking at this code, I'm guessing that when the car is on you're getting a steady steam of CAN signals, which is causing it to stay in the ProcessCAN function for a long time. That function only appears to return when there is no more dat...
by lightningrod
Sun Jun 09, 2019 2:38 am
Forum: Lua Scripting
Topic: sxSetConfig arg 6 is bool
Replies: 1
Views: 850

sxSetConfig arg 6 is bool

Documentation says:
[arg6]: Enable / Disable button events: 0 (Enable button event broadcast to app); 1 (Disable button event broadcast to app)

actually needs true or false.
by lightningrod
Fri Jun 07, 2019 7:39 pm
Forum: Lua Scripting
Topic: Can't "Run" my script
Replies: 3
Views: 1152

Can't "Run" my script

I have a script that clearly is very close to the memory limit. It runs fine on power up. It also runs immediately after being written, however if I try to restart it with the app's "Run" button lua fails to restart with the following messages: [lua] Successfully loaded script. [lua] Gracefully stop...
by lightningrod
Wed Jun 05, 2019 4:29 am
Forum: Lua Scripting
Topic: Can't recover from out of memory
Replies: 15
Views: 2562

This probably belongs on a different thread at this point - I think we're looking at 2 bugs here: the first bug is that a lua script can cause corruption. The second bug is that the factory reset doesn't clear the script partition. Looking at the firmware code below and doing a little googling, it a...
by lightningrod
Sun Jun 02, 2019 5:19 am
Forum: Lua Scripting
Topic: Innovate Serial protocol
Replies: 7
Views: 4881

After wrestling with memory issue while trying to integrate this module with some others, here is a slimmed down version. I apologise for the loss in legibility, but the memory footprint reduction is significant over the previous listing. The original was 2500 bytes (1350 after lua minifier). This v...
by lightningrod
Sat Jun 01, 2019 1:23 am
Forum: Lua Scripting
Topic: Can't recover from out of memory
Replies: 15
Views: 2562

I now have a couple of weeks before I'm on track again. So before I go up/down grading random firmware versions, I will leave it in this state if you like, so that I can help debug this (or you can help me). I'd rather get a longterm fix than to just keep "upgrading" firmware.
by lightningrod
Sat Jun 01, 2019 1:17 am
Forum: Lua Scripting
Topic: Can't recover from out of memory
Replies: 15
Views: 2562

Here is the output from my attempt to do a factory reset (resetConfig). Note the "Flashing Default Script: FAILED" line. cu -l /dev/ttyACM1 Connected. ============================================= Welcome to RaceCapture/Pro MK3 version 2.16.0 ============================================= Available C...
by lightningrod
Sat Jun 01, 2019 1:13 am
Forum: Lua Scripting
Topic: Can't recover from out of memory
Replies: 15
Views: 2562

Here is the script that now refuses to be overwritten: _c="count" lastRPM=0 rpmInc=false function isWOT() if(-getImu(0))>0.06 then local ay=getImu(1) if ay*ay<0.01 then return true end end local ret=false if getGpsSpeed()<5.0 then local rpm=getChannel("RPM...
by lightningrod
Sat Jun 01, 2019 12:58 am
Forum: Lua Scripting
Topic: Can't recover from out of memory
Replies: 15
Views: 2562

Nice. I managed to find my way back into the firmware page. (It should not require a config file to access this). And it went smoothly back to 2.16 I should have thought to save the script for you. If it happens again. I will make a copy. My recollection is that seemed to contain a mix of 2 differen...