Page 1 of 11

Ben's messing aroung with FreeEMS-Tuner code

Posted: Mon Nov 10, 2008 3:25 pm
by BenFenner
Yah, so this is where I flail around with python and git and such.

Fred wanted an orange button for soft resets. Going to give it the old college try.



Edit:

No time at all to add the button and such, but took me way too long to find out the Python color stuff. Still didn't find a good way to make it orange... I'm sure someone will set me straight.

Also, the code I added/changed could be done cleaner I know... =/

The two files I changed were "gui.py" and "protocolcs/FreeEMS_Vanilla/0_0_17.py"

*.py files can't be attached so I zipped them.

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 3:31 pm
by Fred
Good work :-) I'll give them a try tonight when I get home. Hard reset has been broken for a little while so it will be good to have soft and know that it is soft.

Fred.

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 9:09 pm
by sry_not4sale
W00t farking good work ben (?)!

Have you got git running on your box? If so, it would make life really easy for both of us working on this ;)

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 9:16 pm
by sry_not4sale
Will upload your patch to the git repo soon as Ben, can ya give me a preffered name and email to add to the list of credits? ;)

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 10:15 pm
by BenFenner
It's just an orange button... If anyone deserves the accolades it's you! :)

As for git, I do not have it installed. I've made use of your *.zip file for download. I'm assuming git is some form of source control? If so, I guess I might have to go through the ridiculous process of installing it if I end up contributing any more (I plan on it).

My name is Benjamin Fenner, so "BenFenner" is fine. E-mail is: fenfam <at> sc <dot> rr <dot> com for credits.

Let me know what else I can do. I was sort of chomping at the bit this afternoon after getting finished with the orange button so quickly. ;)

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 10:22 pm
by sry_not4sale
So the code was relatively easy to understand? Great.

One of things Fred was talking about was improving the packet diagnostics output. e.g. showing ascii output as well as the bytes, replacing the payload id's with the packet type in human readable format.

Or if you are more daring, parsing incoming packets (there are examples of response packets in one of freds latest screenshots).

:)

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 10:22 pm
by sry_not4sale
We can live without git for a while anyways, apparently it can be a pain to install on windows.

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 10:26 pm
by BenFenner
Yah, the code was easy to follow for a python noob like me.

I actually noticed the packet diagnostics output could use some work. Good idea. Sounds like a good next job for me. Let me know when I should download the newest version to start from. (Probably won't get to this until tomorrow, as it's the end of the work day where I live). Also where is the list of Payload ID -> Human Readable Name? Fred?

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Mon Nov 10, 2008 10:30 pm
by sry_not4sale
I'll get your patch up today, so download the latest version tomorrow.

The human readable names are in the src/inc/comms*.h files in the firmware download :)

Re: FreeEMS-Tuner Development Diary - Comments

Posted: Tue Nov 11, 2008 12:19 am
by Fred
When I release it very soon :-)

It's not quite all singing and all dancing, but it does work to some extent.

BTW, orange button works a treat. Red one on the other hand... just screws up the registers lol. Hence the need for the orange one.

The type of output I was thinking was like this :

Code: Select all

 00000000:  49 44 33 03 00 00 00 00  01 76 50 52 49 56 00 00  ID3......vPRIV..
 00000010:  00 27 00 00 57 4d 2f 4d  65 64 69 61 43 6c 61 73  .'..WM/MediaClas
 00000020:  73 50 72 69 6d 61 72 79  49 44 00 bc 7d 60 d1 23  sPrimaryID..}`.#
 00000030:  e3 e2 4b 86 a1 48 a4 2a  28 44 1e 50 52 49 56 00  ..K..H.*(D.PRIV.
 00000040:  00 00 29 00 00 57 4d 2f  4d 65 64 69 61 43 6c 61  ..)..WM/MediaCla
 00000050:  73 73 53 65 63 6f 6e 64  61 72 79 49 44 00 00 00  ssSecondaryID...
 00000060:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 50 52  ..............PR
 00000070:  49 56 00 00 00 0e 00 00  50 65 61 6b 56 61 6c 75  IV......PeakValu
 00000080:  65 00 ff 7f 00 00 50 52  49 56 00 00 00 11 00 00  e.....PRIV......
 00000090:  41 76 65 72 61 67 65 4c  65 76 65 6c 00 7f 1b 00  AverageLevel....
 000000a0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 000000b0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 000000c0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 000000d0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 000000e0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 000000f0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 00000100:  ff fb 90 64 00 00 00 00  00 00 00 00 00 00 00 00  ...d............
 00000110:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
 00000120:  00 00 00 00 58 69 6e 67  00 00 00 0f 00 00 2d 6e  ....Xing......-n
 00000130:  00 49 c8 4b 00 02 05 07  0a 0d 10 12 15 17 1a 1c  .I.K............
You now have up to 2kb block to receive.

and lots and lots of 1kb blocks

i'm going to try to get docs done at least a bit tonight, but if not, hopefully the source can be a reference for now :-(

I'm trying my hardest, but having trouble making the progress that I want to.

Fred.