Allow negative fixed ignition angles

This commit is contained in:
Josh Stewart 2018-05-01 17:33:52 +10:00
parent c0cf1c5119
commit ba88cfc07d
3 changed files with 5 additions and 5 deletions

View File

@ -275,9 +275,9 @@ page = 3
;--------------------------------------------------
page = 4
TrigAng = scalar, S16, 0, "Deg", 1, 0, -360, 360, 0
FixAng = scalar, U08, 2, "Deg", 1, 0, 0, 80, 0
CrankAng = scalar, U08, 3, "Deg", 1, 0, -10, 80, 0
TrigAngMul = scalar, U08, 4, "", 1, 0, 0, 88, 0 ; Multiplier for tooth counts that don't evenly divide into 360
FixAng = scalar, S08, 2, "Deg", 1, 0, -64, 64, 0 ; Allow negative values here
CrankAng = scalar, U08, 3, "Deg", 1, 0, -10, 80, 0
TrigAngMul = scalar, U08, 4, "", 1, 0, 0, 88, 0 ; Multiplier for tooth counts that don't evenly divide into 360
TrigEdge = bits, U08, 5,[0:0], "Leading", "Trailing"
TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed"
IgInv = bits, U08, 5,[2:2], "Going Low", "Going High"

View File

@ -386,7 +386,7 @@ int8_t correctionsIgn(int8_t base_advance)
static inline int8_t correctionFixedTiming(int8_t advance)
{
byte ignFixValue = advance;
int8_t ignFixValue = advance;
if (configPage4.FixAng != 0) { ignFixValue = configPage4.FixAng; } //Check whether the user has set a fixed timing angle
return ignFixValue;
}

View File

@ -484,7 +484,7 @@ struct config2 {
struct config4 {
int16_t triggerAngle;
byte FixAng;
int8_t FixAng; //Negative values allowed
byte CrankAng;
byte TrigAngMul; //Multiplier for non evenly divisible tooth counts.