Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -15,9 +15,7 @@ * ***************************************************************************/ -#ifndef _VECTORCAST_ - #include -#endif +#include #include "can.h" #include "etpwm.h" @@ -1025,10 +1023,10 @@ if ( BLOOD_PUMP_CONTROL_TO_TARGET_STATE == bloodPumpState ) { F32 cmdMotorSpeed = ( (F32)cmdRate / (F32)ML_PER_LITER ) * BP_REV_PER_LITER * BP_GEAR_RATIO; - F32 deltaMotorSpeed = FABS( measMotorSpeed - cmdMotorSpeed ); + F32 deltaMotorSpeed = fabs( measMotorSpeed - cmdMotorSpeed ); F32 measRotorSpeed = getMeasuredBloodPumpRotorSpeed(); F32 measMotorSpeedInRotorRPM = measMotorSpeed / BP_GEAR_RATIO; - F32 deltaRotorSpeed = FABS( measRotorSpeed - measMotorSpeedInRotorRPM ); + F32 deltaRotorSpeed = fabs( measRotorSpeed - measMotorSpeedInRotorRPM ); // check measured motor speed vs. commanded motor speed while controlling to target if ( deltaMotorSpeed > BP_MAX_MOTOR_SPEED_ERROR_RPM ) @@ -1087,7 +1085,7 @@ F32 flow = getMeasuredBloodFlowRate(); F32 speed = getMeasuredBloodPumpSpeed(); F32 impliedFlow = ( ( speed / BP_GEAR_RATIO ) / BP_REV_PER_LITER ) * (F32)ML_PER_LITER; - F32 delta = FABS( flow - impliedFlow ); + F32 delta = fabs( flow - impliedFlow ); if ( delta > BP_MAX_FLOW_VS_SPEED_DIFF_ML_MIN ) { Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -15,9 +15,7 @@ * ***************************************************************************/ -#ifndef _VECTORCAST_ - #include -#endif +#include #include "etpwm.h" #include "gio.h" @@ -996,10 +994,10 @@ if ( DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE == dialInPumpState ) { F32 cmdMotorSpeed = ( (F32)cmdRate / (F32)ML_PER_LITER ) * DIP_REV_PER_LITER * DIP_GEAR_RATIO; - F32 deltaMotorSpeed = FABS( measMotorSpeed - cmdMotorSpeed ); + F32 deltaMotorSpeed = fabs( measMotorSpeed - cmdMotorSpeed ); F32 measRotorSpeed = getMeasuredDialInPumpRotorSpeed(); F32 measMotorSpeedInRotorRPM = measMotorSpeed / DIP_GEAR_RATIO; - F32 deltaRotorSpeed = FABS( measRotorSpeed - measMotorSpeedInRotorRPM ); + F32 deltaRotorSpeed = fabs( measRotorSpeed - measMotorSpeedInRotorRPM ); // check measured motor speed vs. commanded motor speed while controlling to target if ( deltaMotorSpeed > DIP_MAX_MOTOR_SPEED_ERROR_RPM ) @@ -1058,7 +1056,7 @@ F32 flow = getMeasuredDialInFlowRate(); F32 speed = getMeasuredDialInPumpSpeed(); F32 impliedFlow = ( ( speed / DIP_GEAR_RATIO ) / DIP_REV_PER_LITER ) * (F32)ML_PER_LITER; - F32 delta = FABS( flow - impliedFlow ); + F32 delta = fabs( flow - impliedFlow ); if ( delta > DIP_MAX_FLOW_VS_SPEED_DIFF_ML_MIN ) { Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -15,9 +15,7 @@ * ***************************************************************************/ -#ifndef _VECTORCAST_ - #include -#endif +#include #include "etpwm.h" #include "gio.h" @@ -619,7 +617,7 @@ newPWM = runPIController( PI_CONTROLLER_ID_ULTRAFILTRATION, refVol, totVol ); // limit PWM change to max deltaPWM = newPWM - dialOutPumpPWMDutyCyclePctSet; - if ( FABS( deltaPWM ) > MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE ) + if ( fabs( deltaPWM ) > MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE ) { newPWM = ( deltaPWM < 0.0 ? dialOutPumpPWMDutyCyclePctSet - MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE : dialOutPumpPWMDutyCyclePctSet + MAX_DIAL_OUT_PUMP_PWM_STEP_UP_CHANGE ); } @@ -869,10 +867,10 @@ if ( DIAL_OUT_PUMP_CONTROL_TO_TARGET_STATE == dialOutPumpState ) { F32 controllerMotorSpeed = getMeasuredDialOutPumpMCSpeed(); - F32 deltaMotorSpeed = FABS( measMotorSpeed - controllerMotorSpeed ); + F32 deltaMotorSpeed = fabs( measMotorSpeed - controllerMotorSpeed ); F32 measRotorSpeed = getMeasuredDialOutPumpRotorSpeed(); F32 measMotorSpeedInRotorRPM = measMotorSpeed / DOP_GEAR_RATIO; - F32 deltaRotorSpeed = FABS( measRotorSpeed - measMotorSpeedInRotorRPM ); + F32 deltaRotorSpeed = fabs( measRotorSpeed - measMotorSpeedInRotorRPM ); // check measured motor speed vs. commanded motor speed while controlling to target if ( deltaMotorSpeed > DOP_MAX_MOTOR_SPEED_ERROR_RPM ) Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -15,6 +15,8 @@ * ***************************************************************************/ +#include + #include "BloodFlow.h" #include "Buttons.h" #include "DGInterface.h" @@ -589,7 +591,7 @@ } // check total UF volume error - if ( ( FABS( refUFVolume - measUFVolume ) ) >= (F32)MAX_UF_ACCURACY_ERROR_ML ) + if ( ( fabs( refUFVolume - measUFVolume ) ) >= (F32)MAX_UF_ACCURACY_ERROR_ML ) { #ifndef DISABLE_UF_ALARMS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_UF_VOLUME_ACCURACY_ERROR, refUFVolume, measUFVolume ); Index: firmware/App/Services/MessagePayloads.h =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Services/MessagePayloads.h (.../MessagePayloads.h) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Services/MessagePayloads.h (.../MessagePayloads.h) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -50,19 +50,6 @@ typedef struct { - F32 x; - F32 y; - F32 z; - F32 xMax; - F32 yMax; - F32 zMax; - F32 xTilt; - F32 yTilt; - F32 zTilt; -} HD_ACCEL_DATA_PAYLOAD_T; - -typedef struct -{ F32 gain; F32 offset; } LINEAR_F32_CAL_PAYLOAD_T; Index: firmware/App/Services/PIControllers.c =================================================================== diff -u -rc0273c73da6b6dee4ad6f1d54cb6c6f27a262b5b -re28798081348b470495ec605fcadda4276f37c46 --- firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision c0273c73da6b6dee4ad6f1d54cb6c6f27a262b5b) +++ firmware/App/Services/PIControllers.c (.../PIControllers.c) (revision e28798081348b470495ec605fcadda4276f37c46) @@ -15,9 +15,7 @@ * ***************************************************************************/ -#ifndef _VECTORCAST_ - #include "math.h" -#endif +#include #include "SystemCommMessages.h" #include "PIControllers.h"