Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r89f4c7f0995e2094b3f26fc7e7e12371e847abac -r6b870cd0699bb3ee22b93981d51373a6c2d56162 --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 89f4c7f0995e2094b3f26fc7e7e12371e847abac) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 6b870cd0699bb3ee22b93981d51373a6c2d56162) @@ -52,10 +52,12 @@ #define USER_CONFIRM_CHANGE_TIMEOUT_MS ( 60 * MS_PER_SECOND ) ///< Require user to confirm UF volume change within this time. #define PREVENT_UF_VOL_CHANGE_IF_NEARLY_DONE_SEC ( 10 * SEC_PER_MIN ) ///< Prevent UF volume change if treatment within this much time from end of treatment (in seconds). -#define TREATMENT_TIME_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the treatment time data is published on the CAN bus. -#define TREATMENT_STATE_DATA_PUB_INTERVAL ( 250 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the treatment state data is published on the CAN bus. +/// Interval (ms/task time) at which the treatment time data is published on the CAN bus. +static const U32 TREATMENT_TIME_DATA_PUB_INTERVAL = ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ); +/// Interval (ms/task time) at which the treatment state data is published on the CAN bus. +static const U32 TREATMENT_STATE_DATA_PUB_INTERVAL = ( 250 / TASK_GENERAL_INTERVAL ); /// Interval (ms/task time) at which updated, valid treatment setting ranges are published on the CAN bus. -#define TREATMENT_SETTINGS_RANGES_PUB_INTERVAL ( ( 60 * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ) +static const U32 TREATMENT_SETTINGS_RANGES_PUB_INTERVAL = ( ( 60 * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ); #define CALC_ELAPSED_TREAT_TIME_IN_SECS() ( treatmentTimeMS / MS_PER_SECOND ) ///< Macro to calculate the elapsed treatment time in seconds. /// Macro to calculate the elapsed treatment time in minutes. @@ -529,7 +531,7 @@ { stopDialysis(); transitionToTreatmentEnd(); - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_END_OF_DIALYSIS_TREATMENT_WARNING, presTreatmentTimeSecs ); + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_END_OF_TREATMENT_WARNING, presTreatmentTimeSecs ); result = TREATMENT_END_STATE; } // Otherwise, execute state machine for treatment dialysis sub-mode