diff --git a/HVAC_model.c b/HVAC_model.c index 5251052..21cb2b0 100644 --- a/HVAC_model.c +++ b/HVAC_model.c @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'HVAC_model'. * - * Model version : 1.956 + * Model version : 1.960 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Tue May 19 12:18:47 2026 + * C/C++ source code generated on : Tue May 19 16:51:26 2026 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M @@ -8974,7 +8974,7 @@ void HVAC_model_step(void) int16_t rtb_y_fc[5]; int16_t rtb_y_gm[5]; int16_t rtb_y_pk[3]; - int16_t rtb_out_j4[2]; + int16_t rtb_out_p5[2]; int16_t Duct1_R; int16_t Duct2_R; int16_t Duct3_R; @@ -8994,21 +8994,21 @@ void HVAC_model_step(void) int16_t rtb_y_mr; int16_t rtb_y_p; uint16_t Merge[9]; - uint16_t rtb_out_ic[9]; - uint16_t rtb_out_k4[9]; - uint16_t rtb_out_ly[9]; + uint16_t rtb_out_a5[9]; + uint16_t rtb_out_h0[9]; + uint16_t rtb_out_mj[9]; uint16_t rtb_vals_m[9]; - uint16_t rtb_out_pj[6]; + uint16_t rtb_out_je[6]; uint16_t rtb_urear[6]; - uint16_t rtb_out_jq[2]; + uint16_t rtb_out_f0[2]; uint16_t rtb_Saturation1; uint16_t rtb_Saturation2; uint16_t rtb_Saturation_as; - uint16_t rtb_out_bz; - uint16_t rtb_out_dr; - uint16_t rtb_out_jaw; - uint16_t rtb_out_pl; - uint16_t rtb_out_po; + uint16_t rtb_out_ci; + uint16_t rtb_out_eyx; + uint16_t rtb_out_gdu; + uint16_t rtb_out_gyw; + uint16_t rtb_out_ik; int8_t rtb_Switch_nyq; uint8_t rtb_get_modes_for_levels[78]; uint8_t Actuator_pos_percent_Ch1[9]; @@ -9064,12 +9064,12 @@ void HVAC_model_step(void) bool rtb_LogicalOperator4_fo; bool rtb_LogicalOperator6; bool rtb_LogicalOperator8; - bool rtb_RelationalOperator2_nm; + bool rtb_RelationalOperator2_i; /* RelationalOperator: '/Relational Operator1' incorporates: * UnitDelay: '/Unit Delay' */ - rtb_RelationalOperator2_nm = (rtDW.UnitDelay_DSTATE_d5 == -9999); + rtb_RelationalOperator2_i = (rtDW.UnitDelay_DSTATE_d5 == -9999); /* DataStoreRead: '/Data Store Read14' incorporates: * UnitDelay: '/Unit Delay' @@ -9077,7 +9077,7 @@ void HVAC_model_step(void) rtDW.UnitDelay_DSTATE_d5 = rtDW.AMB_RAW; /* If: '/If' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { /* Outputs for IfAction SubSystem: '/Инициализация температуры' incorporates: * ActionPort: '/Action Port' */ @@ -9548,7 +9548,7 @@ void HVAC_model_step(void) /* : y_fixed = double(y_in); */ /* : eps_val = 0.01; */ /* : for i = 2:length(y_fixed) */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 FLU_tg' incorporates: * Gain: '/Gain2' @@ -9564,7 +9564,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(FLU_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_le - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_le - 15 <= 13)) { /* : y = (FLU_tg(LVL + 1, SET - 16) + FLU_tg(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_le - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_le - 16) * 6 + rtb_Merge_j]; @@ -9586,7 +9586,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/2.1 Incar target' incorporates: * Gain: '/Gain2' */ - u1Incartarget(rtb_y_le, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_ge); + u1Incartarget(rtb_y_le, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_ge); /* MATLAB Function: '/Y1-Y4 для FLU_tg_incar' incorporates: * Gain: '/Gain2' @@ -9744,7 +9744,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/FXU_tg_max' */ /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 FRU_tg' incorporates: * Gain: '/Gain2' @@ -9760,7 +9760,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(FRU_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_c23 - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_c23 - 15 <= 13)) { /* : y = (FRU_tg(LVL + 1, SET - 16) + FRU_tg(LVL + 1, SET - 16 + 1)) / 2; */ i_0 = FLU_tg[(rtb_y_c23 - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_c23 - 16) * 6 + rtb_Merge_j]; @@ -9782,7 +9782,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/2.1 Incar target' incorporates: * Gain: '/Gain2' */ - u1Incartarget_l(rtb_y_c23, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_h); + u1Incartarget_l(rtb_y_c23, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_h); /* MATLAB Function: '/Y1-Y4 для FLU_tg_incar' incorporates: * Gain: '/Gain2' @@ -9840,7 +9840,7 @@ void HVAC_model_step(void) rtb_rate += (double)((rtb_y_co + rtb_y_ge) + rtb_y_h); /* RelationalOperator: '/LowerRelop1' */ - rtb_RelationalOperator2_nm = (rtb_rate > rtb_y_i); + rtb_RelationalOperator2_i = (rtb_rate > rtb_y_i); /* MATLAB Function: '/FXU_tg_min' incorporates: * Gain: '/Gain2' @@ -9851,7 +9851,7 @@ void HVAC_model_step(void) * RelationalOperator: '/UpperRelop' * Switch: '/Switch' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { rtb_rate = rtb_y_i; } else if (rtb_rate < rtb_y_h) { /* Switch: '/Switch' */ @@ -9892,7 +9892,7 @@ void HVAC_model_step(void) R_tg_max(rtb_y_i, rtb_Merge_j, &rtb_y_co); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation2, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation2, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 RL_tg' incorporates: * Gain: '/Gain2' @@ -9908,7 +9908,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(RL_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_i - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_i - 15 <= 13)) { /* : y = (RL_tg(LVL + 1, SET - 16) + RL_tg(LVL + 1, SET - 16 + 1)) / 2; */ i_0 = FLU_tg[(rtb_y_i - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_i - 16) * 6 + rtb_Merge_j]; @@ -9930,7 +9930,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/2.1 Incar target' incorporates: * Gain: '/Gain2' */ - u1Incartarget_e(rtb_y_i, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_h); + u1Incartarget_e(rtb_y_i, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_h); /* MATLAB Function: '/Y1-Y4 для R_tg_incar' incorporates: * Gain: '/Gain2' @@ -9988,7 +9988,7 @@ void HVAC_model_step(void) rtb_rate += (double)((rtb_y_jd + rtb_y_ge) + rtb_y_h); /* RelationalOperator: '/LowerRelop1' */ - rtb_RelationalOperator2_nm = (rtb_rate > rtb_y_co); + rtb_RelationalOperator2_i = (rtb_rate > rtb_y_co); /* MATLAB Function: '/R_tg_min' incorporates: * Gain: '/Gain2' @@ -9999,7 +9999,7 @@ void HVAC_model_step(void) * RelationalOperator: '/UpperRelop' * Switch: '/Switch' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { rtb_rate = rtb_y_co; } else if (rtb_rate < rtb_y_h) { /* Switch: '/Switch' */ @@ -10018,7 +10018,7 @@ void HVAC_model_step(void) R_tg_max(rtb_y_i, rtb_Merge_j, &rtb_y_jd); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation2, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation2, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 RR_tg' */ /* : RL_tg = [g_assTG_RR_LV0; g_assTG_RR_LV1; g_assTG_RR_LV2; g_assTG_RR_LV3; g_assTG_RR_LV4; g_assTG_RR_LV5]; */ @@ -10032,7 +10032,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(RL_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_i - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_i - 15 <= 13)) { /* : y = (RL_tg(LVL + 1, SET - 16) + RL_tg(LVL + 1, SET - 16 + 1)) / 2; */ i_0 = FLU_tg[(rtb_y_i - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_i - 16) * 6 + rtb_Merge_j]; @@ -10052,7 +10052,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/2.3 RR_tg' */ /* MATLAB Function: '/2.1 Incar target' */ - u1Incartarget_p(rtb_y_i, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_co); + u1Incartarget_p(rtb_y_i, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_co); /* MATLAB Function: '/Y1-Y4 для R_tg_incar' */ Y1Y4R_tg_incar(rtb_y_i, rtb_Merge_j, rtb_y_gm); @@ -10098,7 +10098,7 @@ void HVAC_model_step(void) rtb_rate += (double)((rtb_y_gy + rtb_y_ge) + rtb_y_h); /* RelationalOperator: '/LowerRelop1' */ - rtb_RelationalOperator2_nm = (rtb_rate > rtb_y_jd); + rtb_RelationalOperator2_i = (rtb_rate > rtb_y_jd); /* MATLAB Function: '/R_tg_min' */ R_tg_min(rtb_y_i, rtb_Merge_j, &rtb_y_co); @@ -10107,7 +10107,7 @@ void HVAC_model_step(void) * RelationalOperator: '/UpperRelop' * Switch: '/Switch' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { rtb_rate = rtb_y_jd; } else if (rtb_rate < rtb_y_co) { /* Switch: '/Switch' */ @@ -10126,7 +10126,7 @@ void HVAC_model_step(void) FLL_tg_max(rtb_y_le, rtb_Merge_j, &rtb_y_i); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 FLL_tg' */ /* : FLU_tg = [g_assTG_FLL_LV0; g_assTG_FLL_LV1; g_assTG_FLL_LV2; g_assTG_FLL_LV3; g_assTG_FLL_LV4; g_assTG_FLL_LV5]; */ @@ -10140,7 +10140,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(FLU_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_le - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_le - 15 <= 13)) { /* : y = (FLU_tg(LVL + 1, SET - 16) + FLU_tg(LVL + 1, SET - 16 + 1)) / 2; */ i_0 = FLU_tg[(rtb_y_le - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_le - 16) * 6 + rtb_Merge_j]; @@ -10160,7 +10160,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/2.3 FLL_tg' */ /* MATLAB Function: '/2.1 Incar target' */ - u1Incartarget(rtb_y_le, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_h); + u1Incartarget(rtb_y_le, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_h); /* MATLAB Function: '/Y1-Y4 для FLL_tg_incar' */ Y1Y4FLL_tg_incar(rtb_y_le, rtb_Merge_j, rtb_y_gm); @@ -10255,7 +10255,7 @@ void HVAC_model_step(void) rtb_rate += (double)((rtb_y_co + rtb_y_ge) + rtb_y_h); /* RelationalOperator: '/LowerRelop1' */ - rtb_RelationalOperator2_nm = (rtb_rate > rtb_y_i); + rtb_RelationalOperator2_i = (rtb_rate > rtb_y_i); /* MATLAB Function: '/FLL_tg_min' */ FLL_tg_min(rtb_y_le, rtb_Merge_j, &rtb_y_h); @@ -10264,7 +10264,7 @@ void HVAC_model_step(void) * RelationalOperator: '/UpperRelop' * Switch: '/Switch' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { rtb_rate = rtb_y_i; } else if (rtb_rate < rtb_y_h) { /* Switch: '/Switch' */ @@ -10274,7 +10274,7 @@ void HVAC_model_step(void) /* End of Switch: '/Switch2' */ /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/correction rate' */ /* : correct_after_time = [g_assCORRECT_DUCT_MAX_LV0; g_assCORRECT_DUCT_MAX_LV1; g_assCORRECT_DUCT_MAX_LV2; g_assCORRECT_DUCT_MAX_LV3; g_assCORRECT_DUCT_MAX_LV4; g_assCORRECT_DUCT_MAX_LV5]; */ @@ -10303,14 +10303,14 @@ void HVAC_model_step(void) * Gain: '/из сек в мс' * MATLAB Function: '/correction_start_time' */ - rtb_RelationalOperator2_nm = ((int64_t)rtb_Subtract >= tmp[i] * 1000); + rtb_RelationalOperator2_i = ((int64_t)rtb_Subtract >= tmp[i] * 1000); /* Switch: '/Switch' incorporates: * Constant: '/Constant' * Logic: '/ After start control system works X sec' * UnitDelay: '/Unit Delay' */ - if (rtb_RelationalOperator2_nm && (rtDW.UnitDelay_DSTATE_l0 != 0)) { + if (rtb_RelationalOperator2_i && (rtDW.UnitDelay_DSTATE_l0 != 0)) { /* Product: '/Product' incorporates: * Constant: '/Constant1' * Product: '/Divide' @@ -10369,7 +10369,7 @@ void HVAC_model_step(void) FLL_tg_max(rtb_y_c23, rtb_Merge_j, &rtb_y_le); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 FRL_tg' */ /* : FLU_tg = [g_assTG_FRL_LV0; g_assTG_FRL_LV1; g_assTG_FRL_LV2; g_assTG_FRL_LV3; g_assTG_FRL_LV4; g_assTG_FRL_LV5]; */ @@ -10383,7 +10383,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(FLU_tg)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_c23 - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_c23 - 15 <= 13)) { /* : y = (FLU_tg(LVL + 1, SET - 16) + FLU_tg(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_c23 - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_c23 - 16) * 6 + rtb_Merge_j]; @@ -10403,7 +10403,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/2.3 FRL_tg' */ /* MATLAB Function: '/2.1 Incar target' */ - u1Incartarget(rtb_y_c23, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_i); + u1Incartarget(rtb_y_c23, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_i); /* MATLAB Function: '/Y1-Y4 для FRL_tg_incar' */ Y1Y4FLL_tg_incar(rtb_y_c23, rtb_Merge_j, rtb_y_gm); @@ -10494,7 +10494,7 @@ void HVAC_model_step(void) rtb_Divide3 += (double)((rtb_y_co + rtb_y_ge) + rtb_y_h); /* RelationalOperator: '/LowerRelop1' */ - rtb_RelationalOperator2_nm = (rtb_Divide3 > rtb_y_le); + rtb_RelationalOperator2_i = (rtb_Divide3 > rtb_y_le); /* MATLAB Function: '/FRL_tg_min' */ FLL_tg_min(rtb_y_c23, rtb_Merge_j, &rtb_y_i); @@ -10503,7 +10503,7 @@ void HVAC_model_step(void) * RelationalOperator: '/UpperRelop' * Switch: '/Switch' */ - if (rtb_RelationalOperator2_nm) { + if (rtb_RelationalOperator2_i) { rtb_Divide3 = rtb_y_le; } else if (rtb_Divide3 < rtb_y_i) { /* Switch: '/Switch' */ @@ -10513,7 +10513,7 @@ void HVAC_model_step(void) /* End of Switch: '/Switch2' */ /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/correction rate' */ /* : correct_after_time = [g_assCORRECT_DUCT_MAX_LV0; g_assCORRECT_DUCT_MAX_LV1; g_assCORRECT_DUCT_MAX_LV2; g_assCORRECT_DUCT_MAX_LV3; g_assCORRECT_DUCT_MAX_LV4; g_assCORRECT_DUCT_MAX_LV5]; */ @@ -11817,7 +11817,7 @@ void HVAC_model_step(void) /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' */ - rtb_RelationalOperator2_nm = (rtb_Divide8 < 0.15); + rtb_RelationalOperator2_i = (rtb_Divide8 < 0.15); /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' @@ -11825,7 +11825,7 @@ void HVAC_model_step(void) rtb_Compare_gq = (rtb_Divide8 > 4.9); /* Logic: '/Logical Operator2' */ - rtb_Compare_e = (rtb_RelationalOperator2_nm || rtb_Compare_gq); + rtb_Compare_e = (rtb_RelationalOperator2_i || rtb_Compare_gq); /* Logic: '/Logical Operator3' incorporates: * Constant: '/Constant' @@ -11895,7 +11895,7 @@ void HVAC_model_step(void) /* DataStoreWrite: '/Data Store Write' incorporates: * DataTypeConversion: '/Data Type Conversion1' */ - rtDW.dtc_state_error_model[32] = rtb_RelationalOperator2_nm; + rtDW.dtc_state_error_model[32] = rtb_RelationalOperator2_i; /* DataStoreWrite: '/Data Store Write1' incorporates: * DataTypeConversion: '/Data Type Conversion2' @@ -12208,7 +12208,7 @@ void HVAC_model_step(void) /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' */ - rtb_RelationalOperator2_nm = (rtb_Divide3 < 0.15); + rtb_RelationalOperator2_i = (rtb_Divide3 < 0.15); /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' @@ -12216,7 +12216,7 @@ void HVAC_model_step(void) rtb_Compare_gq = (rtb_Divide3 > 4.9); /* Logic: '/Logical Operator2' */ - rtb_Compare_m4 = (rtb_RelationalOperator2_nm || rtb_Compare_gq); + rtb_Compare_m4 = (rtb_RelationalOperator2_i || rtb_Compare_gq); /* Logic: '/Logical Operator3' incorporates: * Constant: '/Constant' @@ -12285,7 +12285,7 @@ void HVAC_model_step(void) /* DataStoreWrite: '/Data Store Write' incorporates: * DataTypeConversion: '/Data Type Conversion1' */ - rtDW.dtc_state_error_model[7] = rtb_RelationalOperator2_nm; + rtDW.dtc_state_error_model[7] = rtb_RelationalOperator2_i; /* DataStoreWrite: '/Data Store Write1' incorporates: * DataTypeConversion: '/Data Type Conversion2' @@ -12391,7 +12391,7 @@ void HVAC_model_step(void) /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' */ - rtb_RelationalOperator2_nm = (rtb_rate < 0.15); + rtb_RelationalOperator2_i = (rtb_rate < 0.15); /* RelationalOperator: '/Compare' incorporates: * Constant: '/Constant' @@ -12399,7 +12399,7 @@ void HVAC_model_step(void) rtb_Compare_gq = (rtb_rate > 4.9); /* Logic: '/Logical Operator' */ - rtb_Compare_lus = (rtb_RelationalOperator2_nm || rtb_Compare_gq); + rtb_Compare_lus = (rtb_RelationalOperator2_i || rtb_Compare_gq); /* Logic: '/Logical Operator1' incorporates: * Constant: '/Constant' @@ -12487,7 +12487,7 @@ void HVAC_model_step(void) /* DataStoreWrite: '/Data Store Write' incorporates: * DataTypeConversion: '/Data Type Conversion1' */ - rtDW.dtc_state_error_model[5] = rtb_RelationalOperator2_nm; + rtDW.dtc_state_error_model[5] = rtb_RelationalOperator2_i; /* DataStoreWrite: '/Data Store Write1' incorporates: * DataTypeConversion: '/Data Type Conversion2' @@ -12585,8 +12585,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/Write IncarRR' */ /* Logic: '/Logical Operator4' */ - rtb_RelationalOperator2_nm = (rtb_LogicalOperator1_l || - rtb_LogicalOperator3_p0); + rtb_RelationalOperator2_i = (rtb_LogicalOperator1_l || rtb_LogicalOperator3_p0); /* Switch: '/Switch' incorporates: * DataStoreRead: '/Data Store Read4' @@ -13178,7 +13177,7 @@ void HVAC_model_step(void) */ CCU_Errors_Model.CCU_IncarTempErrF_Stat = (uint8_t)(rtb_Compare_mt || rtb_Compare_fr); - CCU_Errors_Model.CCU_IncarTempErrR_Stat = rtb_RelationalOperator2_nm; + CCU_Errors_Model.CCU_IncarTempErrR_Stat = rtb_RelationalOperator2_i; CCU_Errors_Model.CCU_DuctTempSenErrF_Stat = (uint8_t)(rtb_LogicalOperator3_cz || rtb_LogicalOperator4_fo || rtb_LogicalOperator6 || rtb_LogicalOperator8 || rtb_LogicalOperator10 || rtb_LogicalOperator11); @@ -13242,7 +13241,7 @@ void HVAC_model_step(void) Vtg_RX_plus_max(rtb_y_ktj, rtb_Merge_j, &rtb_y_kj); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 Vtg_RL' incorporates: * Gain: '/Gain2' @@ -13258,7 +13257,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(Vtg_RLU)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_ktj - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_ktj - 15 <= 13)) { /* : y = (Vtg_RLU(LVL + 1, SET - 16) + Vtg_RLU(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_ktj - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_ktj - 16) * 6 + rtb_Merge_j]; @@ -13280,7 +13279,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/2.1 Incar target Left' incorporates: * Gain: '/Gain2' */ - u1Incartarget_e(rtb_y_ktj, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_h); + u1Incartarget_e(rtb_y_ktj, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_h); /* MATLAB Function: '/Y1-Y4 для Vtg_FX_incar' incorporates: * Gain: '/Gain2' @@ -13369,7 +13368,7 @@ void HVAC_model_step(void) /* RelationalOperator: '/LowerRelop1' incorporates: * Sum: '/2.8. Vtg_FX_plus' */ - rtb_RelationalOperator2_nm = ((double)((rtb_y_im + rtb_y_ge) + rtb_y_h) + + rtb_RelationalOperator2_i = ((double)((rtb_y_im + rtb_y_ge) + rtb_y_h) + rtb_Divide3 > rtb_y_kj); /* MATLAB Function: '/Vtg_RX_plus_min' incorporates: @@ -13404,7 +13403,7 @@ void HVAC_model_step(void) Vtg_RX_plus_max(rtb_y_im, rtb_Merge_j, &rtb_y_p); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 Vtg_RR' incorporates: * Gain: '/Gain2' @@ -13420,7 +13419,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(Vtg_RR)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_im - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_im - 15 <= 13)) { /* : y = (Vtg_RR(LVL + 1, SET - 16) + Vtg_RR(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_im - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_im - 16) * 6 + rtb_Merge_j]; @@ -13442,7 +13441,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/2.1 Incar target Rear Right' incorporates: * Gain: '/Gain2' */ - u1Incartarget_p(rtb_y_im, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_kj); + u1Incartarget_p(rtb_y_im, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_kj); /* MATLAB Function: '/Y1-Y4 для Vtg_RX_incar' incorporates: * Gain: '/Gain2' @@ -13530,7 +13529,7 @@ void HVAC_model_step(void) /* RelationalOperator: '/LowerRelop1' incorporates: * Sum: '/FLU_tg_correct' */ - rtb_RelationalOperator2_nm = ((double)((rtb_y_mr + rtb_y_ge) + rtb_y_h) + + rtb_RelationalOperator2_i = ((double)((rtb_y_mr + rtb_y_ge) + rtb_y_h) + rtb_Divide3 > rtb_y_p); /* MATLAB Function: '/Vtg_RX_plus_min' incorporates: @@ -13542,7 +13541,7 @@ void HVAC_model_step(void) Vtg_FX_plus_max(rtb_y_ktj, rtb_Merge_j, &rtb_y_kj); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 Vtg_FLU' */ /* : Vtg_FLU = [g_assVTG_FL_LV0; g_assVTG_FL_LV1; g_assVTG_FL_LV2; g_assVTG_FL_LV3; g_assVTG_FL_LV4; g_assVTG_FL_LV5]; */ @@ -13556,7 +13555,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(Vtg_FLU)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_ktj - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_ktj - 15 <= 13)) { /* : y = (Vtg_FLU(LVL + 1, SET - 16) + Vtg_FLU(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_ktj - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_ktj - 16) * 6 + rtb_Merge_j]; @@ -13576,7 +13575,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/2.3 Vtg_FLU' */ /* MATLAB Function: '/2.1 Incar target Left' */ - u1Incartarget(rtb_y_ktj, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_h); + u1Incartarget(rtb_y_ktj, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_h); /* MATLAB Function: '/Y1-Y4 для Vtg_FX_incar' */ Y1Y4Vtg_FX_incar(rtb_y_ktj, rtb_Merge_j, rtb_y_gm); @@ -13647,14 +13646,14 @@ void HVAC_model_step(void) /* RelationalOperator: '/LowerRelop1' incorporates: * Sum: '/2.8. Vtg_FX_plus' */ - rtb_RelationalOperator2_nm = ((double)((rtb_y_p + rtb_y_ge) + rtb_y_h) + + rtb_RelationalOperator2_i = ((double)((rtb_y_p + rtb_y_ge) + rtb_y_h) + rtb_Divide3 > rtb_y_kj); /* MATLAB Function: '/Vtg_FX_plus_min' */ Vtg_FX_plus_min(rtb_y_ktj, rtb_Merge_j, &rtb_y_h); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation_as, &rtb_RelationalOperator2_i); /* MATLAB Function: '/correction rate' */ /* : correct_after_time = [g_assCORRECT_AF_MAX_LV0; g_assCORRECT_AF_MAX_LV1; g_assCORRECT_AF_MAX_LV2; g_assCORRECT_AF_MAX_LV3; g_assCORRECT_AF_MAX_LV4; g_assCORRECT_AF_MAX_LV5]; */ @@ -13680,14 +13679,14 @@ void HVAC_model_step(void) * Sum: '/Subtract' * UnitDelay: '/t_start_delay_private ' */ - rtb_RelationalOperator2_nm = ((int64_t)(rtDW.t_now - + rtb_RelationalOperator2_i = ((int64_t)(rtDW.t_now - rtDW.t_start_delay_private_DSTATE_gx) >= tmp[rtb_y_i_tmp] * 1000); /* MATLAB Function: '/Vtg_FX_plus_max' */ Vtg_FX_plus_max(rtb_y_im, rtb_Merge_j, &rtb_y_ktj); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/2.3 Vtg_FRU' */ /* : Vtg_FLU = [g_assVTG_FR_LV0; g_assVTG_FR_LV1; g_assVTG_FR_LV2; g_assVTG_FR_LV3; g_assVTG_FR_LV4; g_assVTG_FR_LV5]; */ @@ -13701,7 +13700,7 @@ void HVAC_model_step(void) } /* : if set_has_half && (SET - 16 + 1 <= length(Vtg_FLU)) */ - if (rtb_RelationalOperator2_nm && (rtb_y_im - 15 <= 13)) { + if (rtb_RelationalOperator2_i && (rtb_y_im - 15 <= 13)) { /* : y = (Vtg_FLU(LVL + 1, SET - 16) + Vtg_FLU(LVL + 1, SET - 16 + 1)) / 2; */ i = FLU_tg[(rtb_y_im - 17) * 6 + rtb_Merge_j] + FLU_tg[(rtb_y_im - 16) * 6 + rtb_Merge_j]; @@ -13721,7 +13720,7 @@ void HVAC_model_step(void) /* End of MATLAB Function: '/2.3 Vtg_FRU' */ /* MATLAB Function: '/2.1 Incar target Right' */ - u1Incartarget_l(rtb_y_im, rtb_Merge_j, rtb_RelationalOperator2_nm, &rtb_y_kj); + u1Incartarget_l(rtb_y_im, rtb_Merge_j, rtb_RelationalOperator2_i, &rtb_y_kj); /* MATLAB Function: '/Y1-Y4 для Vtg_FX_incar' */ Y1Y4Vtg_FX_incar(rtb_y_im, rtb_Merge_j, rtb_y_gm); @@ -13792,14 +13791,14 @@ void HVAC_model_step(void) /* RelationalOperator: '/LowerRelop1' incorporates: * Sum: '/FLU_tg_correct' */ - rtb_RelationalOperator2_nm = ((double)((rtb_y_p + rtb_y_ge) + rtb_y_h) + + rtb_RelationalOperator2_i = ((double)((rtb_y_p + rtb_y_ge) + rtb_y_h) + rtb_Divide3 > rtb_y_ktj); /* MATLAB Function: '/FXU_tg_min' */ Vtg_FX_plus_min(rtb_y_im, rtb_Merge_j, &rtb_y_kj); /* MATLAB Function: '/is_ending_with_5' */ - is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_nm); + is_ending_with_5(rtb_Saturation1, &rtb_RelationalOperator2_i); /* MATLAB Function: '/correction rate' */ /* : correct_after_time = [g_assCORRECT_AF_MAX_LV0; g_assCORRECT_AF_MAX_LV1; g_assCORRECT_AF_MAX_LV2; g_assCORRECT_AF_MAX_LV3; g_assCORRECT_AF_MAX_LV4; g_assCORRECT_AF_MAX_LV5]; */ @@ -20160,6 +20159,375 @@ void HVAC_model_step(void) /* End of Switch: '/Switch' */ /* Outputs for Atomic SubSystem: '/PWM and valves in manual' */ + /* MATLAB Function: '/AF for Def' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforDef(rtDW.CCU_BLOWERS_FL, &rtb_Saturation1); + + /* MATLAB Function: '/AF for Vent mode' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforVentmode(rtDW.CCU_BLOWERS_FL, &rtb_Saturation2); + + /* MATLAB Function: '/AF for Hi_Level' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforHi_Level(rtDW.CCU_BLOWERS_FL, &rtb_out_eyx); + + /* MATLAB Function: '/AF for Foot' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforFoot(rtDW.CCU_BLOWERS_FL, &rtb_out_ci); + + /* MATLAB Function: '/AF for Foor + Def' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforFoorDef(rtDW.CCU_BLOWERS_FL, &rtb_out_ik); + + /* MATLAB Function: '/AF for Bi Level' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforBiLevel(rtDW.CCU_BLOWERS_FL, &rtb_out_gyw); + + /* MATLAB Function: '/AF for Tri-Level' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + AFforTriLevel(rtDW.CCU_BLOWERS_FL, &rtb_Saturation_as); + + /* MultiPortSwitch: '/Multiport Switch' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read6' + * DataStoreRead: '/Data Store Read8' + * DataStoreRead: '/Data Store Read9' + * Gain: '/Gain1' + * Gain: '/Gain2' + * RelationalOperator: '/Relational Operator' + * RelationalOperator: '/Relational Operator1' + * RelationalOperator: '/Relational Operator2' + * Sum: '/Add' + */ + switch ((int32_t)(((uint32_t)((rtDW.CCU_FACE_FL == 1) << 1) + (uint32_t) + (rtDW.CCU_DEF_FL == 1)) + (uint32_t)((rtDW.CCU_FOOT_FL == 1) + << 2))) { + case 0: + rtb_Saturation_as = 0U; + break; + + case 1: + rtb_Saturation_as = rtb_Saturation1; + break; + + case 2: + rtb_Saturation_as = rtb_Saturation2; + break; + + case 3: + rtb_Saturation_as = rtb_out_eyx; + break; + + case 4: + rtb_Saturation_as = rtb_out_ci; + break; + + case 5: + rtb_Saturation_as = rtb_out_ik; + break; + + case 6: + rtb_Saturation_as = rtb_out_gyw; + break; + } + + /* End of MultiPortSwitch: '/Multiport Switch' */ + + /* MATLAB Function: '/AF for Def' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforDef(rtDW.CCU_BLOWERS_FR, &rtb_Saturation2); + + /* MATLAB Function: '/AF for Vent mode' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforVentmode(rtDW.CCU_BLOWERS_FR, &rtb_out_eyx); + + /* MATLAB Function: '/AF for Hi_Level' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforHi_Level(rtDW.CCU_BLOWERS_FR, &rtb_out_ci); + + /* MATLAB Function: '/AF for Foot' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforFoot(rtDW.CCU_BLOWERS_FR, &rtb_out_ik); + + /* MATLAB Function: '/AF for Foor + Def' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforFoorDef(rtDW.CCU_BLOWERS_FR, &rtb_out_gyw); + + /* MATLAB Function: '/AF for Bi Level' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforBiLevel(rtDW.CCU_BLOWERS_FR, &rtb_out_gdu); + + /* MATLAB Function: '/AF for Tri-Level' incorporates: + * DataStoreRead: '/Data Store Read7' + */ + AFforTriLevel(rtDW.CCU_BLOWERS_FR, &rtb_Saturation1); + + /* MultiPortSwitch: '/Multiport Switch' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read12' + * DataStoreRead: '/Data Store Read13' + * DataStoreRead: '/Data Store Read14' + * Gain: '/Gain1' + * Gain: '/Gain2' + * RelationalOperator: '/Relational Operator' + * RelationalOperator: '/Relational Operator1' + * RelationalOperator: '/Relational Operator2' + * Sum: '/Add' + */ + switch ((int32_t)(((uint32_t)((rtDW.CCU_FACE_FR == 1) << 1) + (uint32_t) + (rtDW.CCU_DEF_FR == 1)) + (uint32_t)((rtDW.CCU_FOOT_FR == 1) + << 2))) { + case 0: + rtb_Saturation1 = 0U; + break; + + case 1: + rtb_Saturation1 = rtb_Saturation2; + break; + + case 2: + rtb_Saturation1 = rtb_out_eyx; + break; + + case 3: + rtb_Saturation1 = rtb_out_ci; + break; + + case 4: + rtb_Saturation1 = rtb_out_ik; + break; + + case 5: + rtb_Saturation1 = rtb_out_gyw; + break; + + case 6: + rtb_Saturation1 = rtb_out_gdu; + break; + } + + /* End of MultiPortSwitch: '/Multiport Switch' */ + + /* Product: '/Divide' incorporates: + * Constant: '/Constant' + * Sum: '/Add' + */ + rtb_Divide3 = (double)(uint16_t)((uint32_t)rtb_Saturation_as + rtb_Saturation1) + / 4.0; + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant1' + * Product: '/Divide1' + */ + if (rtb_Divide3 < 15.0) { + rtb_Divide3 *= 2.0; + } + + /* End of Switch: '/Switch' */ + + /* Saturate: '/Saturation' incorporates: + * DataTypeConversion: '/Data Type Conversion1' + */ + if ((uint8_t)rtb_Divide3 > 80) { + rtDW.PWM_front = 80U; + } else if ((uint8_t)rtb_Divide3 < 15) { + rtDW.PWM_front = 15U; + } else { + rtDW.PWM_front = (uint8_t)rtb_Divide3; + } + + /* End of Saturate: '/Saturation' */ + + /* DataTypeConversion: '/Data Type Conversion3' incorporates: + * DataStoreWrite: '/Data Store Write2' + */ + rtDW.Blower_AF_FL = (uint8_t)rtb_Saturation_as; + + /* DataTypeConversion: '/Data Type Conversion2' incorporates: + * DataStoreWrite: '/Data Store Write3' + */ + rtDW.Blower_AF_FR = (uint8_t)rtb_Saturation1; + + /* MATLAB Function: '/Write' incorporates: + * DataStoreWrite: '/Data Store Write' + */ + /* : fprintf('pwmFront_output = %u \n',data); */ + printf("pwmFront_output = %u \n", rtDW.PWM_front); + fflush(stdout); + + /* MATLAB Function: '/Write2' incorporates: + * DataStoreRead: '/Data Store Read11' + */ + /* : fprintf('speedL_input = %u \n',data); */ + printf("speedL_input = %u \n", rtDW.CCU_BLOWERS_FL); + fflush(stdout); + + /* Outputs for Enabled SubSystem: '/Rear zone PWM' incorporates: + * EnablePort: '/Enable' + */ + /* Logic: '/Logical Operator2' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant4' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read2' + * RelationalOperator: '/Equal1' + * RelationalOperator: '/Equal4' + */ + if ((rtDW.CCU_MODE_RL == 0) && (rtDW.CCU_MODE_RR == 0)) { + /* MATLAB Function: '/AF for Vent mode R' incorporates: + * DataStoreRead: '/Data Store Read18' + */ + AFforVentmodeR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation1); + + /* MATLAB Function: '/AF for Foot R' incorporates: + * DataStoreRead: '/Data Store Read18' + */ + AFforFootR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation2); + + /* MATLAB Function: '/AF for Bi Level R' incorporates: + * DataStoreRead: '/Data Store Read18' + */ + AFforBiLevelR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation_as); + + /* MultiPortSwitch: '/Multiport Switch' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read19' + * DataStoreRead: '/Data Store Read20' + * Gain: '/Gain2' + * RelationalOperator: '/Relational Operator1' + * RelationalOperator: '/Relational Operator2' + * Sum: '/Add' + */ + switch ((int32_t)((uint32_t)((rtDW.CCU_FOOT_RL == 1) << 1) + (uint32_t) + (rtDW.CCU_FACE_RL == 1))) { + case 0: + rtb_Saturation_as = 0U; + break; + + case 1: + rtb_Saturation_as = rtb_Saturation1; + break; + + case 2: + rtb_Saturation_as = rtb_Saturation2; + break; + } + + /* End of MultiPortSwitch: '/Multiport Switch' */ + + /* MATLAB Function: '/AF for Vent mode R' incorporates: + * DataStoreRead: '/Data Store Read15' + */ + AFforVentmodeR(rtDW.CCU_BLOWERS_RR, &rtb_Saturation2); + + /* MATLAB Function: '/AF for Foot R' incorporates: + * DataStoreRead: '/Data Store Read15' + */ + AFforFootR(rtDW.CCU_BLOWERS_RR, &rtb_out_eyx); + + /* MATLAB Function: '/AF for Bi Level R' incorporates: + * DataStoreRead: '/Data Store Read15' + */ + AFforBiLevelR(rtDW.CCU_BLOWERS_RR, &rtb_Saturation1); + + /* MultiPortSwitch: '/Multiport Switch' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read16' + * DataStoreRead: '/Data Store Read17' + * Gain: '/Gain2' + * RelationalOperator: '/Relational Operator1' + * RelationalOperator: '/Relational Operator2' + * Sum: '/Add' + */ + switch ((int32_t)((uint32_t)((rtDW.CCU_FOOT_RR == 1) << 1) + (uint32_t) + (rtDW.CCU_FACE_RR == 1))) { + case 0: + rtb_Saturation1 = 0U; + break; + + case 1: + rtb_Saturation1 = rtb_Saturation2; + break; + + case 2: + rtb_Saturation1 = rtb_out_eyx; + break; + } + + /* End of MultiPortSwitch: '/Multiport Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant1' + * Sum: '/Add1' + */ + rtb_Divide3 = (double)(uint16_t)((uint32_t)rtb_Saturation_as + + rtb_Saturation1) / 4.0; + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * Product: '/Divide2' + */ + if (rtb_Divide3 < 15.0) { + rtb_Divide3 *= 2.0; + } + + /* End of Switch: '/Switch' */ + + /* Saturate: '/Saturation' incorporates: + * DataTypeConversion: '/Data Type Conversion' + */ + if ((uint8_t)rtb_Divide3 <= 80) { + rtDW.PWM_rear = (uint8_t)rtb_Divide3; + } else { + rtDW.PWM_rear = 80U; + } + + /* End of Saturate: '/Saturation' */ + + /* DataTypeConversion: '/Data Type Conversion4' incorporates: + * DataStoreWrite: '/Data Store Write4' + */ + rtDW.Blower_AF_RL = (uint8_t)rtb_Saturation_as; + + /* DataTypeConversion: '/Data Type Conversion5' incorporates: + * DataStoreWrite: '/Data Store Write5' + */ + rtDW.Blower_AF_RR = (uint8_t)rtb_Saturation1; + + /* MATLAB Function: '/Write1' incorporates: + * DataStoreWrite: '/Data Store Write1' + */ + /* : fprintf('pwmRear_output = %u \n',data); */ + printf("pwmRear_output = %u \n", rtDW.PWM_rear); + fflush(stdout); + } + + /* End of Logic: '/Logical Operator2' */ + /* End of Outputs for SubSystem: '/Rear zone PWM' */ + /* Outputs for Enabled SubSystem: '/Front zone valves' incorporates: * EnablePort: '/Enable' */ @@ -20171,7 +20539,7 @@ void HVAC_model_step(void) * RelationalOperator: '/Equal2' * RelationalOperator: '/Equal3' */ - if ((rtDW.CCU_MODE_FL == 1) && (rtDW.CCU_MODE_FR == 1)) { + if ((rtDW.CCU_MODE_FL == 0) && (rtDW.CCU_MODE_FR == 0)) { /* MATLAB Function: '/Valves for Def' */ ValvesforDef(rtb_vals_m); @@ -20181,10 +20549,10 @@ void HVAC_model_step(void) /* MATLAB Function: '/Valves for Foot + Def' */ /* : out = g_ausFLOW_FR_FO2VALVE; */ - ValvesforFootDef(rtb_out_ic); + ValvesforFootDef(rtb_out_a5); /* MATLAB Function: '/Valves for Bi Level' */ - ValvesforBiLevel(rtb_out_k4); + ValvesforBiLevel(rtb_out_h0); /* MATLAB Function: '/Valves for Tri-Level' */ ValvesforTriLevel(rtDW.valves_front_manual_target); @@ -20248,14 +20616,14 @@ void HVAC_model_step(void) case 5: /* DataStoreWrite: '/Data Store Write' */ for (i = 0; i < 9; i++) { - rtDW.valves_front_manual_target[i] = rtb_out_ic[i]; + rtDW.valves_front_manual_target[i] = rtb_out_a5[i]; } break; case 6: /* DataStoreWrite: '/Data Store Write' */ for (i = 0; i < 9; i++) { - rtDW.valves_front_manual_target[i] = rtb_out_k4[i]; + rtDW.valves_front_manual_target[i] = rtb_out_h0[i]; } break; } @@ -20271,13 +20639,13 @@ void HVAC_model_step(void) /* MATLAB Function: '/Valves for Foot + Def' */ /* : out = g_ausFLOW_FR_FO2VALVE; */ - ValvesforFootDef(rtb_out_ic); + ValvesforFootDef(rtb_out_a5); /* MATLAB Function: '/Valves for Bi Level' */ - ValvesforBiLevel(rtb_out_k4); + ValvesforBiLevel(rtb_out_h0); /* MATLAB Function: '/Valves for Tri-Level' */ - ValvesforTriLevel(rtb_out_ly); + ValvesforTriLevel(rtb_out_mj); /* MultiPortSwitch: '/Multiport Switch' incorporates: * Constant: '/Constant' @@ -20300,43 +20668,43 @@ void HVAC_model_step(void) 1) << 2))) { case 0: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = 0U; + rtb_out_mj[i] = 0U; } break; case 1: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = rtb_vals_m[i]; + rtb_out_mj[i] = rtb_vals_m[i]; } break; case 2: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = g_ausFLOW_FR_VE2VALVE[i]; + rtb_out_mj[i] = g_ausFLOW_FR_VE2VALVE[i]; } break; case 3: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = Merge[i]; + rtb_out_mj[i] = Merge[i]; } break; case 4: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = g_ausFLOW_FR_FO2VALVE[i]; + rtb_out_mj[i] = g_ausFLOW_FR_FO2VALVE[i]; } break; case 5: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = rtb_out_ic[i]; + rtb_out_mj[i] = rtb_out_a5[i]; } break; case 6: for (i = 0; i < 9; i++) { - rtb_out_ly[i] = rtb_out_k4[i]; + rtb_out_mj[i] = rtb_out_h0[i]; } break; } @@ -20346,22 +20714,22 @@ void HVAC_model_step(void) /* Assignment: '/Присваивание в [3-4]' incorporates: * DataStoreWrite: '/Data Store Write' */ - rtDW.valves_front_manual_target[2] = rtb_out_ly[2]; + rtDW.valves_front_manual_target[2] = rtb_out_mj[2]; /* Assignment: '/Присваивание в [7-8]' incorporates: * DataStoreWrite: '/Data Store Write' */ - rtDW.valves_front_manual_target[6] = rtb_out_ly[6]; + rtDW.valves_front_manual_target[6] = rtb_out_mj[6]; /* Assignment: '/Присваивание в [3-4]' incorporates: * DataStoreWrite: '/Data Store Write' */ - rtDW.valves_front_manual_target[3] = rtb_out_ly[3]; + rtDW.valves_front_manual_target[3] = rtb_out_mj[3]; /* Assignment: '/Присваивание в [7-8]' incorporates: * DataStoreWrite: '/Data Store Write' */ - rtDW.valves_front_manual_target[7] = rtb_out_ly[7]; + rtDW.valves_front_manual_target[7] = rtb_out_mj[7]; } /* End of Logic: '/Logical Operator1' */ @@ -20378,7 +20746,7 @@ void HVAC_model_step(void) * RelationalOperator: '/Equal1' * RelationalOperator: '/Equal4' */ - if ((rtDW.CCU_MODE_RL == 1) && (rtDW.CCU_MODE_RR == 1)) { + if ((rtDW.CCU_MODE_RL == 0) && (rtDW.CCU_MODE_RR == 0)) { /* MATLAB Function: '/valves for Vent mode' */ valvesforVentmode(rtb_urear); @@ -20429,7 +20797,7 @@ void HVAC_model_step(void) /* MATLAB Function: '/AF for Bi Level' */ /* : out = g_ausFLOW_RE_FO2VALVE; */ - AFforBiLevel_m(rtb_out_pj); + AFforBiLevel_m(rtb_out_je); /* MultiPortSwitch: '/Multiport Switch' incorporates: * Constant: '/Constant1' @@ -20464,7 +20832,7 @@ void HVAC_model_step(void) default: for (i = 0; i < 6; i++) { - rtb_vals_m[i] = rtb_out_pj[i]; + rtb_vals_m[i] = rtb_out_je[i]; } break; } @@ -20485,391 +20853,6 @@ void HVAC_model_step(void) /* End of Logic: '/Logical Operator2' */ /* End of Outputs for SubSystem: '/Rear zone valves' */ - - /* Outputs for Enabled SubSystem: '/Fromt zone PWM' incorporates: - * EnablePort: '/Enable' - */ - /* Logic: '/Logical Operator1' incorporates: - * Constant: '/Constant2' - * Constant: '/Constant3' - * DataStoreRead: '/Data Store Read11' - * DataStoreRead: '/Data Store Read12' - * RelationalOperator: '/Equal2' - * RelationalOperator: '/Equal3' - */ - if ((rtDW.CCU_MODE_FL == 1) && (rtDW.CCU_MODE_FR == 1)) { - /* MATLAB Function: '/AF for Def' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforDef(rtDW.CCU_BLOWERS_FL, &rtb_Saturation1); - - /* MATLAB Function: '/AF for Vent mode' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforVentmode(rtDW.CCU_BLOWERS_FL, &rtb_Saturation2); - - /* MATLAB Function: '/AF for Hi_Level' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforHi_Level(rtDW.CCU_BLOWERS_FL, &rtb_out_dr); - - /* MATLAB Function: '/AF for Foot' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforFoot(rtDW.CCU_BLOWERS_FL, &rtb_out_jaw); - - /* MATLAB Function: '/AF for Foor + Def' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforFoorDef(rtDW.CCU_BLOWERS_FL, &rtb_out_pl); - - /* MATLAB Function: '/AF for Bi Level' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforBiLevel(rtDW.CCU_BLOWERS_FL, &rtb_out_po); - - /* MATLAB Function: '/AF for Tri-Level' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - AFforTriLevel(rtDW.CCU_BLOWERS_FL, &rtb_Saturation_as); - - /* MultiPortSwitch: '/Multiport Switch' incorporates: - * Constant: '/Constant' - * Constant: '/Constant1' - * Constant: '/Constant2' - * Constant: '/Constant3' - * DataStoreRead: '/Data Store Read6' - * DataStoreRead: '/Data Store Read8' - * DataStoreRead: '/Data Store Read9' - * Gain: '/Gain1' - * Gain: '/Gain2' - * RelationalOperator: '/Relational Operator' - * RelationalOperator: '/Relational Operator1' - * RelationalOperator: '/Relational Operator2' - * Sum: '/Add' - */ - switch ((int32_t)(((uint32_t)((rtDW.CCU_FACE_FL == 1) << 1) + (uint32_t) - (rtDW.CCU_DEF_FL == 1)) + (uint32_t)((rtDW.CCU_FOOT_FL == - 1) << 2))) { - case 0: - rtb_Saturation_as = 0U; - break; - - case 1: - rtb_Saturation_as = rtb_Saturation1; - break; - - case 2: - rtb_Saturation_as = rtb_Saturation2; - break; - - case 3: - rtb_Saturation_as = rtb_out_dr; - break; - - case 4: - rtb_Saturation_as = rtb_out_jaw; - break; - - case 5: - rtb_Saturation_as = rtb_out_pl; - break; - - case 6: - rtb_Saturation_as = rtb_out_po; - break; - } - - /* End of MultiPortSwitch: '/Multiport Switch' */ - - /* MATLAB Function: '/AF for Def' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforDef(rtDW.CCU_BLOWERS_FR, &rtb_Saturation2); - - /* MATLAB Function: '/AF for Vent mode' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforVentmode(rtDW.CCU_BLOWERS_FR, &rtb_out_dr); - - /* MATLAB Function: '/AF for Hi_Level' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforHi_Level(rtDW.CCU_BLOWERS_FR, &rtb_out_jaw); - - /* MATLAB Function: '/AF for Foot' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforFoot(rtDW.CCU_BLOWERS_FR, &rtb_out_pl); - - /* MATLAB Function: '/AF for Foor + Def' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforFoorDef(rtDW.CCU_BLOWERS_FR, &rtb_out_po); - - /* MATLAB Function: '/AF for Bi Level' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforBiLevel(rtDW.CCU_BLOWERS_FR, &rtb_out_bz); - - /* MATLAB Function: '/AF for Tri-Level' incorporates: - * DataStoreRead: '/Data Store Read7' - */ - AFforTriLevel(rtDW.CCU_BLOWERS_FR, &rtb_Saturation1); - - /* MultiPortSwitch: '/Multiport Switch' incorporates: - * Constant: '/Constant' - * Constant: '/Constant1' - * Constant: '/Constant2' - * Constant: '/Constant3' - * DataStoreRead: '/Data Store Read12' - * DataStoreRead: '/Data Store Read13' - * DataStoreRead: '/Data Store Read14' - * Gain: '/Gain1' - * Gain: '/Gain2' - * RelationalOperator: '/Relational Operator' - * RelationalOperator: '/Relational Operator1' - * RelationalOperator: '/Relational Operator2' - * Sum: '/Add' - */ - switch ((int32_t)(((uint32_t)((rtDW.CCU_FACE_FR == 1) << 1) + (uint32_t) - (rtDW.CCU_DEF_FR == 1)) + (uint32_t)((rtDW.CCU_FOOT_FR == - 1) << 2))) { - case 0: - rtb_Saturation1 = 0U; - break; - - case 1: - rtb_Saturation1 = rtb_Saturation2; - break; - - case 2: - rtb_Saturation1 = rtb_out_dr; - break; - - case 3: - rtb_Saturation1 = rtb_out_jaw; - break; - - case 4: - rtb_Saturation1 = rtb_out_pl; - break; - - case 5: - rtb_Saturation1 = rtb_out_po; - break; - - case 6: - rtb_Saturation1 = rtb_out_bz; - break; - } - - /* End of MultiPortSwitch: '/Multiport Switch' */ - - /* Product: '/Divide' incorporates: - * Constant: '/Constant' - * Sum: '/Add' - */ - rtb_Divide3 = (double)(uint16_t)((uint32_t)rtb_Saturation_as + - rtb_Saturation1) / 4.0; - - /* Switch: '/Switch' incorporates: - * Constant: '/Constant1' - * Product: '/Divide1' - */ - if (rtb_Divide3 < 15.0) { - rtb_Divide3 *= 2.0; - } - - /* End of Switch: '/Switch' */ - - /* Saturate: '/Saturation' incorporates: - * DataTypeConversion: '/Data Type Conversion1' - */ - if ((uint8_t)rtb_Divide3 > 80) { - rtDW.PWM_front = 80U; - } else if ((uint8_t)rtb_Divide3 < 15) { - rtDW.PWM_front = 15U; - } else { - rtDW.PWM_front = (uint8_t)rtb_Divide3; - } - - /* End of Saturate: '/Saturation' */ - - /* DataTypeConversion: '/Data Type Conversion3' incorporates: - * DataStoreWrite: '/Data Store Write2' - */ - rtDW.Blower_AF_FL = (uint8_t)rtb_Saturation_as; - - /* DataTypeConversion: '/Data Type Conversion2' incorporates: - * DataStoreWrite: '/Data Store Write3' - */ - rtDW.Blower_AF_FR = (uint8_t)rtb_Saturation1; - - /* MATLAB Function: '/Write' incorporates: - * DataStoreWrite: '/Data Store Write' - */ - /* : fprintf('pwmFront_output = %u \n',data); */ - printf("pwmFront_output = %u \n", rtDW.PWM_front); - fflush(stdout); - - /* MATLAB Function: '/Write2' incorporates: - * DataStoreRead: '/Data Store Read11' - */ - /* : fprintf('speedL_input = %u \n',data); */ - printf("speedL_input = %u \n", rtDW.CCU_BLOWERS_FL); - fflush(stdout); - } - - /* End of Logic: '/Logical Operator1' */ - /* End of Outputs for SubSystem: '/Fromt zone PWM' */ - - /* Outputs for Enabled SubSystem: '/Rear zone PWM' incorporates: - * EnablePort: '/Enable' - */ - /* Logic: '/Logical Operator2' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant4' - * DataStoreRead: '/Data Store Read1' - * DataStoreRead: '/Data Store Read2' - * RelationalOperator: '/Equal1' - * RelationalOperator: '/Equal4' - */ - if ((rtDW.CCU_MODE_RL == 1) && (rtDW.CCU_MODE_RR == 1)) { - /* MATLAB Function: '/AF for Vent mode R' incorporates: - * DataStoreRead: '/Data Store Read18' - */ - AFforVentmodeR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation1); - - /* MATLAB Function: '/AF for Foot R' incorporates: - * DataStoreRead: '/Data Store Read18' - */ - AFforFootR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation2); - - /* MATLAB Function: '/AF for Bi Level R' incorporates: - * DataStoreRead: '/Data Store Read18' - */ - AFforBiLevelR(rtDW.CCU_BLOWERS_RL, &rtb_Saturation_as); - - /* MultiPortSwitch: '/Multiport Switch' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant2' - * Constant: '/Constant3' - * DataStoreRead: '/Data Store Read19' - * DataStoreRead: '/Data Store Read20' - * Gain: '/Gain2' - * RelationalOperator: '/Relational Operator1' - * RelationalOperator: '/Relational Operator2' - * Sum: '/Add' - */ - switch ((int32_t)((uint32_t)((rtDW.CCU_FOOT_RL == 1) << 1) + (uint32_t) - (rtDW.CCU_FACE_RL == 1))) { - case 0: - rtb_Saturation_as = 0U; - break; - - case 1: - rtb_Saturation_as = rtb_Saturation1; - break; - - case 2: - rtb_Saturation_as = rtb_Saturation2; - break; - } - - /* End of MultiPortSwitch: '/Multiport Switch' */ - - /* MATLAB Function: '/AF for Vent mode R' incorporates: - * DataStoreRead: '/Data Store Read15' - */ - AFforVentmodeR(rtDW.CCU_BLOWERS_RR, &rtb_Saturation2); - - /* MATLAB Function: '/AF for Foot R' incorporates: - * DataStoreRead: '/Data Store Read15' - */ - AFforFootR(rtDW.CCU_BLOWERS_RR, &rtb_out_dr); - - /* MATLAB Function: '/AF for Bi Level R' incorporates: - * DataStoreRead: '/Data Store Read15' - */ - AFforBiLevelR(rtDW.CCU_BLOWERS_RR, &rtb_Saturation1); - - /* MultiPortSwitch: '/Multiport Switch' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant2' - * Constant: '/Constant3' - * DataStoreRead: '/Data Store Read16' - * DataStoreRead: '/Data Store Read17' - * Gain: '/Gain2' - * RelationalOperator: '/Relational Operator1' - * RelationalOperator: '/Relational Operator2' - * Sum: '/Add' - */ - switch ((int32_t)((uint32_t)((rtDW.CCU_FOOT_RR == 1) << 1) + (uint32_t) - (rtDW.CCU_FACE_RR == 1))) { - case 0: - rtb_Saturation1 = 0U; - break; - - case 1: - rtb_Saturation1 = rtb_Saturation2; - break; - - case 2: - rtb_Saturation1 = rtb_out_dr; - break; - } - - /* End of MultiPortSwitch: '/Multiport Switch' */ - - /* Product: '/Divide1' incorporates: - * Constant: '/Constant1' - * Sum: '/Add1' - */ - rtb_Divide3 = (double)(uint16_t)((uint32_t)rtb_Saturation_as + - rtb_Saturation1) / 4.0; - - /* Switch: '/Switch' incorporates: - * Constant: '/Constant2' - * Product: '/Divide2' - */ - if (rtb_Divide3 < 15.0) { - rtb_Divide3 *= 2.0; - } - - /* End of Switch: '/Switch' */ - - /* Saturate: '/Saturation' incorporates: - * DataTypeConversion: '/Data Type Conversion' - */ - if ((uint8_t)rtb_Divide3 <= 80) { - rtDW.PWM_rear = (uint8_t)rtb_Divide3; - } else { - rtDW.PWM_rear = 80U; - } - - /* End of Saturate: '/Saturation' */ - - /* DataTypeConversion: '/Data Type Conversion4' incorporates: - * DataStoreWrite: '/Data Store Write4' - */ - rtDW.Blower_AF_RL = (uint8_t)rtb_Saturation_as; - - /* DataTypeConversion: '/Data Type Conversion5' incorporates: - * DataStoreWrite: '/Data Store Write5' - */ - rtDW.Blower_AF_RR = (uint8_t)rtb_Saturation1; - - /* MATLAB Function: '/Write1' incorporates: - * DataStoreWrite: '/Data Store Write1' - */ - /* : fprintf('pwmRear_output = %u \n',data); */ - printf("pwmRear_output = %u \n", rtDW.PWM_rear); - fflush(stdout); - } - - /* End of Logic: '/Logical Operator2' */ - /* End of Outputs for SubSystem: '/Rear zone PWM' */ /* End of Outputs for SubSystem: '/PWM and valves in manual' */ /* If: '/если SC front не завершен' incorporates: @@ -21625,18 +21608,18 @@ void HVAC_model_step(void) /* MATLAB Function: '/blower min max' incorporates: * DataStoreRead: '/Data Store Read7' */ - blowerminmax(rtDW.LEVEL, rtb_out_jq); + blowerminmax(rtDW.LEVEL, rtb_out_f0); /* MATLAB Function: '/ECT min max' incorporates: * DataStoreRead: '/Data Store Read7' */ - ECTminmax(rtDW.LEVEL, rtb_out_j4); + ECTminmax(rtDW.LEVEL, rtb_out_p5); /* Lookup_n-D: '/blower для текущего ECT' incorporates: * DataStoreRead: '/engine coolant temp' */ - rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_j4, - rtb_out_jq, 1U); + rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_p5, + rtb_out_f0, 1U); /* DataStoreWrite: '/Data Store Write6' incorporates: * DataTypeConversion: '/Data Type Conversion' @@ -23323,20 +23306,20 @@ void HVAC_model_step(void) /* MATLAB Function: '/blower start finish' incorporates: * DataStoreRead: '/Data Store Read7' */ - blowerstartfinish(rtDW.LEVEL, rtb_out_jq); + blowerstartfinish(rtDW.LEVEL, rtb_out_f0); /* MATLAB Function: '/ECT min max' */ /* : min = int16(g_assSTART_COOLANT_STEP0_TO_1(5)); */ /* : max = int16(g_assSTART_COOLANT_TO_STEP2(2)); */ /* : out = [min, max]; */ - rtb_out_j4[0] = g_assSTART_COOLANT_STEP0_TO_1[4]; - rtb_out_j4[1] = g_assSTART_COOLANT_TO_STEP2[1]; + rtb_out_p5[0] = g_assSTART_COOLANT_STEP0_TO_1[4]; + rtb_out_p5[1] = g_assSTART_COOLANT_TO_STEP2[1]; /* Lookup_n-D: '/blower для текущего ECT' incorporates: * DataStoreRead: '/engine coolant temp' */ - rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_j4, - rtb_out_jq, 1U); + rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_p5, + rtb_out_f0, 1U); /* DataTypeConversion: '/Data Type Conversion1' incorporates: * DataStoreWrite: '/Data Store Write5' @@ -23437,18 +23420,18 @@ void HVAC_model_step(void) /* MATLAB Function: '/blower start finish' incorporates: * DataStoreRead: '/Data Store Read7' */ - blowerstartfinish(rtDW.LEVEL, rtb_out_jq); + blowerstartfinish(rtDW.LEVEL, rtb_out_f0); /* MATLAB Function: '/ECT min max' incorporates: * DataStoreRead: '/Data Store Read7' */ - ECTminmax_l(rtDW.LEVEL, rtb_out_j4); + ECTminmax_l(rtDW.LEVEL, rtb_out_p5); /* Lookup_n-D: '/blower для текущего ECT' incorporates: * DataStoreRead: '/engine coolant temp' */ - rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_j4, - rtb_out_jq, 1U); + rtb_LVL = look1_is16lu64n32tu16Ds32Is16_binlcs(rtDW.ECT, rtb_out_p5, + rtb_out_f0, 1U); /* DataTypeConversion: '/Data Type Conversion1' incorporates: * DataStoreWrite: '/Data Store Write5' diff --git a/HVAC_model.h b/HVAC_model.h index 98ec403..a37c697 100644 --- a/HVAC_model.h +++ b/HVAC_model.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'HVAC_model'. * - * Model version : 1.956 + * Model version : 1.960 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Tue May 19 12:18:47 2026 + * C/C++ source code generated on : Tue May 19 16:51:26 2026 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M diff --git a/HVAC_model_data.c b/HVAC_model_data.c index e9d1c18..b198a31 100644 --- a/HVAC_model_data.c +++ b/HVAC_model_data.c @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'HVAC_model'. * - * Model version : 1.956 + * Model version : 1.960 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Tue May 19 12:18:47 2026 + * C/C++ source code generated on : Tue May 19 16:51:26 2026 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M diff --git a/HVAC_model_private.h b/HVAC_model_private.h index d9cfff8..df78151 100644 --- a/HVAC_model_private.h +++ b/HVAC_model_private.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'HVAC_model'. * - * Model version : 1.956 + * Model version : 1.960 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Tue May 19 12:18:47 2026 + * C/C++ source code generated on : Tue May 19 16:51:26 2026 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M diff --git a/HVAC_model_types.h b/HVAC_model_types.h index 6a4a644..007f60d 100644 --- a/HVAC_model_types.h +++ b/HVAC_model_types.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'HVAC_model'. * - * Model version : 1.956 + * Model version : 1.960 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Tue May 19 12:18:47 2026 + * C/C++ source code generated on : Tue May 19 16:51:26 2026 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M diff --git a/Model_Task.c b/Model_Task.c index 950de3a..d2bd05f 100644 --- a/Model_Task.c +++ b/Model_Task.c @@ -28,6 +28,8 @@ void ModelTask_Init( env->logger = logger; InitThreadAtrStatic(&env->thread.attr, "ModelTask", env->thread.controlBlock, env->thread.stack, osPriorityNormal); env->thread.id = 0; + + HVAC_model_initialize(); } static bool setActuatorBusy(tModelTask *env) {