Sorry for the dumb question, but I can't find where my print statements in Lua are being logged to. I see them in the scripting part of the RCP app (you really need to make the script section of that scroll BTW). But they aren't being written to my SD card AFAIK.
I'm trying to log a bunch of raw CAN data and then import it into a spreadsheet along with the ECU data to figure out which channel is which.
Thanks in advance for any pointers.
Where is the log file that Lua prints to?
Where is the log file that Lua prints to?
Spec Racer Ford #40
You can hook up a USB cable to your PC and run a terminal program on the serial port (115200 baud). Hit enter to get a menu of commands; type viewLog to get a running scrolling log of whatever's happening in your script. Here's some of my capture of the CAN dump script, listening to Megasquirt broadcasting.
Code: Select all
RaceCapture/Pro > viewLog
Starting logging mode. Hit "q" to exit
.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 216.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 216.0, 0.0, 0.0, 3.0, 213.0, 255.0, 254.0, 1516.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1512.0, 3.0, 215.0, 0.0, 0.0, 3.0, 213.0,
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Use device manager to see what COM port the RCP appears on.. I use PuTTY as my terminal program (also good for telnet/ssh work) http://www.chiark.greenend.org.uk/~sgta ... nload.html then just tell it serial port, set baud at 115200, and it should work.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Yep, did all that with Indigo and it seemed to start up a session but getting no data back from viewLog. Will try putty to see if that works better.
Thanks so much for the pointers!
In the mean time, I think I figured out the RPM channel. The CAN IDs that the EC2 is emitting don't match what is in their documentation, and I get a lot of IDs, not just one, when I turn on that one channel at the ECU.
Thanks so much for the pointers!
In the mean time, I think I figured out the RPM channel. The CAN IDs that the EC2 is emitting don't match what is in their documentation, and I get a lot of IDs, not just one, when I turn on that one channel at the ECU.
Spec Racer Ford #40
Did the command / help menu come up when you hit Enter? That'll confirm the terminal session is working properly. The command parser also doesn't understand backspaces, so if you make a typo in a command (like 'vieLog' instead of 'viewLog') you have to retype it, can't backspace and fix even though it looks right on screen.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
You can also change the log level to limit how much stuff you see. I don't know the default setting, or what I've got mine set to right now...
EMERG = 0,
ALERT = 1,
CRIT = 2,
ERR = 3,
WARNING = 4,
NOTICE = 5,
INFO = 6,
DEBUG = 7,
TRACE = 8
EMERG = 0,
ALERT = 1,
CRIT = 2,
ERR = 3,
WARNING = 4,
NOTICE = 5,
INFO = 6,
DEBUG = 7,
TRACE = 8
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC
Thanks so much for the tips. It seems like the session starts up, but neither "enter" or viewLog produce any output. Will be back on this tomorrow. I was able to sort out RPM mapping using the app, so I might just use the same approach for temp and pressure to get going. I have a race in a week! 😊
Spec Racer Ford #40