Fix div() operation that wasn't working properly on unsigned int

This commit is contained in:
Josh Stewart 2014-10-10 16:38:34 +11:00
parent 8a5888edc3
commit 14e4c75eec
1 changed files with 2 additions and 2 deletions

View File

@ -139,8 +139,8 @@ void sendValues(int length)
response[10] = 0x00; //Exhaust gas correction (%)
response[11] = 0x00; //Air Correction (%)
response[12] = 0x00; //Warmup enrichment (%)
response[13] = (byte)(div(currentStatus.RPM, 100).quot); //rpm / 100
response[14] = (byte)(div(currentStatus.PW, 200).quot); //Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.
response[13] = (byte)(div(currentStatus.RPM, 100).quot); //rpm / 100
response[14] = (byte)(currentStatus.PW / 200); //Pulsewidth 1 multiplied by 10 in ms. Have to convert from uS to mS.
response[15] = 0x00; //acceleration enrichment (ms)
response[16] = 0x00; //Barometer correction (%)
response[17] = currentStatus.corrections; //Total GammaE (%)