Search found 47 matches

by lightningrod
Sat Mar 20, 2021 10:48 pm
Forum: Hardware and Installation
Topic: Using GPIO for Warning lights: Lights remain partially lit
Replies: 8
Views: 5317

Re: Using GPIO for Warning lights: Lights remain partially lit

I know this thread is getting very old, but I just found it as I'm facing the same problem with my mk3. Since it still seems to be unresolved I thought I'd add my solution. My circuit is exactly the same as OPs, but now I have added pull-up resistors across each of my LEDs. 1.9k ohms seems to have d...
by lightningrod
Thu Aug 08, 2019 6:12 pm
Forum: Lua Scripting
Topic: Need Help - Using Channels from AIM SmartyCam CAN
Replies: 8
Views: 2129

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: 1465

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: 1342

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: 1342

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: 2129

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: 2129

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: 2129

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: 998

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: 1342

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: 3021

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: 5187

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: 3021

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: 3021

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: 3021

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...