View unanswered posts | View active topics It is currently Sun Nov 17, 2019 10:55 am



Reply to topic  [ 84 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
FreeEMS-Tuner Development Diary - Don't Post! 
Author Message
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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).

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Fri Sep 04, 2009 10:45 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
Had a tinker with Link's latest tuning software... got some ideas :)

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Tue Sep 08, 2009 10:38 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Fri Sep 18, 2009 3:48 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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.

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Mon Sep 21, 2009 1:23 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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.

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Mon Sep 28, 2009 3:18 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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.

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Sat Oct 03, 2009 2:08 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Sat Oct 03, 2009 3:17 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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!

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Wed Oct 21, 2009 10:32 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Mar 31, 2008 12:47 am
Posts: 568
Location: New Zealand, land of the long white burnout
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

_________________
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82


Mon Nov 02, 2009 11:10 am
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15342
Location: Home sweet home!
Keep up the good work man! I really appreciate your efforts!! We're on the home straight now, for sure :-)

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!


Wed Nov 04, 2009 1:26 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 84 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.