Index: firmware/App/Services/TxParams.c =================================================================== diff -u -r30e46b4f07697652455fa861bcaa18f3d60ae11f -rd495985858b3ef51b695a44ceedf6c13a8edb821 --- firmware/App/Services/TxParams.c (.../TxParams.c) (revision 30e46b4f07697652455fa861bcaa18f3d60ae11f) +++ firmware/App/Services/TxParams.c (.../TxParams.c) (revision d495985858b3ef51b695a44ceedf6c13a8edb821) @@ -120,7 +120,6 @@ { CRITICAL_DATA_TYPE_U32, {.uInt=0}, {.uInt=6}, {.uInt=0} }, // TREATMENT_PARAM_DIALYZER_TYPE { CRITICAL_DATA_TYPE_U32, {.uInt=100}, {.uInt=300}, {.uInt=100} }, // TREATMENT_PARAM_FLUID_BOLUS_VOLUME { CRITICAL_DATA_TYPE_U32, {.uInt=0}, {.uInt=60}, {.uInt=0} }, // TREATMENT_PARAM_BP_MEAS_INTERVAL - { CRITICAL_DATA_TYPE_U32, {.uInt=300}, {.uInt=1000}, {.uInt=300} }, // TREATMENT_PARAM_PRIME_DISCARD_VOLUME { CRITICAL_DATA_TYPE_U32, {.uInt=300}, {.uInt=500}, {.uInt=300} }, // TREATMENT_PARAM_PRIME_RINSEBACK_VOLUME { CRITICAL_DATA_TYPE_U32, {.uInt=0}, {.uInt=3}, {.uInt=0} }, // TREATMENT_PARAM_HEPATITIS_B { CRITICAL_DATA_TYPE_U32, {.uInt=0}, {.uInt=2}, {.uInt=0} }, // TREATMENT_PARAM_ACID_CONCENTRATE @@ -142,6 +141,7 @@ { CRITICAL_DATA_TYPE_U32, {.uInt=20}, {.uInt=35}, {.uInt=20} }, // TREATMENT_PARAM_VEN_PRES_LIMIT_ASYMMETRIC { CRITICAL_DATA_TYPE_U32, {.uInt=40}, {.uInt=100}, {.uInt=40} }, // TREATMENT_PARAM_TMP_PRES_LIMIT_WINDOW { CRITICAL_DATA_TYPE_U32, {.uInt=100}, {.uInt=500}, {.uInt=200} }, // TREATMENT_PARAM_RINSEBACK_FLOW_RATE + { CRITICAL_DATA_TYPE_U32, {.uInt=300}, {.uInt=1000}, {.uInt=300} }, // TREATMENT_PARAM_PRIME_DISCARD_VOLUME { CRITICAL_DATA_TYPE_U32, {.uInt=70}, {.uInt=140}, {.uInt=90} }, // TREATMENT_PARAM_SYSTOLIC_BP_LOW_ALARM_LIMIT { CRITICAL_DATA_TYPE_U32, {.uInt=100}, {.uInt=260}, {.uInt=200} }, // TREATMENT_PARAM_SYSTOLIC_BP_HIGH_ALARM_LIMIT { CRITICAL_DATA_TYPE_U32, {.uInt=40}, {.uInt=140}, {.uInt=40} }, // TREATMENT_PARAM_HEART_RATE_LOW_ALARM_LIMIT @@ -361,7 +361,7 @@ *************************************************************************/ F32 getTreatmentParameterF32( TREATMENT_PARAM_T param ) { - F32 result = 1.0; + F32 result = 1.0F; // Validate parameter if ( ( param >= TREATMENT_PARAM_FIRST_F32 ) && ( param < NUM_OF_TREATMENT_PARAMS ) ) @@ -797,77 +797,6 @@ return result; } -// -///*********************************************************************//** -// * @brief -// * The validateAndSetUFVolume function validates received ultrafiltration -// * volume treatment parameter. -// * @details \b Message \b Sent: MSG_ID_TD_RESP_ULTRAFILTRATION_VOLUME_TO_VALIDATE -// * @details \b Inputs: none -// * @details \b Outputs: none -// * @param message set message from UI which includes the user set ultrafiltration -// * volume (in mL). -// * @return TRUE if received UF volume parameter is valid, FALSE if not -// *************************************************************************/ -//BOOL validateAndSetUFVolume( MESSAGE_T *message ) // TODO remove? or use it for UF validation for changes during treatment? -//{ -// BOOL accepted = FALSE; -// REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NONE; -// F32 uFVolumeMl; -// F32 uFVolumeL; -// -// // Verify message payload length is valid -// if ( sizeof( F32 ) == message->hdr.payloadLen ) -// { -// UF_VOLUME_VAL_RESP_DATA_PAYLOAD_T respPayload; -// -// memcpy( &uFVolumeMl, message->payload, sizeof( F32 ) ); -// uFVolumeL = uFVolumeMl / (F32)ML_PER_LITER; -// -// // Validate given UF volume -// accepted = setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, uFVolumeL ); -// -// if ( TRUE == accepted ) -// { -// U32 treatmentDuration = getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ); -// -// // store the user set ultrafiltration volume in pre-treatment parameters setup, if it is validated, otherwise keep the initial 0.0 -// origTreatmentParams.uFVolume_L = uFVolumeL; -// -// if ( treatmentDuration > 0 ) -// { -// F32 uFRate = uFVolumeMl / (F32)treatmentDuration; -// -// if ( ( uFRate > MAX_UF_RATE_ML_MIN ) || ( uFRate < MIN_UF_RATE_ML_MIN ) ) -// { -// accepted = FALSE; -// rejReason = REQUEST_REJECT_REASON_UF_RATE_OUT_OF_RANGE; -// } -// } -// else -// { -// accepted = FALSE; -// rejReason = REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_MINIMUM; -// } -// } -// else -// { -// rejReason = REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE; -// } -// -// // Respond to set UF volume request message -// uFVolumeL = getTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME ); -// uFVolumeMl = uFVolumeL * (F32)ML_PER_LITER; -// respPayload.accepted = accepted; -// respPayload.rejReason = rejReason; -// respPayload.ufVolumeMl = uFVolumeMl; -// sendMessage( MSG_ID_TD_RESP_ULTRAFILTRATION_VOLUME_TO_VALIDATE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08*)(&respPayload), sizeof( UF_VOLUME_VAL_RESP_DATA_PAYLOAD_T ) ); -// // setUserSetUFVolumeStatus( accepted ); // TODO - tell pre-tx whether UF volume has been set and accepted -// } -// -// return accepted; -//} - /*********************************************************************//** * @brief * The resetTreatmentParameters function resets the Treatment Parameters @@ -912,45 +841,6 @@ return treatParamsConfirmed; } -///*********************************************************************//** -// * @brief -// * The signalUserConfirmationOfTreatmentParameters function sets the user -// * confirmation flag signaling user has confirmed or rejected treatment -// * parameters. -// * @details \b Inputs: none -// * @details \b Outputs: treatParamsConfirmed -// * @param message confirmation message from UI which includes the user -// * confirmation or restTreamentParameters. -// * @return TRUE if confirmation/rejection accepted, FALSE if not -// *************************************************************************/ -//BOOL signalUserConfirmationOfTreatmentParameters( MESSAGE_T *message ) -//{ -// BOOL confirmed = FALSE; -// BOOL result = FALSE; -// -// if ( sizeof( BOOL ) == message->hdr.payloadLen ) -// { -// memcpy( &confirmed, message->payload, sizeof( BOOL ) ); -// if ( TRUE == confirmed ) -// { -// // ModePreTreat uses this via getTreatParamsConfirmed() -// treatParamsConfirmed = TRUE; -// } -// else -// { -// // Rejected – clear session -// resetTreatmentParameters(); -// } -// result = TRUE; -// } -// else -// { -// result = FALSE; -// } -// -// return result; -//} - /*********************************************************************//** * @brief * The extractTreatmentParamsFromPayload function extracts the individual Index: firmware/App/Services/TxParams.h =================================================================== diff -u -r30e46b4f07697652455fa861bcaa18f3d60ae11f -rd495985858b3ef51b695a44ceedf6c13a8edb821 --- firmware/App/Services/TxParams.h (.../TxParams.h) (revision 30e46b4f07697652455fa861bcaa18f3d60ae11f) +++ firmware/App/Services/TxParams.h (.../TxParams.h) (revision d495985858b3ef51b695a44ceedf6c13a8edb821) @@ -54,7 +54,6 @@ U32 dialyzerType; ///< User set dialyzer type option U32 fluidBolusVolume_mL; ///< User set fluid bolus volume (in mL) U32 bpInterval_min; ///< User set blood pressure measurement interval (in min) - U32 primeDiscardVolume_mL; ///< User set prime discard flow rate (in mL) U32 rinsebackVolume_mL; ///< User set rinseback volume (in mL) U32 hepatitisBStatus; ///< User set Hepatitis B status option U32 acidConcentrate; ///< User set acid concentrate option @@ -63,9 +62,9 @@ F32 hepDeliveryRate_mL_hr; ///< User set Heparin delivery rate (in mL/hr) F32 dialysateTemperature_degC; ///< User set dialysate temperature (in deg C) F32 acidKConcentrateConvFactor; ///< User set acid concentrate conversion factor - F32 ufPreWeight; ///< User set patient pre weight prior to treatment (in Kilogram) - F32 ufEstimatedTargetWeight; ///< User set patient estimated target weight after the treatment (in Kilogram) - F32 ufVolume; ///< User set ultrafiltration volume (in L) + F32 ufPreWeight; ///< User set patient pre weight prior to treatment (in Kilogram) + F32 ufEstimatedTargetWeight; ///< User set patient estimated target weight after the treatment (in Kilogram) + F32 ufVolume; ///< User set ultrafiltration volume (in L) } TREATMENT_PARAMS_DATA_PAYLOAD_T; /// Record structure for reporting all current treatment parameters to Dialin