/*
 * File: HysteresisCalc.c
 *
 * Code generated for Simulink model 'BCMR_AChrg'.
 *
 * Model version                  : 1.974
 * Simulink Coder version         : 8.13 (R2017b) 24-Jul-2017
 * C/C++ source code generated on : Mon Jul  6 15:30:47 2020
 */

#include "HysteresisCalc.h"

/* Output and update for atomic system: '1-D Hysteresis1' ('MyLib:33') */
void HysteresisCalc(real32_T rtu_u, uint8_T rtu_para1, uint8_T rtu_para2,
                    B_HysteresisCalc_T *localB, real32_T rtp_RngDwnLmt, real32_T
                    rtp_RngUpLmt)
{
  if (rtp_RngUpLmt < rtu_u) {
    localB->Switch = rtu_para1;
  } else {
    if (rtu_u < rtp_RngDwnLmt) {
      localB->Switch = rtu_para2;
    }
  }
}

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
