Mantis Bug Tracker

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000289FirmwareInit & Configpublic2011-10-07 16:362012-07-02 18:48
ReporterFred 
Assigned ToToxicGumbo 
PrioritynormalSeverityminorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version0.2.0-SNAPSHOT 
Target Version0.2.0Fixed in Version0.2.0 
Summary0000289: Compile Time Scale All Constants & Defaults
DescriptionMigrate ignition advance angles to macros like this:

BTDC(35.25) // to 0.25 degrees, but currently to 0.001 degrees

Rather than manually scaled values. This will also add a layer of portability to different scales as we are about to migrate.

Equally, migrate crank offset angles to the very similar:

CrankOffsetAngle(265.24) // to 0.02 degrees

Which can also check for angles of 720 degrees or over. Though this is possibly wasted effort as that is only temporary anyway.

Temperatures should be literal in one of the following three forms:

TempInK(233.15)
TempInC(-40.0)
TempInF(-40.0)

VE should be the same:

VEPercentOf(105.03)

etc.

No literal initialisers should be left in the code. Add something to FreeTherm to do this too.
TagsNo tags attached.
FirmwareVersion
Issue TypeImprovement
Risk of Breakagevery low
Attached Files

- Relationships

-  Notes
User avatar (0000354)
Fred (administrator)
2011-10-08 10:45

Put all of these, and the values that they rely upon, with docs, in one file.
User avatar (0001341)
Fred (administrator)
2012-03-26 15:57

The macros for these need to be slightly smart to give correct values. The default is to truncate such that 1.99999 = 1 and not 2. This is clearly wrong in small values. It's only slightly wrong in large values, but should be correct in all cases.
User avatar (0001347)
Fred (administrator)
2012-03-27 01:13

I did a LOT of work on this today, BUT, sadly, there was a power cut, and I didn't get to finish it of before bed. I'll nail it tomorrow and it will be wonderful.
User avatar (0001348)
Fred (administrator)
2012-03-28 22:38
edited on: 2012-03-28 23:08

Fixed in 55fe830583c123cbae4d38f3f31cda82ef316fa2 please code review and close if satisfied. git pull;git diff HEAD^..HEAD or the same with git difftool.

User avatar (0001349)
Fred (administrator)
2012-03-28 23:08

Jeff, i just force pushed, sorry! There was a tiny bit of dirtiness in one file... You can play spot the difference on the machine you already pulled to if you are curious :-)
User avatar (0001630)
ToxicGumbo (reporter)
2012-07-02 18:01

Quite an overwhelming number of updates, many of which make the code more readable (and quite a bit of housekeeping). I didn't find anything inconsistent or incorrect when viewing the diffs. My American sensibilities, however, recommend changing DEGREES_C to DEGREES_F along with all associated values!
User avatar (0001631)
Fred (administrator)
2012-07-02 18:48

LOL, OK, I'll close it, then. Thanks for looking!


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker