Fred's unofficial TODO list from his favorite nitpicker

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

OK, after two and a half hours of intense discussions and near death experiences, Dave and myself have a plan!

I'm going to implement it tomorrow if i get a chance AND update the docs to match.

The plan is, instead of sending an error with a size/length of zero, if the offset is also zero, then we'll send the whole block as is.

The other part of the plan is a lookup service with different types of responses from which ID lists can be obtained. then requests can be sent for each and the length inferred from the response

there is more to the plan, but its late, so i'll update this tomorrow.

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: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

0/0 is tested and works.

A list all IDs service is available. If you pull out of the flash only, all will work. If you write back in whole blocks, all will work. This is sufficient for a hex editor style dev hacking interface. Just always send the whole thing. This is simpler anyway. For those that don't error on pull from ram, they can be whole block adjusted also.

There is another service not intended for you, Dave, but may suffice for you once I modify it, and include more info. You can look up the memory details of a location ID! But, it currently doesn't include enough info to tell you what it is. I'm thinking that I'll add two more fields to the blockDetails struct, one a parent location ID, and the other a set of flags that mean various things. With those additions you'll be able to first query the full list, then query each through the details service, then decide what you want to do with them yourself. The flags will have sufficient info to let you know that.

I like this better than the retrieve different lists with different argument values idea! I'll probably rip the single byte arg out of the list retrieve command and just always pull a full list. This secondary service is much more versatile than that anyway.

I think I'm going to move the data structure stuff to xml or json and generate C as part of the build process with some utility program. That will complete the process, as the same xml/json can be used by you.

Another document I'll create is a version> version mapping file for the data regions. This will mainly be for SeanK to pull and load data from an old firmware version to a new one while loading the new firmware. Upgrades should be seemlessish. Stuff will still break structure wise sometimes, in terms of a direct copy, but if the xml/json for old and new is available then the field names and types etc could be used to map old stuff to new rather than fragile offset/length pairs.

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!
dandruczyk
LQFP112 - Up with the play
Posts: 100
Joined: Sun Apr 06, 2008 6:30 pm

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by dandruczyk »

I'm still getting unusual data with lots of dups..
Full packet received, len 130!
Ack/Nack Flag: 0
Has Sequence Flag: 0
Has Length Flag: 1
Payload length 124
Payload id: 55903
Payload base offset: 5

location id list packet arrived
location ID 0
location ID 0
location ID 0
location ID 130
location ID 1
location ID 95
location ID 55813
location ID 124
location ID 0
location ID 0
location ID 0
location ID 33
location ID 0
location ID 67
location ID 26735
location ID 28531
location ID 25888
location ID 24864
location ID 17505
location ID 29544
location ID 25199
location ID 24946
location ID 25632
location ID 18025
location ID 27749
location ID 0
location ID 0
location ID 17
location ID 0
location ID 0
location ID 0
location ID 160
location ID 5376
location ID 16
location ID 0
location ID 233
location ID 0
location ID 0
location ID 0
location ID 1575
location ID 31191
location ID 62914
location ID 21522
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0
location ID 1575
location ID 31191
location ID 62914
location ID 21522
location ID 0
location ID 0
location ID 0
location ID 0
location ID 0


do those make sense at all??
dandruczyk
LQFP112 - Up with the play
Posts: 100
Joined: Sun Apr 06, 2008 6:30 pm

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by dandruczyk »

when using cutecom I get:

00000000: aa aa 01 da 5f 00 7c 00 00 00 01 00 02 00 03 00
00000010: 04 00 05 00 06 00 07 00 08 00 09 00 0a 00 0b 00
00000020: 0c 00 0d 00 0e 00 0f 01 00 01 01 01 02 01 03 01
00000030: 04 01 05 01 06 01 07 01 08 01 09 01 0a 01 0b 01
00000040: 0c 01 0d 30 00 30 01 30 02 30 03 30 04 30 05 30
00000050: 06 30 07 40 00 40 01 40 02 40 03 40 04 40 05 40
00000060: 06 40 07 80 00 80 01 80 02 80 03 90 00 c0 00 c0
00000070: 01 c0 02 c0 03 c0 04 c0 05 d0 00 d0 01 d0 02 d0
00000080: 03 d0 04 8e cc cc
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

So do I!

Code: Select all

00000000: aa aa 01 da 5f 00 7c 00   00 00 01 00 02 00 03 00 
00000010: 04 00 05 00 06 00 07 00   08 00 09 00 0a 00 0b 00 
00000020: 0c 00 0d 00 0e 00 0f 01   00 01 01 01 02 01 03 01 
00000030: 04 01 05 01 06 01 07 01   08 01 09 01 0a 01 0b 01 
00000040: 0c 01 0d 30 00 30 01 30   02 30 03 30 04 30 05 30 
00000050: 06 30 07 40 00 40 01 40   02 40 03 40 04 40 05 40 
00000060: 06 40 07 80 00 80 01 80   02 80 03 90 00 c0 00 c0 
00000070: 01 c0 02 c0 03 c0 04 c0   05 d0 00 d0 01 d0 02 d0 
00000080: 03 d0 04 8e cc cc 
And you can clearly see that your results are weird/wrong. after the 7c is the first one, 0000, then 0001, 0002 etc the last one is d004 and the one before that d003 and so on.

So, no, those numbers you posted make no sense, I'm unsure how you got them! :-)

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!
dandruczyk
LQFP112 - Up with the play
Posts: 100
Joined: Sun Apr 06, 2008 6:30 pm

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by dandruczyk »

fixed, was an order of opeations issue in mtx. (deallocated the packet before trying to dump its contents.....)
stupidity reverted....
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

The detailed metadata lookup service is partly working as detailed in the last few commits and in the docs. Enjoy.
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: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

The metadata lookup service should be fully functional now! If you find bad info coming back, or stuff broken, hit me up and i'll provide a timely fix.

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!
dandruczyk
LQFP112 - Up with the play
Posts: 100
Joined: Sun Apr 06, 2008 6:30 pm

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by dandruczyk »

BUG detected....

Full packet received, len 101 bytes
Ack/Nack Flag: 0
Has Sequence Flag: 1
Has Length Flag: 1
Payload length 35705
Sequence id: 77
Payload id: 401
Payload base offset: 6

Happened when requesting a basic datalog packet as per your API. used NO length args as per the API.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Fred's unofficial TODO list from his favorite nitpicker

Post by Fred »

LOL!!! OK, lemme have a look.
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