Skip to content
Permalink
Browse files

Code cleanup

  • Loading branch information...
colinbourassa committed Feb 14, 2016
1 parent 015a626 commit c7110b130283de778396d09846c2290d9ff1131c
Showing with 13 additions and 13 deletions.
  1. +13 −13 src/data.c
@@ -25,16 +25,16 @@ const int16_t temperature_adc_to_degrees_f[256] =
165, 163, 161, 159, 158, 158, 156, 154, 152, 150, 149, 147, 145, 145, 143, 141,
140, 138, 138, 136, 136, 134, 132, 132, 131, 131, 129, 129, 127, 125, 125, 123,
123, 122, 122, 120, 120, 118, 118, 116, 116, 114, 114, 113, 113, 111, 111, 109,
109, 107, 107, 105, 105, 104, 104, 102, 102, 100, 100, 98, 98, 96, 96, 95,
95, 95, 93, 93, 91, 91, 89, 89, 87, 87, 86, 86, 84, 84, 82, 82,
82, 82, 80, 80, 78, 78, 78, 77, 77, 75, 75, 73, 73, 73, 71, 71,
71, 69, 69, 68, 68, 66, 66, 64, 64, 62, 62, 60, 60, 59, 59, 57,
57, 57, 55, 55, 53, 53, 51, 51, 50, 50, 48, 48, 46, 46, 44, 44,
44, 44, 42, 42, 42, 41, 41, 41, 39, 39, 37, 37, 37, 35, 35, 35,
35, 33, 33, 32, 32, 31, 31, 29, 29, 27, 27, 25, 25, 23, 23, 22,
22, 22, 20, 20, 18, 18, 18, 16, 16, 14, 14, 13, 13, 13, 11, 11,
11, 9, 9, 7, 7, 5, 5, 4, 4, 2, 2, 0, 0, -2, -2, -4,
-4, -4, -5, -5, -7, -7, -7, -9, -9, -9, -11, -11, -11, -13, -13, -13
109, 107, 107, 105, 105, 104, 104, 102, 102, 100, 100, 98, 98, 96, 96, 95,
95, 95, 93, 93, 91, 91, 89, 89, 87, 87, 86, 86, 84, 84, 82, 82,
82, 82, 80, 80, 78, 78, 78, 77, 77, 75, 75, 73, 73, 73, 71, 71,
71, 69, 69, 68, 68, 66, 66, 64, 64, 62, 62, 60, 60, 59, 59, 57,
57, 57, 55, 55, 53, 53, 51, 51, 50, 50, 48, 48, 46, 46, 44, 44,
44, 44, 42, 42, 42, 41, 41, 41, 39, 39, 37, 37, 37, 35, 35, 35,
35, 33, 33, 32, 32, 31, 31, 29, 29, 27, 27, 25, 25, 23, 23, 22,
22, 22, 20, 20, 18, 18, 18, 16, 16, 14, 14, 13, 13, 13, 11, 11,
11, 9, 9, 7, 7, 5, 5, 4, 4, 2, 2, 0, 0, -2, -2, -4,
-4, -4, -5, -5, -7, -7, -7, -9, -9, -9, -11, -11, -11, -13, -13, -13
};

/**
@@ -339,8 +339,7 @@ bool c14cux_getGearSelection(c14cux_info* info, enum c14cux_gear* gear)
{
*gear = C14CUX_Gear_DriveOrReverse;
}
else
// manual gearboxes have a resistor fitted to give a midpoint value
else // manual gearboxes have a resistor fitted to give a midpoint value
{
*gear = C14CUX_Gear_ManualGearbox;
}
@@ -485,6 +484,7 @@ bool c14cux_getMainVoltage(c14cux_info* info, float* mainVoltage)
* @param info State information for the active connection.
* @param fuelMapId ID of the fuel map, from 0 to 5
* @param adjustmentFactor Set to the adjustment factor read at the end of the map
* @param rowScaler Set to the value that is used to scale map values given their row position
* @param buffer Buffer of at least 128 bytes (16 cols x 8 rows)
* @return True if the fuel map was successfully read; 0 if an invalid
* fuel map ID was given or if reading failed
@@ -842,7 +842,7 @@ bool c14cux_getTuneRevision(c14cux_info* info, uint16_t* tuneRevision, uint8_t*
{
*tuneRevision = (*tuneRevision * 100) + // from the previous byte
(((idinfo[byteIdx] >> 4) * 10) + // high nibble of current byte
(idinfo[byteIdx] & 0x0F)); // low nibble of current byte
(idinfo[byteIdx] & 0x0F)); // low nibble of current byte
}

// the next byte is the checksum fixer

0 comments on commit c7110b1

Please sign in to comment.
You can’t perform that action at this time.