Warnings cleanup
This commit is contained in:
parent
9624985299
commit
ad4683014d
|
@ -500,7 +500,7 @@ void boostDisable()
|
|||
{
|
||||
if(nextVVT == 0)
|
||||
{
|
||||
if(vvt1_pwm_value < vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
if(vvt1_pwm_value < (long)vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
{
|
||||
if (configPage6.vvtPWMdir == 0) { *vvt1_pin_port &= ~(vvt1_pin_mask); } //Normal direction
|
||||
else { *vvt1_pin_port |= (vvt1_pin_mask); } //Reversed direction
|
||||
|
@ -518,7 +518,7 @@ void boostDisable()
|
|||
}
|
||||
else if (nextVVT == 1)
|
||||
{
|
||||
if(vvt2_pwm_value < vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
if(vvt2_pwm_value < (long)vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
{
|
||||
if (configPage6.vvtPWMdir == 0) { *vvt2_pin_port &= ~(vvt2_pin_mask); } //Normal direction
|
||||
else { *vvt2_pin_port |= (vvt2_pin_mask); } //Reversed direction
|
||||
|
@ -536,7 +536,7 @@ void boostDisable()
|
|||
}
|
||||
else
|
||||
{
|
||||
if(vvt1_pwm_value < vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
if(vvt1_pwm_value < (long)vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
{
|
||||
if (configPage6.vvtPWMdir == 0) { *vvt1_pin_port &= ~(vvt1_pin_mask); } //Normal direction
|
||||
else { *vvt1_pin_port |= (vvt1_pin_mask); } //Reversed direction
|
||||
|
@ -545,7 +545,7 @@ void boostDisable()
|
|||
VVT_TIMER_COMPARE = VVT_TIMER_COUNTER + (vvt_pwm_max_count - vvt1_pwm_cur_value);
|
||||
}
|
||||
else { vvt1_max_pwm = true; }
|
||||
if(vvt2_pwm_value < vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
if(vvt2_pwm_value < (long)vvt_pwm_max_count) //Don't toggle if at 100%
|
||||
{
|
||||
if (configPage6.vvtPWMdir == 0) { *vvt2_pin_port &= ~(vvt2_pin_mask); } //Normal direction
|
||||
else { *vvt2_pin_port |= (vvt2_pin_mask); } //Reversed direction
|
||||
|
|
|
@ -376,11 +376,10 @@ void sendCancommand(uint8_t cmdtype, uint16_t canaddress, uint8_t candata1, uint
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CORE_TEENSY35
|
||||
// This routine builds the realtime data into packets that the obd requesting device can understand. This is only used by teensy and stm32 with onboard canbus
|
||||
void obd_response(uint8_t thePIDmode, uint8_t therequestedPIDlow, uint8_t therequestedPIDhigh)
|
||||
{
|
||||
|
||||
#if defined(CORE_TEENSY)
|
||||
void obd_response(uint8_t PIDmode, uint8_t requestedPIDlow, uint8_t requestedPIDhigh)
|
||||
{
|
||||
//only build the PID if the mcu has onboard/attached can
|
||||
|
||||
uint16_t obdcalcA; //used in obd calcs
|
||||
|
@ -394,10 +393,10 @@ void obd_response(uint8_t thePIDmode, uint8_t therequestedPIDlow, uint8_t thereq
|
|||
|
||||
outMsg.len = 8;
|
||||
|
||||
if (thePIDmode == 0x01)
|
||||
if (PIDmode == 0x01)
|
||||
{
|
||||
//currentStatus.canin[13] = therequestedPIDlow;
|
||||
switch (therequestedPIDlow)
|
||||
switch (requestedPIDlow)
|
||||
{
|
||||
case 0: //PID-0x00 PIDs supported 01-20
|
||||
outMsg.buf[0] = 0x06; // sending 6 bytes
|
||||
|
@ -694,26 +693,25 @@ if (thePIDmode == 0x01)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (thePIDmode == 0x22)
|
||||
else if (PIDmode == 0x22)
|
||||
{
|
||||
// these are custom PID not listed in the SAE std .
|
||||
if (therequestedPIDhigh == 0x77)
|
||||
if (requestedPIDhigh == 0x77)
|
||||
{
|
||||
if ((therequestedPIDlow >= 0x01) && (therequestedPIDlow <= 0x10))
|
||||
if ((requestedPIDlow >= 0x01) && (requestedPIDlow <= 0x10))
|
||||
{
|
||||
// PID 0x01 (1 dec) to 0x10 (16 dec)
|
||||
// Aux data / can data IN Channel 1 - 16
|
||||
outMsg.buf[0] = 0x06; // sending 8 bytes
|
||||
outMsg.buf[1] = 0x62; // Same as query, except that 40h is added to the mode value. So:62h = custom mode
|
||||
outMsg.buf[2] = therequestedPIDlow; // PID code
|
||||
outMsg.buf[2] = requestedPIDlow; // PID code
|
||||
outMsg.buf[3] = 0x77; // PID code
|
||||
outMsg.buf[4] = lowByte(currentStatus.canin[therequestedPIDlow]); // A
|
||||
outMsg.buf[5] = highByte(currentStatus.canin[therequestedPIDlow]); // B
|
||||
outMsg.buf[4] = lowByte(currentStatus.canin[requestedPIDlow]); // A
|
||||
outMsg.buf[5] = highByte(currentStatus.canin[requestedPIDlow]); // B
|
||||
outMsg.buf[6] = 0x00; // C
|
||||
outMsg.buf[7] = 0x00; // D
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1703,7 +1703,7 @@ void receiveCalibration(byte tableID)
|
|||
{
|
||||
void* pnt_TargetTable_values; //Pointer that will be used to point to the required target table values
|
||||
uint16_t* pnt_TargetTable_bins; //Pointer that will be used to point to the required target table bins
|
||||
int OFFSET, DIVISION_FACTOR, BYTES_PER_VALUE;
|
||||
int OFFSET, DIVISION_FACTOR;
|
||||
|
||||
switch (tableID)
|
||||
{
|
||||
|
@ -1713,7 +1713,6 @@ void receiveCalibration(byte tableID)
|
|||
pnt_TargetTable_bins = (uint16_t *)&cltCalibration_bins;
|
||||
OFFSET = CALIBRATION_TEMPERATURE_OFFSET; //
|
||||
DIVISION_FACTOR = 10;
|
||||
BYTES_PER_VALUE = 2;
|
||||
break;
|
||||
case 1:
|
||||
//Inlet air temp table
|
||||
|
@ -1721,7 +1720,6 @@ void receiveCalibration(byte tableID)
|
|||
pnt_TargetTable_bins = (uint16_t *)&iatCalibration_bins;
|
||||
OFFSET = CALIBRATION_TEMPERATURE_OFFSET;
|
||||
DIVISION_FACTOR = 10;
|
||||
BYTES_PER_VALUE = 2;
|
||||
break;
|
||||
case 2:
|
||||
//O2 table
|
||||
|
@ -1730,7 +1728,6 @@ void receiveCalibration(byte tableID)
|
|||
pnt_TargetTable_bins = (uint16_t *)&o2Calibration_bins;
|
||||
OFFSET = 0;
|
||||
DIVISION_FACTOR = 1;
|
||||
BYTES_PER_VALUE = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1738,7 +1735,6 @@ void receiveCalibration(byte tableID)
|
|||
pnt_TargetTable_values = (uint16_t *)&iatCalibration_values;
|
||||
pnt_TargetTable_bins = (uint16_t *)&iatCalibration_bins;
|
||||
DIVISION_FACTOR = 10;
|
||||
BYTES_PER_VALUE = 2;
|
||||
break; //Should never get here, but if we do, just fail back to main loop
|
||||
}
|
||||
|
||||
|
|
|
@ -260,8 +260,8 @@ void loop()
|
|||
//Water methanol injection
|
||||
wmiControl();
|
||||
//FOR TEST PURPOSES ONLY!!!
|
||||
if(vvt2_pwm_value < vvt_pwm_max_count) { vvt2_pwm_value++; }
|
||||
else { vvt2_pwm_value = 1; }
|
||||
//if(vvt2_pwm_value < vvt_pwm_max_count) { vvt2_pwm_value++; }
|
||||
//else { vvt2_pwm_value = 1; }
|
||||
}
|
||||
if (BIT_CHECK(LOOP_TIMER, BIT_TIMER_4HZ))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue