Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000053FirmwareAnalogue Inputspublic2008-11-15 16:342011-11-22 12:18
Assigned ToFred 
PlatformOSOS Version
Product Version0.0.17-SpudEchoes 
Target Version0.2.XFixed in Version 
Summary0000053: Add Important Variables Into Structs And Refactor Placement Of Existing Ones
DescriptionSome variables are in places that they do not belong.
Many variables don't exist yet.

I should go through them in conjunction with the datalog thread and tidy them up a bunch.

If the other issue turns out to be a goer and the format changes, it would be a good opportunity to place them in order into separate memory regions such that a direct copy from RAM Is possible with minimal CPU overhead.
TagsNo tags attached.
Issue TypeImprovement
Risk of Breakagemedium
Attached Files

- Relationships
related to 0000052closedFred Investigate Using Pointers For Variable Banking 

-  Notes
User avatar (0000140)
Fred (administrator)
2009-01-02 14:15

To clarify what I meant by separate RAM region :

Set aside a piece of global RAM and pre init it with header data. After the header data block would be the various structs placed sequentially such that when a datalog needs to be sent it is a single memcpy() call of maximal efficiency only.

| header | struct 1 | struct 2 | struct n -1 | struct n | normal RAM ....

then the memcpy call can just take the configured length and it is single stage with no excessive ifs etc. Once it is in the serial buffer a normal checksum and send call can be made.
User avatar (0000195)
Fred (administrator)
2011-06-17 13:37

The previous comment is no longer relevant, but I'd still like to go through the code and ensure all vars that are not local are neatly arranged into groups, and inside structs where appropriate.
User avatar (0000648)
Fred (administrator)
2011-11-22 01:33

Just pulled out of the source, verbatim:

// TODO various new structs
// Status struct
// Ignition struct
// Injection struct
// Engine position struct
// Validity flags, or they should be in the status struct?
User avatar (0000650)
Fred (administrator)
2011-11-22 12:18

Placement is now good, though still need to add randomly spread vars to said structs to keep things neat and efficient, so leaving open.

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker