Page 8 of 9

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

Posted: Fri Sep 04, 2009 10:45 am
by sry_not4sale
Code to decode and display datalog packets in realtime interface:
721dc65ef0cb41c4b38a4b4e6e9e34b65e783409

All data is assumed to be an unsigned int, is displayed raw and unprocessed (except for averaging the two values received).

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

Posted: Tue Sep 08, 2009 10:38 am
by sry_not4sale
Had a tinker with Link's latest tuning software... got some ideas :)

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

Posted: Fri Sep 18, 2009 3:48 am
by sry_not4sale
Did some work on some serial issues, not sure if they are restricted to the way Fred stuff has stuff set up or not. Will have to get my board running to see!

Also, been working on data logging - seems the bug in the tracker was a bit out-of-date, so fixing the code will be tonights job!

New data log spec:
http://tuner.freeems.org/ticket/7

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

Posted: Mon Sep 21, 2009 1:23 am
by sry_not4sale
Datalogging now works with the lastest firmware code!

Also made leaps and bounds on the table tuning code - should load from the ecu and display in the grid soon! Updating cells is then a trivial patch.

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

Posted: Mon Sep 28, 2009 3:18 am
by sry_not4sale
Finally managed to push my latest changes to github.

Double start and end bytes caused by a bug in the firmware now are ignored by the Tuner - so now for the first time the Tuner processes streaming data logs over serial with no errors :D All packets decode without issue!

Also, I have improved the real time data tab to format values in a more user readable manner.

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

Posted: Sat Oct 03, 2009 2:08 am
by sry_not4sale
Got some important bugs fixed over the last few days...

The comms File based input plug-in now splits the input file into chunks, and sleeps between each to better replicate a real Serial connection. (The sleeps also prevent it saturating your cpu)

Fixed a pesky bug in the receive code which was causing the thread to lose part packets (the _process() method was reseting the serial cache after it had found all complete packets).

Made any modifying of the serial cache locked so it is absolutely thread safe.

Fixed a crash on empty packets (e.g. start byte followed by an end byte).

Now we have an issue with the gui thread not being able to keep up with the serial data, and because of this the gui updates get backed up. I am going to change the logic so the gui is updated x times a second with the latest data, which should fix this.

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

Posted: Sat Oct 03, 2009 3:17 am
by sry_not4sale
Sooo....

Lots of empty packets happening due to the double start/end bytes bug, so changed the exception type to IgnorableParsingException - so they aren't logged.

Also, added a timer to the realtime vars gui - hope this fixes your problems fred! It will now only update the gui every x milliseconds, and only if a datalog packet has been received since the last update. Default is every 1/10 a second, but it is configurable in the config file (check your config.default.ini file for details).

Currently the gui thread is handling both the data log packet parsing, and the updating of the gui. I need to either setup worker threads to offload the parsing to, or move this into the receive thread as it is pretty low-level stuff. Either way I need to get it out of the gui code, and into something more comms orientated - as this data won't just be used in the tab.

Added support for bootstrap files, simply add one called bootstrap.py - and it will be called on startup before anything else.

And lastly, (hopefully) fixed the Windows bug walkercam found with Windows serial port identifiers - wonder if he can confirm it's fixed for me? :D

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

Posted: Wed Oct 21, 2009 10:32 pm
by sry_not4sale
Just uploaded working code for loading a table and displaying it in the tuning table :D

Have some value displaying tweaks to make, but it works!

Cell updating in the next day or two.

Cheers!

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

Posted: Mon Nov 02, 2009 11:10 am
by sry_not4sale
After some battling with wxPython to get currently selected cell information, and some toing-and-froing - we have cell tuning!

You can now select a cell, and using the j/k keys - decrement/increment the cell's value. Each time the cell is updated a packet is sent to the ecu updating the table cell stored in ram.

The cells are set read-only, as I could not get a handle on the wxpython cell editors. But the j/k keys update and refresh the displayed values so that is fine for now.

I think I will update the code so that after 500milliseconds of no adjustments, it sends the new value to the ecu. Or something similar, cos it is going to be sending a lot of packets.

Also, the datalogging backend requires a bit of a rewrite. It needs to live somewhere other than the gui thread, and needs to be a bit more low-level in the protocol code so I can use it do highlight the current cell in the tuning table.

Latest code:
http://github.com/srynot4sale/freeems-t ... s/devtrunk

Or get notified of commits via twitter!
http://twitter.com/FreeEmsTuner

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

Posted: Wed Nov 04, 2009 1:26 am
by Fred
Keep up the good work man! I really appreciate your efforts!! We're on the home straight now, for sure :-)

Fred.