From df061b9a489ff688ce7e0293e3cfca431f94d022 Mon Sep 17 00:00:00 2001
From: darya
Date: Tue, 23 Jun 2026 17:43:19 +0300
Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?=
=?UTF-8?q?=D0=BD=D0=B8=D0=B5=2023.06.2026?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
HVAC_model.c | 28038 ++++++++++++++++++++++-------------------
HVAC_model.h | 7558 +++++------
HVAC_model_data.c | 116 +-
HVAC_model_private.h | 302 +-
HVAC_model_types.h | 38 +-
5 files changed, 19420 insertions(+), 16632 deletions(-)
mode change 100644 => 100755 HVAC_model.c
mode change 100644 => 100755 HVAC_model.h
mode change 100644 => 100755 HVAC_model_data.c
mode change 100644 => 100755 HVAC_model_private.h
mode change 100644 => 100755 HVAC_model_types.h
diff --git a/HVAC_model.c b/HVAC_model.c
old mode 100644
new mode 100755
index 56f75a6..0a424e5
--- a/HVAC_model.c
+++ b/HVAC_model.c
@@ -3,9 +3,9 @@
*
* Code generated for Simulink model 'HVAC_model'.
*
- * Model version : 1.1082
+ * Model version : 1.1128
* Simulink Coder version : 24.1 (R2024a) 19-Nov-2023
- * C/C++ source code generated on : Wed Jun 10 11:23:53 2026
+ * C/C++ source code generated on : Tue Jun 23 15:07:47 2026
*
* Target selection: ert.tlc
* Embedded hardware selection: ARM Compatible->ARM Cortex-M
@@ -24,7 +24,9 @@
#include "HVAC_model_types.h"
#include "Rs_Cal_Base.h"
-/* Named constants for Chart: '/Zone_Climate_Logic_Auto_FL' */
+/* Named constants for Chart: '/Zone_Climate_Logic_Auto_FL1' */
+#define IN_AC_Off ((uint8_t)1U)
+#define IN_AC_On ((uint8_t)2U)
#define IN_AUTO_MODE ((uint8_t)1U)
#define IN_Def_Off ((uint8_t)1U)
#define IN_Def_On ((uint8_t)2U)
@@ -35,6 +37,29 @@
#define IN_MANUAL_MODE ((uint8_t)2U)
#define IN_NO_ACTIVE_CHILD ((uint8_t)0U)
+/* Named constants for Chart: '/Zone_Climate_Logic_Auto_FL2' */
+#define IN_AC_Off_p ((uint8_t)1U)
+#define IN_AC_On_k ((uint8_t)2U)
+#define IN_AUTO_MODE_k ((uint8_t)1U)
+#define IN_Def_Off_d ((uint8_t)1U)
+#define IN_Def_On_k ((uint8_t)2U)
+#define IN_Face_Off_n ((uint8_t)1U)
+#define IN_Face_On_k ((uint8_t)2U)
+#define IN_Foot_Off_o ((uint8_t)1U)
+#define IN_Foot_On_j ((uint8_t)2U)
+#define IN_MANUAL_MODE_e ((uint8_t)2U)
+#define IN_NO_ACTIVE_CHILD_g ((uint8_t)0U)
+
+/* Named constants for Chart: '/Chart' */
+#define IN_COND_1 ((uint8_t)1U)
+#define IN_COND_2 ((uint8_t)2U)
+#define IN_COND_3 ((uint8_t)3U)
+#define IN_HOLDING ((uint8_t)1U)
+#define IN_NO_ACTIVE_CHILD_h ((uint8_t)0U)
+#define IN_PARTIAL_REC_OFF ((uint8_t)1U)
+#define IN_PARTIAL_REC_ON ((uint8_t)2U)
+#define IN_TRACKING ((uint8_t)2U)
+
/* Named constants for Chart: '/A//C Control' */
#define IN_COMP_OFF ((uint8_t)1U)
#define IN_COMP_ON ((uint8_t)2U)
@@ -44,7 +69,6 @@
#define IN_FAULT_LOW_PRESS ((uint8_t)2U)
#define IN_Front_A_C_OFF ((uint8_t)1U)
#define IN_Front_A_C_ON ((uint8_t)2U)
-#define IN_NO_ACTIVE_CHILD_j ((uint8_t)0U)
#define IN_PRESSURE_OK ((uint8_t)3U)
#define IN_PROT_LEVEL_0 ((uint8_t)1U)
#define IN_PROT_LEVEL_1 ((uint8_t)2U)
@@ -52,6 +76,11 @@
#define IN_Rear_A_C_OFF ((uint8_t)1U)
#define IN_Rear_A_C_ON ((uint8_t)2U)
+/* Named constants for Chart: '/Chart' */
+#define IN_Entry_2W ((uint8_t)1U)
+#define IN_ExitSeq_2W ((uint8_t)2U)
+#define IN_Wait_2W ((uint8_t)3U)
+
/* Named constants for Chart: '/Synchronization stateflow chart' */
#define IN_FRONT_ONLY ((uint8_t)1U)
#define IN_FULL_SYNC ((uint8_t)2U)
@@ -194,9 +223,9 @@ const ActuatorCmdBusInput HVAC_model_rtZActuatorCmdBusInput = {
}; /* ActuatorCmdBusInput ground */
/* Exported block states */
-ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */
-ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */
-ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */
+ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */
+ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */
+ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */
ActuatorCmdBusInput Actuator_Ch0_Status_Model;/* '/Data Store Memory61' */
ActuatorCmdBusInput Actuator_Ch1_Status_Model;/* '/Data Store Memory62' */
ActuatorCmdBusInput Actuator_Ch2_Status_Model;/* '/Data Store Memory63' */
@@ -220,7 +249,7 @@ RT_MODEL *const rtM = &rtM_;
/* Forward declaration for local functions */
static void E_COMP_MANAGER(bool *Enable_Comp_PID, const int16_t
*g_assEVA_TG_AMB_F_n, const int16_t *g_assEVA_TG_AMB_R_h);
-static void NO_SYNC(void);
+static double find_index(int16_t delta);
int16_t look1_is16lu64n32tu16Ds32Is16_binlcs(int16_t u0, const int16_t bp0[],
const uint16_t table[], uint32_t maxIndex)
{
@@ -784,6 +813,81 @@ uint8_t look2_iu8bu8s16lu64n32_binlcse(uint8_t u0, uint8_t u1, const uint8_t
return y;
}
+uint8_t look1_iu16lu64n48tu8_binlcse(uint16_t u0, const uint16_t bp0[], const
+ uint8_t table[], uint32_t maxIndex)
+{
+ uint64_t frac;
+ uint32_t iLeft;
+ uint8_t y;
+ uint8_t yL_0d0;
+ uint8_t yR_0d0;
+
+ /* Column-major Lookup 1-D
+ Search method: 'binary'
+ Use previous index: 'off'
+ Interpolation method: 'Linear point-slope'
+ Extrapolation method: 'Clip'
+ Use last breakpoint for index at or above upper limit: 'off'
+ Remove protection against out-of-range input in generated code: 'off'
+ Rounding mode: 'simplest'
+ */
+ /* Prelookup - Index and Fraction
+ Index Search method: 'binary'
+ Extrapolation method: 'Clip'
+ Use previous index: 'off'
+ Use last breakpoint for index at or above upper limit: 'off'
+ Remove protection against out-of-range input in generated code: 'off'
+ Rounding mode: 'simplest'
+ */
+ if (u0 <= bp0[0U]) {
+ iLeft = 0U;
+ frac = 0ULL;
+ } else if (u0 < bp0[maxIndex]) {
+ uint32_t bpIdx;
+ uint32_t iRght;
+
+ /* Binary Search */
+ bpIdx = maxIndex >> 1U;
+ iLeft = 0U;
+ iRght = maxIndex;
+ while (iRght - iLeft > 1U) {
+ if (u0 < bp0[bpIdx]) {
+ iRght = bpIdx;
+ } else {
+ iLeft = bpIdx;
+ }
+
+ bpIdx = (iRght + iLeft) >> 1U;
+ }
+
+ uint16_t bpLeftVar;
+ bpLeftVar = bp0[iLeft];
+ frac = ((uint64_t)((uint32_t)u0 - bpLeftVar) << 48) / ((uint32_t)bp0[iLeft +
+ 1U] - bpLeftVar);
+ } else {
+ iLeft = maxIndex - 1U;
+ frac = 281474976710656ULL;
+ }
+
+ /* Column-major Interpolation 1-D
+ Interpolation method: 'Linear point-slope'
+ Use last breakpoint for index at or above upper limit: 'off'
+ Rounding mode: 'simplest'
+ Overflow mode: 'wrapping'
+ */
+ yR_0d0 = table[iLeft + 1U];
+ yL_0d0 = table[iLeft];
+ if (yR_0d0 >= yL_0d0) {
+ y = (uint8_t)((uint32_t)(uint8_t)(((uint8_t)((uint32_t)yR_0d0 - yL_0d0) *
+ frac) >> 48) + yL_0d0);
+ } else {
+ y = (uint8_t)((uint32_t)yL_0d0 - (uint8_t)(((uint8_t)((uint32_t)yL_0d0 -
+ yR_0d0) * frac) >> 48));
+ }
+
+ return y;
+}
+
int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const double
table[], uint32_t maxIndex)
{
@@ -876,7 +980,7 @@ int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const double
return (int16_t)tmp_1;
}
-double look1_is16td_binlc(int16_t u0, const int16_t bp0[], const double table[],
+double look1_iu16td_binlc(uint16_t u0, const uint16_t bp0[], const double table[],
uint32_t maxIndex)
{
double frac;
@@ -919,9 +1023,9 @@ double look1_is16td_binlc(int16_t u0, const int16_t bp0[], const double table[],
bpIdx = (iRght + iLeft) >> 1U;
}
- int16_t bpLeftVar;
+ uint16_t bpLeftVar;
bpLeftVar = bp0[iLeft];
- frac = (double)(uint32_t)(u0 - bpLeftVar) / (double)(uint32_t)(bp0[iLeft +
+ frac = (double)((uint32_t)u0 - bpLeftVar) / (double)((uint32_t)bp0[iLeft +
1U] - bpLeftVar);
} else {
iLeft = maxIndex - 1U;
@@ -1030,292 +1134,12 @@ uint32_t plook_u32s16_bincka(int16_t u_8, const int16_t bp[], uint32_t maxIndex)
/*
* Output and update for atomic system:
- * '/обычное понижение темп.'
- * '/обычное повышение темп.'
- * '/обычное понижение темп.'
- * '/обычное повышение темп.'
- * '/обычное понижение темп.'
- * '/обычное повышение темп.'
- */
-void u(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_FALLING)
-{
- int32_t tmp;
-
- /* : f_g_aucAMBRATE_FALLING = g_aucAMBRATE_FALLING(lvl + 1); */
- tmp = rtu_lvl + 1;
- if (rtu_lvl + 1 > 32767) {
- tmp = 32767;
- }
-
- *rty_f_g_aucAMBRATE_FALLING = g_aucAMBRATE_FALLING[tmp - 1];
-}
-
-/*
- * Output and update for action system:
- * '/включен ускоренный режим'
- * '/включен ускоренный режим'
- * '/включен ускоренный режим'
- */
-void u_d(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_out, const double
- *rtd_AMB_store, double *rtd_KEEP_FALLING_UNTIL_LIMIT)
-{
- int32_t tmp;
-
- /* If: '/If' incorporates:
- * Abs: '/ABS(AMBraw - AMB)'
- * DataStoreRead: '/Read Amb'
- * MATLAB Function: '/AMBRATE_RISING_DIFF[8]'
- * RelationalOperator: '/Relational Operator'
- * Sum: '/Add'
- */
- /* : f_g_aucAMBRATE_FALLING_DIFF = g_aucAMBRATE_FALLING_DIFF(8); */
- if (fabs((double)rtu_amb_raw - *rtd_AMB_store) <= g_aucAMBRATE_FALLING_DIFF[7])
- {
- /* Outputs for IfAction SubSystem: '/Отключаем ускоренный режим' incorporates:
- * ActionPort: '/Action Port'
- */
- /* DataStoreWrite: '/Data Store Write' incorporates:
- * Constant: '/Constant'
- */
- *rtd_KEEP_FALLING_UNTIL_LIMIT = 0.0;
-
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/обычное понижение темп.'
- * Merge: '/Merge'
- */
- u(rtu_lvl, rty_out);
-
- /* End of Outputs for SubSystem: '/Отключаем ускоренный режим' */
- } else {
- /* Outputs for IfAction SubSystem: '/Продолжаем в ускоренном' incorporates:
- * ActionPort: '/Action Port'
- */
- /* MATLAB Function: '/ускоренное повышение темп.' */
- /* : f_g_aucAMBRATE_FALLING_DIFF = g_aucAMBRATE_FALLING_DIFF(lvl + 1); */
- tmp = rtu_lvl + 1;
- if (rtu_lvl + 1 > 32767) {
- tmp = 32767;
- }
-
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/ускоренное повышение темп.'
- * Merge: '/Merge'
- */
- *rty_out = g_aucAMBRATE_FALLING_DIFF[tmp - 1];
-
- /* End of Outputs for SubSystem: '/Продолжаем в ускоренном' */
- }
-
- /* End of If: '/If' */
-}
-
-/*
- * Output and update for action system:
- * '/обычный режим'
- * '/обычный режим'
- * '/обычный режим'
- */
-void u_c(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_riseperminute, const
- double *rtd_AMB_store, double *rtd_KEEP_FALLING_UNTIL_LIMIT)
-{
- int32_t tmp;
-
- /* If: '/If' incorporates:
- * Abs: '/ABS(AMBraw - AMB)'
- * DataStoreRead: '/Read Amb'
- * MATLAB Function: '/AMBRATE_FALLING_DIFF[7]'
- * RelationalOperator: '/Relational Operator'
- * Sum: '/Add'
- */
- /* : f_g_aucAMBRATE_FALLING_DIFF = g_aucAMBRATE_FALLING_DIFF(7); */
- if (fabs((double)rtu_amb_raw - *rtd_AMB_store) > g_aucAMBRATE_FALLING_DIFF[6])
- {
- /* Outputs for IfAction SubSystem: '/включаем ускоренный режим' incorporates:
- * ActionPort: '/Action Port'
- */
- /* DataStoreWrite: '/Data Store Write' incorporates:
- * Constant: '/Constant'
- */
- *rtd_KEEP_FALLING_UNTIL_LIMIT = 1.0;
-
- /* MATLAB Function: '/ускоренное повышение темп.' */
- /* : f_g_aucAMBRATE_FALLING_DIFF_LVL = g_aucAMBRATE_FALLING_DIFF(lvl + 1); */
- tmp = rtu_lvl + 1;
- if (rtu_lvl + 1 > 32767) {
- tmp = 32767;
- }
-
- /* SignalConversion generated from: '/rise per minute' incorporates:
- * MATLAB Function: '/ускоренное повышение темп.'
- * Merge: '/Merge'
- */
- *rty_riseperminute = g_aucAMBRATE_FALLING_DIFF[tmp - 1];
-
- /* End of Outputs for SubSystem: '/включаем ускоренный режим' */
- } else {
- /* Outputs for IfAction SubSystem: '/обычный режим повышения' incorporates:
- * ActionPort: '/Action Port'
- */
- /* SignalConversion generated from: '/rise per minute' incorporates:
- * MATLAB Function: '/обычное повышение темп.'
- * Merge: '/Merge'
- */
- u(rtu_lvl, rty_riseperminute);
-
- /* End of Outputs for SubSystem: '/обычный режим повышения' */
- }
-
- /* End of If: '/If' */
-}
-
-/*
- * Output and update for atomic system:
- * '/обычное повышение темп.'
- * '/обычное повышение темп.'
- * '/обычное повышение темп.'
- * '/обычное повышение темп.'
- * '/обычное повышение темп.'
- * '/обычное повышение темп.'
- */
-void u_b(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_RISING)
-{
- int32_t tmp;
-
- /* : f_g_aucAMBRATE_RISING = g_aucAMBRATE_RISING(lvl + 1); */
- tmp = rtu_lvl + 1;
- if (rtu_lvl + 1 > 32767) {
- tmp = 32767;
- }
-
- *rty_f_g_aucAMBRATE_RISING = g_aucAMBRATE_RISING[tmp - 1];
-}
-
-/*
- * Output and update for atomic system:
- * '/ускоренное повышение темп.'
- * '/ускоренное повышение темп.'
- * '/ускоренное повышение темп.'
- * '/ускоренное повышение темп.'
- * '/ускоренное повышение темп.'
- * '/ускоренное повышение темп.'
- */
-void u_g(int16_t rtu_lvl, uint8_t *rty_f_g_aucAMBRATE_RISING_DIFF_LVL)
-{
- int32_t tmp;
-
- /* : f_g_aucAMBRATE_RISING_DIFF_LVL = g_aucAMBRATE_RISING_DIFF(lvl + 1); */
- tmp = rtu_lvl + 1;
- if (rtu_lvl + 1 > 32767) {
- tmp = 32767;
- }
-
- *rty_f_g_aucAMBRATE_RISING_DIFF_LVL = g_aucAMBRATE_RISING_DIFF[tmp - 1];
-}
-
-/*
- * Output and update for action system:
- * '/включен ускоренный режим'
- * '/включен ускоренный режим'
- * '/включен ускоренный режим'
- */
-void u_h(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_out, const double
- *rtd_AMB_store, double *rtd_KEEP_RISING_UNTIL_LIMIT)
-{
- /* If: '/If' incorporates:
- * Abs: '/ABS(AMBraw - AMB)'
- * DataStoreRead: '/Read Amb'
- * MATLAB Function: '/AMBRATE_RISING_DIFF[8]'
- * RelationalOperator: '/Relational Operator'
- * Sum: '/Add'
- */
- /* : f_g_aucAMBRATE_RISING_DIFF = g_aucAMBRATE_RISING_DIFF(8); */
- if (fabs((double)rtu_amb_raw - *rtd_AMB_store) <= g_aucAMBRATE_RISING_DIFF[7])
- {
- /* Outputs for IfAction SubSystem: '/Отключаем ускоренный режим' incorporates:
- * ActionPort: '/Action Port'
- */
- /* DataStoreWrite: '/Data Store Write' incorporates:
- * Constant: '/Constant'
- */
- *rtd_KEEP_RISING_UNTIL_LIMIT = 0.0;
-
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/обычное повышение темп.'
- */
- u_b(rtu_lvl, rty_out);
-
- /* End of Outputs for SubSystem: '/Отключаем ускоренный режим' */
- } else {
- /* Outputs for IfAction SubSystem: '/Продолжаем в ускоренном' incorporates:
- * ActionPort: '/Action Port'
- */
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/ускоренное повышение темп.'
- */
- u_g(rtu_lvl, rty_out);
-
- /* End of Outputs for SubSystem: '/Продолжаем в ускоренном' */
- }
-
- /* End of If: '/If' */
-}
-
-/*
- * Output and update for action system:
- * '/обычный режим'
- * '/обычный режим'
- * '/обычный режим'
- */
-void u_a(int16_t rtu_amb_raw, int16_t rtu_lvl, uint8_t *rty_riseperminute, const
- double *rtd_AMB_store, double *rtd_KEEP_RISING_UNTIL_LIMIT)
-{
- /* If: '/If' incorporates:
- * Abs: '/ABS(AMBraw - AMB)'
- * DataStoreRead: '/Read Amb'
- * MATLAB Function: '/AMBRATE_RISING_DIFF[7]'
- * RelationalOperator: '/Relational Operator'
- * Sum: '/Add'
- */
- /* : f_g_aucAMBRATE_RISING_DIFF = g_aucAMBRATE_RISING_DIFF(7); */
- if (fabs((double)rtu_amb_raw - *rtd_AMB_store) > g_aucAMBRATE_RISING_DIFF[6])
- {
- /* Outputs for IfAction SubSystem: '/включаем ускоренный режим' incorporates:
- * ActionPort: '/Action Port'
- */
- /* DataStoreWrite: '/Data Store Write' incorporates:
- * Constant: '/Constant'
- */
- *rtd_KEEP_RISING_UNTIL_LIMIT = 1.0;
-
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/ускоренное повышение темп.'
- */
- u_g(rtu_lvl, rty_riseperminute);
-
- /* End of Outputs for SubSystem: '/включаем ускоренный режим' */
- } else {
- /* Outputs for IfAction SubSystem: '/обычный режим повышения' incorporates:
- * ActionPort: '/Action Port'
- */
- /* SignalConversion generated from: '/out' incorporates:
- * MATLAB Function: '/обычное повышение темп.'
- */
- u_b(rtu_lvl, rty_riseperminute);
-
- /* End of Outputs for SubSystem: '/обычный режим повышения' */
- }
-
- /* End of If: '/If' */
-}
-
-/*
- * Output and update for atomic system:
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_for_LVL'
*/
void get_tg_FLL_for_LVL(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp, int16_t
*rty_vals)
@@ -1360,12 +1184,12 @@ void get_tg_FLL_for_LVL(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp, int16_t
/*
* Output and update for atomic system:
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
- * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
+ * '/get_tg_FLL_for_LVL'
*/
void get_tg_FLL_for_LVL_j(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp, int16_t *
rty_vals)
@@ -1410,10 +1234,10 @@ void get_tg_FLL_for_LVL_j(uint8_t rtu_ambient_Lvl, uint8_t rtu_set_tmp, int16_t
/*
* Output and update for atomic system:
- * '/g_assFLOW_BI_AMB_TGT'
- * '/g_assFLOW_BI_AMB_TGT'
- * '/g_assFLOW_BI_AMB_TGT'
- * '/g_assFLOW_BI_AMB_TGT'
+ * '/g_assFLOW_BI_AMB_TGT'
+ * '/g_assFLOW_BI_AMB_TGT'
+ * '/g_assFLOW_BI_AMB_TGT'
+ * '/g_assFLOW_BI_AMB_TGT'
*/
void g_assFLOW_BI_AMB_TGT_n(uint8_t rtu_LVL, int16_t *rty_c_g_assFLOW_BI_AMB_TGT)
{
@@ -1430,15 +1254,15 @@ void g_assFLOW_BI_AMB_TGT_n(uint8_t rtu_LVL, int16_t *rty_c_g_assFLOW_BI_AMB_TGT
/*
* Output and update for action system:
- * '/Bilevel'
- * '/Bilevel'
+ * '/Bilevel'
+ * '/Bilevel'
*/
void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
rtu_setTempFL, uint8_t rtu_setTempFR)
{
int32_t tmp;
int32_t tmp_0;
- int16_t rtb_u_fou;
+ int16_t rtb_u_eg;
uint16_t rtb_FLF_NEW;
uint16_t rtb_FRF_NEW;
uint16_t rtb_Switch2_a5_idx_0;
@@ -1454,55 +1278,55 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
uint8_t rtb_c_g_aucFLOW_BI_VENT_VALVE_MIN;
uint8_t rtb_c_g_aucFLOW_BI_VENT_VALVE_MIN_a;
- /* MATLAB Function: '/get_tg_FLL_for_LVL' */
+ /* MATLAB Function: '/get_tg_FLL_for_LVL' */
/* : c_g_assFLOW_BI_TEMP_TGT = g_assFLOW_BI_TEMP_TGT(LVL + 1); */
- get_tg_FLL_for_LVL(rtu_LVL, rtu_setTempFL, &rtb_u_fou);
+ get_tg_FLL_for_LVL(rtu_LVL, rtu_setTempFL, &rtb_u_eg);
- /* MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT' */
+ /* MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT' */
tmp_0 = (int32_t)(rtu_LVL + 1U);
if (rtu_LVL + 1U > 255U) {
tmp_0 = 255;
}
- /* Sum: '/ 1' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* Sum: '/ 1' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
- rtb_u_fou = (int16_t)(g_assFLOW_BI_TEMP_TGT[tmp_0 - 1] - rtb_u_fou);
+ rtb_u_eg = (int16_t)(g_assFLOW_BI_TEMP_TGT[tmp_0 - 1] - rtb_u_eg);
- /* Gain: '/Gain6' */
- tmp_0 = 13107 * rtb_u_fou;
+ /* Gain: '/Gain6' */
+ tmp_0 = 13107 * rtb_u_eg;
rtb_X = (int8_t)(((((uint32_t)tmp_0 & 65536U) != 0U) && ((((uint32_t)tmp_0 &
65535U) != 0U) || (tmp_0 > 0))) + (tmp_0 >> 17));
- /* Switch: '/Switch1' incorporates:
- * Gain: '/Gain6'
- * Sum: '/Add'
+ /* Switch: '/Switch1' incorporates:
+ * Gain: '/Gain6'
+ * Sum: '/Add'
*/
/* : c_g_aucFLOW_BI_FOOT_PLUS = g_aucFLOW_BI_FOOT_PLUS(LVL + 1); */
if (rtb_X >= 0) {
rtb_FLF_NEW = rty_Out1[4];
} else {
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_LEFT' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_LEFT' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
tmp_0 = (int32_t)(rtu_LVL + 1U);
if (rtu_LVL + 1U > 255U) {
tmp_0 = 255;
}
- /* Gain: '/Gain6' incorporates:
- * MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_LEFT'
- * Product: '/Product3'
+ /* Gain: '/Gain6' incorporates:
+ * MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_LEFT'
+ * Product: '/Product3'
*/
tmp_0 = g_aucFLOW_BI_FOOT_PLUS[tmp_0 - 1] * rtb_X * 13107;
rtb_FLF_NEW = (uint16_t)((int16_t)rty_Out1[4] - (int8_t)(((((uint32_t)tmp_0
& 65536U) != 0U) && (((uint32_t)tmp_0 & 65535U) != 0U)) + (tmp_0 >> 17)));
}
- /* End of Switch: '/Switch1' */
+ /* End of Switch: '/Switch1' */
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX1' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX1' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
/* : c_g_aucFLOW_BI_FOOT_VALVE_MAX = g_aucFLOW_BI_FOOT_VALVE_MAX(LVL + 1); */
tmp_0 = (int32_t)(rtu_LVL + 1U);
@@ -1512,10 +1336,10 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
rtb_c_g_aucFLOW_BI_FOOT_VALVE_MAX_n = g_aucFLOW_BI_FOOT_VALVE_MAX[tmp_0 - 1];
- /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX1' */
+ /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX1' */
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN1' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN1' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
/* : c_g_aucFLOW_BI2_FOOT_VALVE_MIN = g_aucFLOW_BI_FOOT_VALVE_MIN(LVL +1); */
tmp_0 = (int32_t)(rtu_LVL + 1U);
@@ -1525,14 +1349,14 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
rtb_c_g_aucFLOW_BI2_FOOT_VALVE_MIN = g_aucFLOW_BI_FOOT_VALVE_MIN[tmp_0 - 1];
- /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN1' */
+ /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN1' */
- /* MATLAB Function: '/get_tg_FLL_for_LVL' */
+ /* MATLAB Function: '/get_tg_FLL_for_LVL' */
/* : c_g_assFLOW_BI_TEMP_TGT = g_assFLOW_BI_TEMP_TGT(LVL + 1 + 6); */
- get_tg_FLL_for_LVL_j(rtu_LVL, rtu_setTempFR, &rtb_u_fou);
+ get_tg_FLL_for_LVL_j(rtu_LVL, rtu_setTempFR, &rtb_u_eg);
- /* MATLAB Function: '/g_assFLOW_BI_TEMP_TGT_RIGHT' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_assFLOW_BI_TEMP_TGT_RIGHT' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
tmp_0 = (int32_t)(rtu_LVL + 1U);
if (rtu_LVL + 1U > 255U) {
@@ -1544,26 +1368,26 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
tmp = 255;
}
- /* Sum: '/ 1' incorporates:
- * MATLAB Function: '/g_assFLOW_BI_TEMP_TGT_RIGHT'
+ /* Sum: '/ 1' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI_TEMP_TGT_RIGHT'
*/
- rtb_u_fou = (int16_t)(g_assFLOW_BI_TEMP_TGT[tmp - 1] - rtb_u_fou);
+ rtb_u_eg = (int16_t)(g_assFLOW_BI_TEMP_TGT[tmp - 1] - rtb_u_eg);
- /* Gain: '/Gain6' */
- tmp_0 = 13107 * rtb_u_fou;
+ /* Gain: '/Gain6' */
+ tmp_0 = 13107 * rtb_u_eg;
rtb_X = (int8_t)(((((uint32_t)tmp_0 & 65536U) != 0U) && ((((uint32_t)tmp_0 &
65535U) != 0U) || (tmp_0 > 0))) + (tmp_0 >> 17));
- /* Switch: '/Switch3' incorporates:
- * Gain: '/Gain7'
- * Sum: '/Add1'
+ /* Switch: '/Switch3' incorporates:
+ * Gain: '/Gain7'
+ * Sum: '/Add1'
*/
/* : c_g_aucFLOW_BI_FOOT_PLUS = g_aucFLOW_BI_FOOT_PLUS(LVL + 1 + 6); */
if (rtb_X >= 0) {
rtb_FRF_NEW = rty_Out1[6];
} else {
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_RIGHT' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_RIGHT' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
tmp_0 = (int32_t)(rtu_LVL + 1U);
if (rtu_LVL + 1U > 255U) {
@@ -1575,19 +1399,19 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
tmp = 255;
}
- /* Gain: '/Gain7' incorporates:
- * MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_RIGHT'
- * Product: '/Product4'
+ /* Gain: '/Gain7' incorporates:
+ * MATLAB Function: '/g_aucFLOW_BI_FOOT_PLUS_RIGHT'
+ * Product: '/Product4'
*/
tmp_0 = g_aucFLOW_BI_FOOT_PLUS[tmp - 1] * rtb_X * 13107;
rtb_FRF_NEW = (uint16_t)((int16_t)rty_Out1[6] - (int8_t)(((((uint32_t)tmp_0
& 65536U) != 0U) && (((uint32_t)tmp_0 & 65535U) != 0U)) + (tmp_0 >> 17)));
}
- /* End of Switch: '/Switch3' */
+ /* End of Switch: '/Switch3' */
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX2' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX2' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
/* : c_g_aucFLOW_BI_FOOT_VALVE_MAX = g_aucFLOW_BI_FOOT_VALVE_MAX(LVL + 1 + 6); */
tmp_0 = (int32_t)(rtu_LVL + 1U);
@@ -1602,10 +1426,10 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
rtb_c_g_aucFLOW_BI_FOOT_VALVE_MAX = g_aucFLOW_BI_FOOT_VALVE_MAX[tmp - 1];
- /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX2' */
+ /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MAX2' */
- /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN2' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN2' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
/* : c_g_aucFLOW_BI_FOOT_VALVE_MIN = g_aucFLOW_BI_FOOT_VALVE_MIN(LVL + 1 + 6); */
tmp_0 = (int32_t)(rtu_LVL + 1U);
@@ -1620,46 +1444,45 @@ void Bilevel(int16_t rtu_Amb_Fb, uint8_t rtu_LVL, uint16_t rty_Out1[9], uint8_t
rtb_c_g_aucFLOW_BI_FOOT_VALVE_MIN = g_aucFLOW_BI_FOOT_VALVE_MIN[tmp - 1];
- /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN2' */
+ /* End of MATLAB Function: '/g_aucFLOW_BI_FOOT_VALVE_MIN2' */
- /* MATLAB Function: '/g_assFLOW_BI_AMB_TGT' */
+ /* MATLAB Function: '/g_assFLOW_BI_AMB_TGT' */
/* : c_g_aucFLOW_BI_VENT_PLUS = g_aucFLOW_BI_VENT_PLUS(LVL + 1); */
- g_assFLOW_BI_AMB_TGT_n(rtu_LVL, &rtb_u_fou);
+ g_assFLOW_BI_AMB_TGT_n(rtu_LVL, &rtb_u_eg);
- /* MATLAB Function: '/g_aucFLOW_BI_VENT_PLUS' incorporates:
- * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
+ /* MATLAB Function: '/g_aucFLOW_BI_VENT_PLUS' incorporates:
+ * MATLAB Function: '/g_assFLOW_BI2_TEMP_TGT_LEFT'
*/
tmp_0 = (int32_t)(rtu_LVL + 1U);
if (rtu_LVL + 1U > 255U) {
tmp_0 = 255;
}
- /* Gain: '