file log = new file("data/app.log");
String suffix = log.getLastModifiedTime();
log.rename(log.name + suffix + ".log");
log.write a stack of messages now
:-)
or maybe just time stamp them each time you write one? that makes a lot more sense
Does the ecu only create log messages when a serial connection is made? Does the state of datalogging reset to none when a serial connection is detached?
Is there a packet I can send to see the datalogging status?
e.g. can I assume that when the tuner first connects that datalogging will be turned off?
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
* No, any time async is turned on.
* No, the ECU has no idea whether or not there is someone listening and will just do what it is configured to do, be quiet, or spew logs.
* Yes, but I forget which one. I can find out for you if you like.
* No, this is a bad assumption to make.
My turn! :-)
* Do these questions mean you have your board up and running?
* Why do you care what it is doing datalog wise?
* No, any time async is turned on.
* No, the ECU has no idea whether or not there is someone listening and will just do what it is configured to do, be quiet, or spew logs.
* Yes, but I forget which one. I can find out for you if you like.
* No, this is a bad assumption to make.
My turn!
* Do these questions mean you have your board up and running?
* Why do you care what it is doing datalog wise?
Fred.
Thanks
No, it is not up and running yet, but I am getting back into writing code for the tuner.
I'll have a look for the datalog status packet
Cheers
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
/* Datalog request packets */
#define requestBasicDatalog 400
#define responseBasicDatalog 401 /* Defined because it can be used both synchronously and asynchronously */
#define requestConfigurableDatalog 402
#define responseConfigurableDatalog 403 /* Defined because it can be used both synchronously and asynchronously */
#define setAsyncDatalogType 404
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
Shows how unsuitably tired I was last night... I went looking through the switch statement instead of checking the header first... lol. As promised, will attempt to do something on this later today.
Also read up about a much nicer (and looks to be better performing) method of processing frames in binary streams in Python! Will start a thread about it soon, although I think some comprehensive test coverage of the existing serial processing code is in order first.
I second that, and although it IS an issue speed wise, perhaps the practical stuff like table read/write/burn and real time display are more important right now? time frames are suddenly very short ;-)