Page 11 of 11

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

Posted: Tue Dec 01, 2009 4:49 pm
by BenFenner
I forgot I had this thread. A blast from the past for sure. My headache is so long gone I almost forgot I had it.

Okay it looks like the last place I left off I was working on the car preparing for the 2009 SR20 National Convention. Well that came and went (and ruined my engine in the process). It took 7 months but the car is finally back up and working (for the most part) and I'm finally in a position where I can do some meaningful coding again.

If you want to see what happened with the car in the past 7 months (I think I was about the paint the exhaust) you can start from post #404 in my build thread. Fred asked for videos, and there's a few of the exhaust at the end of post #392 and an acceleration video in post #412.

I let Aaron know I was ready to code again and got myself bootstrapped again in his thread. It makes a lot more sense to continue with my comments and questions here. Since I'm having trouble finding anyone on Instant Messenger I'll just use this thread for questions.

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

Posted: Tue Dec 01, 2009 5:58 pm
by BenFenner
First question. I'm tasked with getting a table to load when the tuner is connected to the "Test" comm. I'm trying to wade through the code and find the file where the heavy lifting will be done and best I can figure out that would be:
freeems-tuner/comms/protocols/IFreeEMS_Vanilla /v0_0_1/text.py

But that's really a shot in the dark. I'd love if Aaron (or Fred?) could give me an overarching picture of how the tuner does it's thing so I can feel more comfortable and make the environment more familiar, but I can settle for a direct answer to my specific question as well.

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

Posted: Tue Dec 01, 2009 10:20 pm
by sry_not4sale
BenFenner wrote:First question. I'm tasked with getting a table to load when the tuner is connected to the "Test" comm. I'm trying to wade through the code and find the file where the heavy lifting will be done and best I can figure out that would be:
freeems-tuner/comms/protocols/IFreeEMS_Vanilla /v0_0_1/text.py

Code: Select all

freeems-tuner/comms/protocols/IFreeEMS_Vanilla /v0_0_1/test.py
That is the file that manages the Test responses, yes :)
BenFenner wrote:But that's really a shot in the dark. I'd love if Aaron (or Fred?) could give me an overarching picture of how the tuner does it's thing so I can feel more comfortable and make the environment more familiar, but I can settle for a direct answer to my specific question as well.
Any chance of you getting on gtalk, or msn?

I started writing some documentation on the tuner site:
http://tuner.freeems.org/wiki/Developers

But I want to expand on it. Would be cool if you could add to it as you find stuff... :) I'll have to set you up an account, can you PM me a username and password you would like?

I'll try give you a quick glimpse of what is happening in the test adaptor:
comms.Test.connection._send(packet)
The above function is called when a packet is sent to the Test comms interface. At the moment this only occurs if you do something in the GUI (with the Test plug in enabled and connected), e.g. click one of the request buttons.

Code: Select all

# Get preset return packet
        response = self.getProtocol().getTestResponse(packet)
getTestReponse increments the request packets payload id by 1, which will map to the response payload id (if there is no response packet defined, function returns null and nothing is sent back to the app).

If a response packet is defined, we create an instance of the corresponding class for that payload id (responses are defined here), and the classes createTestResponse(request) method is run (the request parameter is the request packet we are responding too, which means you can customize the response depending on the request) :)

If the createTestResponse method does not exist, then an exception occurs. You might want to add a try/except loop in the getTestResponse function.

This response is then returned to the test adaptor, is converted to binary and appended to the input buffer for the receive thread to find it and act accordingly!

Make sense?

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

Posted: Tue Dec 01, 2009 10:55 pm
by BenFenner
sry_not4sale wrote:Any chance of you getting on gtalk, or msn?
Maybe MSN. I'll have to set up a user on there. I take it I won't see you on AIM anymore? =]
sry_not4sale wrote:I started writing some documentation on the tuner site:
http://tuner.freeems.org/wiki/Developers

But I want to expand on it. Would be cool if you could add to it as you find stuff... :) I'll have to set you up an account, can you PM me a username and password you would like?
PM on the way.
sry_not4sale wrote:Make sense?
For the most part yes. Once I get into it I might have some more questions but I'm getting the idea and your description is clear so the more I read it the more it makes sense.

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

Posted: Tue Dec 01, 2009 11:55 pm
by Fred
Ben, msn sucks, get gmail and chat to us through that. AIM stands for America Instant Messenger, there is more to the world than the US of A ;-) I'll use it again, but not until I have proper internet (been without for 2 weeks not, withdrawal symptoms are almost gone). There is also phone if you want to have an in person chat with some cheap calling card or something. Let me know if you wanna call and I'll give you my number(s). Aaron is phone-able too, probably. But it will cost you 3 times as much to talk to him because the stubborn bastard won't get a land line!

Fred.

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

Posted: Wed Dec 02, 2009 12:53 am
by sry_not4sale
Fred wrote:But it will cost you 3 times as much to talk to him because the stubborn bastard won't get a land line!
Heh, you're the only person that would call it! You're welcome to pay for it :P

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

Posted: Wed Dec 02, 2009 10:42 am
by jharvey
About the IM thing, you might also want to try this one.

http://www.trillian.im/

Does several IM packages including AIM, google, yahoo, and a pile of others.

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

Posted: Wed Dec 02, 2009 10:52 am
by sry_not4sale
Or

http://www.meebo.com/

if you don't wanna install anything

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

Posted: Wed Dec 02, 2009 2:14 pm
by BenFenner
Not trying to start an argument here, but as far as clients go, AIM is by far the best and most feature rich (which is very hard to do). I know that goes against all instincts but it's true. I've used them all at one time or another. I'll figure something out.

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

Posted: Thu Dec 03, 2009 1:03 am
by Fred
The client is irrelevant, choose whichever you want, there are dozens. The protocol though, this is what matters and Jabber, which gtalk uses, is way better than msn or aim. Furthermore, if you want to be connected, you have to suffer the various protocols that people use. EG, none of my msn friends or aim friends have talked to me in weeks. If I want to communicate with them, that is the avenue that I need to adopt. Thus I use pidgin and on windows I used to use trillian (despite how broken it is) and use whatever everyone else is using and not care until the connection gets flaky.