FreeEMS-Tuner Development Diary - Don't Post!

Aaron Barnes' wxPython based FreeEMS tuning tool. No longer maintained and out of date with the protocol requirements.
Post Reply
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Depreciated lol
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by Fred »

Well, it wasn't un-true as such LOL.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Ported "memory utility" and "real time data" tabs to the new code base. After a few more tidy ups to that code and after I get logging running properly I will merge it back into the master branch :mrgreen:

I have also been working on the comms test framework so I can throw all sorts of bad data at the receive thread and test that it will behave as expected.

My current ideas for testing are:
  • The test comms plugin will take the raw packets sent to it and reparse them back into classes as another test to make sure my code works as expected and the correct bytes are sent out.
  • The test comms plugin will "reply" to sent packets with their appropriate responses defined in the protocol
  • The test framework will create a second comms connection using the test plugin (I added support for multiple comms connections when I moved to threaded code) and will send packets to both comms connections to compare the real responses with the expected response. This will be good for making sure Fred's code is bug free also
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Change has come to ame..... the tuner!!

Just pushed a big update.

New stuff:
  • Native wxPython events now used for updating the gui. We should be completely thread safe now!! *touch wood*
  • Added correct response packets for the Test comms plugin. Rather than mirroring packets back, it now creates the correct response packets. They are then decoded again by the receive code so we have some nice checking going on of my code.
  • Right after adding the above, I found a whole heap of escaping/checksumming errors that are now fixed!
This latest release should be ready for Fred to speed test. It only logs unknown/unsupported packets to the diagnostics grid. This is the only hinderance to performance I can think of compared to a real life situation as updating that grid is quite cpu intensive. Maybe I will need to add his datalog packets to the supported list for a real test?
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by Fred »

I'm in your thread posting! LOLcats SUCK!
sry_not4sale wrote:This latest release should be ready for Fred to speed test.
Hang on a second!! Why aren't you testing this yourself? Best you crack out a soldering iron ;-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

I am pretty confident now that this code is alot better than before, and should handle the constant data log packet stream without dying a miserable death :)

So waiting for Fred to come online and test ;)

The tuner treats protocol and firmware type packets the same currently (so packet names might be off). I don't think it is worth fixing this when next week Fred is going to reorganise the payload ids in an effort to remove this distinction.

Latest round of changes:
  • Added toBinaryString() utility function
  • Added support for basic datalogs (support being not to treat them as unknown :P)
  • Removed unnessary debug messages and improved others
  • Added toHexString() utility function
  • Simplified/improved receive buffer parsing code
  • Removed some now unneccesary log messages
  • More received code optimizations including moving code to more appropriate threads
  • Sped up receive code response time but changing sleep time between actions to 1/10th a second
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Fred tested this earlier today, and it seems to keep up with the datalogs alot easier now. Just have some checksum errors occurring and also alot of cpu usage.
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Some more stuff to improve debugging and stability :)
  • Added _error() method to threads for logging error messages
  • Updated received packet parsing code to use exceptions and handle errors
    gracefully. By gracefully I mean log the bad packet/data and only remove the bad data from the buffer before continuing.
  • Hack to work around firmware/protocol packets, and readded log messages
    now that firmware packets will be being parsed properly
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Merged with head :O
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
sry_not4sale
LQFP144 - On Top Of The Game
Posts: 568
Joined: Mon Mar 31, 2008 12:47 am
Location: New Zealand, land of the long white burnout
Contact:

Re: FreeEMS-Tuner Development Diary - Don't Post!

Post by sry_not4sale »

Cherry-picked Fred's old commits, and merged with his thread to give them a common history.

You also now have authority in my repo Fred :)
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
Post Reply