Ben's messing aroung with FreeEMS-Tuner code

Aaron Barnes' wxPython based FreeEMS tuning tool. No longer maintained and out of date with the protocol requirements.
User avatar
BenFenner
LQFP144 - On Top Of The Game
Posts: 360
Joined: Wed Jul 09, 2008 3:15 pm

Re: Ben's messing around with FreeEMS-Tuner

Post by BenFenner »

Okay I got the payload hex display thingy finished. I'm going to try and figure out how to post the code using git tonight. For now you get a screen shot and the file sin *.zip form.

Changed files:
gui/commsDiagnostics.py
protocols/FreeEMS_Vanilla/0_0_17.py

I used extra data to simulate that screen shot. You're not going to be able to reproduce the screen shot taken below. Characters that don't translate to ASCII are displayed as an underscore. Hex rows are padded with asterisks.

Edit: Oh, the code is really bad by the way. I'm still learning Python and I know a lot of it could be cleaner. Aaron, do what ever clean-up you'd like.
Attachments
Files.zip
(5.17 KiB) Downloaded 520 times
HexDisplay.png
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Ben's messing around with FreeEMS-Tuner

Post by Fred »

Don't be afraid to make it all a bit wider as this is just a debug tab at the end of the day anyway.

What I was trying to say is this :

Code: Select all

IsProto : 0
HasAck : 0
HasLength : 1
HasAddrs : 0
IsNack : 0
spare1 : 0
spare2 : 1
spare3 : 0
In the flags column instead of the value 17 which is meaningless even to me and I set the flags up 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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Ben's messing around with FreeEMS-Tuner

Post by Fred »

Perhaps upper case ON and OFF or YES and NO instead? or perhaps 0 and 1 are best :-)
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: Ben's messing around with FreeEMS-Tuner

Post by sry_not4sale »

Good stuff ben :mrgreen:
Owner / Builder: 1983 Mazda Cosmo 12at (1200cc 2-rotor turbo) coupe [SPASTK]
165hp @ 6psi standard - fastest production car in japan Oct 82
User avatar
BenFenner
LQFP144 - On Top Of The Game
Posts: 360
Joined: Wed Jul 09, 2008 3:15 pm

Re: Ben's messing around with FreeEMS-Tuner

Post by BenFenner »

sry_not4sale wrote:Good stuff ben :mrgreen:
You say that now. Then you take a look at the source. =P

Edit: By the way, it looks like I started with some older code, so be careful merging my stuff in with yours if you do it manually. I'll try to update my repository and then push the changes later on. We'll see how it goes.
User avatar
BenFenner
LQFP144 - On Top Of The Game
Posts: 360
Joined: Wed Jul 09, 2008 3:15 pm

Re: Ben's messing around with FreeEMS-Tuner

Post by BenFenner »

Committed the changes to my repository. Tried to push the changes with no luck.

Can you not "pull" from me? Isn't that how this is supposed to work? =/
I don't even know if I trust myself enough not to mess things up if I am given rights to write to the master repository.

I'd love to get it so you (Aaron) don't have to do so much work everytime I send in a change. Let me know what I should do.
User avatar
BenFenner
LQFP144 - On Top Of The Game
Posts: 360
Joined: Wed Jul 09, 2008 3:15 pm

Re: Ben's messing aroung with FreeEMS-Tuner code

Post by BenFenner »

Fred has pointed out a problem with the red button in my screen shot. It should say "(ECU Hard Reset)" not "(ECU Reset)". Somehow either that change never made it into the master repo, or I've fudged something up. Aaron, seems like a real quick fix for you if it is indeed wrong in the master repo, which I'm betting it is.
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: Ben's messing aroung with FreeEMS-Tuner code

Post by sry_not4sale »

Hey Ben,

Can you PM me or email me your SSH public key? Then I'll give you push access to a development repo. We can have a branch each, and I'll just cherry-pick stuff into a master branch and then the distribution repo.

People can pull from your branch if they want something asap, and you can just merge with the master branch to make sure you have all my changes also.

Will write up some how to's once you generate a key and I set up the branches ;)

Cheers,
Aaron
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: Ben's messing aroung with FreeEMS-Tuner code

Post by Fred »

Sweet :-)

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
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Ben's messing aroung with FreeEMS-Tuner code

Post by Fred »

Ben, from the docs :

Header Flags
Bit 0 - Payload type (protocol/firmware)
Bit 1 - Acknowledgment valid and/or required
Bit 2 - Acknowledgment type (-ve/+ve)
Bit 3 – Has Addresses
Bit 4 – Has Length
Bit 5 - Firmware implementation specific
Bit 6 - Firmware implementation specific
Bit 7 - Firmware implementation specific

And the code :

Code: Select all

/* Header flag masks */
/* Always has flags (obviously)			*/
/* Always has payload ID so no flag		*/
/* Always has checksum, so no flag		*/
#define HEADER_IS_PROTO		BIT0
#define HEADER_HAS_ACK		BIT1
#define HEADER_IS_NACK		BIT2
#define HEADER_HAS_ADDRS	BIT3
#define HEADER_HAS_LENGTH	BIT4
#define HEADER_USER_BIT_A	BIT5
#define HEADER_USER_BIT_B	BIT6
#define HEADER_USER_BIT_C	BIT7
Aaron :

Won't that create more work for you, or at least keep it the same?

I guess a bit of communication will keep it minimal though, just a thought.

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!
Post Reply