update gencode

This commit is contained in:
Matthew GONG
2021-04-24 20:18:26 +08:00
parent 03809f0259
commit 4456ef5e32
10 changed files with 60 additions and 67 deletions
+29 -36
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
@@ -679,7 +679,6 @@ static void SIL_sf_msg_send_cmd(void);
static void SIL_update_vert(ENUM_AFCS_VERT in, ENUM_AT in2, ENUM_AFCS_VERT *out, static void SIL_update_vert(ENUM_AFCS_VERT in, ENUM_AT in2, ENUM_AFCS_VERT *out,
ENUM_AT *out2); ENUM_AT *out2);
static void SIL_parachute(void); static void SIL_parachute(void);
static void SIL_Idle(void);
static boolean_T SIL_sf_msg_pop_mission_item(void); static boolean_T SIL_sf_msg_pop_mission_item(void);
static void SIL_sf_msg_send_mission_ack(void); static void SIL_sf_msg_send_mission_ack(void);
static void SIL_sf_msg_send_mission_req_int(void); static void SIL_sf_msg_send_mission_req_int(void);
@@ -5982,9 +5981,9 @@ static boolean_T SIL_sf_msg_pop_cmd(void)
if (SIL_DW.cmd_isValid) { if (SIL_DW.cmd_isValid) {
isPresent = true; isPresent = true;
} else { } else {
SIL_DW.cmd_msgHandle = SIL_proc_cmd_In1_RecvMsg(); SIL_DW.cmd2_msgHandle = SIL_proc_cmd_In1_RecvMsg();
if (SIL_DW.cmd_msgHandle != NULL) { if (SIL_DW.cmd2_msgHandle != NULL) {
SIL_DW.cmd_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd_msgHandle)->fData; SIL_DW.cmd2_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle)->fData;
isPresent = true; isPresent = true;
} else { } else {
isPresent = false; isPresent = false;
@@ -6020,9 +6019,9 @@ static boolean_T SIL_sf_msg_pop_cmd2(void)
if (SIL_DW.cmd2_isValid) { if (SIL_DW.cmd2_isValid) {
isPresent = true; isPresent = true;
} else { } else {
SIL_DW.cmd2_msgHandle = SIL_proc_cmd_In2_RecvMsg(); SIL_DW.cmd_msgHandle = SIL_proc_cmd_In2_RecvMsg();
if (SIL_DW.cmd2_msgHandle != NULL) { if (SIL_DW.cmd_msgHandle != NULL) {
SIL_DW.cmd2_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle)->fData; SIL_DW.cmd_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd_msgHandle)->fData;
isPresent = true; isPresent = true;
} else { } else {
isPresent = false; isPresent = false;
@@ -6049,7 +6048,7 @@ void SIL_destroyMsg(const Msg_CommandMsg *msg)
static void SIL_sf_msg_discard_cmd(void) static void SIL_sf_msg_discard_cmd(void)
{ {
if (SIL_DW.cmd_isValid) { if (SIL_DW.cmd_isValid) {
SIL_destroyMsg((Msg_CommandMsg *)SIL_DW.cmd_msgHandle); SIL_destroyMsg((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle);
SIL_DW.cmd_isValid = false; SIL_DW.cmd_isValid = false;
} }
} }
@@ -6058,7 +6057,7 @@ static void SIL_sf_msg_discard_cmd(void)
static void SIL_sf_msg_discard_cmd2(void) static void SIL_sf_msg_discard_cmd2(void)
{ {
if (SIL_DW.cmd2_isValid) { if (SIL_DW.cmd2_isValid) {
SIL_destroyMsg((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle); SIL_destroyMsg((Msg_CommandMsg *)SIL_DW.cmd_msgHandle);
SIL_DW.cmd2_isValid = false; SIL_DW.cmd2_isValid = false;
} }
} }
@@ -6337,26 +6336,6 @@ static void SIL_parachute(void)
} }
} }
/* Function for Chart: '<S760>/Chart' */
static void SIL_Idle(void)
{
if ((SIL_B.BusAssignment_i.recovery & 2U) != 0U) {
SIL_DW.is_c22_kb3_autopilot = SIL_IN_parachute;
SIL_DW.temporalCounter_i2 = 0U;
SIL_B.recovery_out = 3U;
SIL_DW.is_parachute = SIL_IN_one;
SIL_DW.temporalCounter_i1_io = 0U;
SIL_B.ch_out = 3U;
SIL_B.peroid_out = 50U;
SIL_B.sw_out = 1U;
} else {
SIL_B.recovery_out = SIL_B.BusAssignment_i.recovery;
SIL_B.ch_out = SIL_B.BusAssignment_i.ccm_ch;
SIL_B.peroid_out = SIL_B.BusAssignment_i.ccm_period;
SIL_B.sw_out = SIL_B.BusAssignment_i.ccm_sw;
}
}
int32_T SIL_pop_c02u1i(Queue_mavlink_mission_item_int_t *q, int32_T SIL_pop_c02u1i(Queue_mavlink_mission_item_int_t *q,
Msg_mavlink_mission_item_int_t *elementOut) Msg_mavlink_mission_item_int_t *elementOut)
{ {
@@ -17376,9 +17355,9 @@ void SIL_step(void)
default: default:
if (SIL_sf_msg_pop_cmd()) { if (SIL_sf_msg_pop_cmd()) {
SIL_DW.is_c19_kb3_autopilot = SIL_IN_Linked; SIL_DW.is_c19_kb3_autopilot = SIL_IN_Linked;
SIL_B.id = ((CommandMsg *)SIL_DW.cmd_msgDataPtr)->id; SIL_B.id = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr)->id;
for (idx = 0; idx < 7; idx++) { for (idx = 0; idx < 7; idx++) {
SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd_msgDataPtr) SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr)
->params[idx]; ->params[idx];
} }
@@ -17386,9 +17365,9 @@ void SIL_step(void)
} else { } else {
if (SIL_sf_msg_pop_cmd2()) { if (SIL_sf_msg_pop_cmd2()) {
SIL_DW.is_c19_kb3_autopilot = SIL_IN_Linked2; SIL_DW.is_c19_kb3_autopilot = SIL_IN_Linked2;
SIL_B.id = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr)->id; SIL_B.id = ((CommandMsg *)SIL_DW.cmd_msgDataPtr)->id;
for (idx = 0; idx < 7; idx++) { for (idx = 0; idx < 7; idx++) {
SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr) SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd_msgDataPtr)
->params[idx]; ->params[idx];
} }
@@ -20482,7 +20461,21 @@ void SIL_step(void)
} else { } else {
switch (SIL_DW.is_c22_kb3_autopilot) { switch (SIL_DW.is_c22_kb3_autopilot) {
case SIL_IN_Idle_o: case SIL_IN_Idle_o:
SIL_Idle(); if ((SIL_B.BusAssignment_i.recovery & 2U) != 0U) {
SIL_DW.is_c22_kb3_autopilot = SIL_IN_parachute;
SIL_DW.temporalCounter_i2 = 0U;
SIL_B.recovery_out = 3U;
SIL_DW.is_parachute = SIL_IN_one;
SIL_DW.temporalCounter_i1_io = 0U;
SIL_B.ch_out = 3U;
SIL_B.peroid_out = 50U;
SIL_B.sw_out = 1U;
} else {
SIL_B.recovery_out = SIL_B.BusAssignment_i.recovery;
SIL_B.ch_out = SIL_B.BusAssignment_i.ccm_ch;
SIL_B.peroid_out = SIL_B.BusAssignment_i.ccm_period;
SIL_B.sw_out = SIL_B.BusAssignment_i.ccm_sw;
}
break; break;
case SIL_IN_Idle1: case SIL_IN_Idle1:
@@ -31882,7 +31875,7 @@ void SIL_initialize(void)
sizeof(MavMission)); sizeof(MavMission));
/* Start for DataStoreMemory: '<Root>/dummyMissionCount' */ /* Start for DataStoreMemory: '<Root>/dummyMissionCount' */
dummyMissionCount = 41U; dummyMissionCount = 42U;
/* Start for DataStoreMemory: '<Root>/dummyRally' */ /* Start for DataStoreMemory: '<Root>/dummyRally' */
memcpy(&dummyRally[0], &SIL_ConstP.dummyRally_InitialValue[0], sizeof memcpy(&dummyRally[0], &SIL_ConstP.dummyRally_InitialValue[0], sizeof
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
+5 -5
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
@@ -664,10 +664,10 @@ static rtwCAPI_ModelMappingStaticInfo mmiStatic = {
rtElementMap, rtSampleTimeMap, rtDimensionArray }, rtElementMap, rtSampleTimeMap, rtDimensionArray },
"float", "float",
{ 2950105907U, { 1611960380U,
2513293757U, 3625593346U,
3027994693U, 2670386422U,
2044130847U }, 2264851553U },
(NULL), 0, (NULL), 0,
0 0
}; };
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
+21 -21
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
@@ -406,12 +406,12 @@ P_SIL_T SIL_P = {
/* Variable: dal0 /* Variable: dal0
* Referenced by: '<S629>/Constant4' * Referenced by: '<S629>/Constant4'
*/ */
0.0503983535F, -0.0503983535F,
/* Variable: dar0 /* Variable: dar0
* Referenced by: '<S629>/Constant5' * Referenced by: '<S629>/Constant5'
*/ */
0.0521011427F, -0.0521011427F,
/* Variable: de_takeoff /* Variable: de_takeoff
* Referenced by: '<S787>/Constant' * Referenced by: '<S787>/Constant'
@@ -440,12 +440,12 @@ P_SIL_T SIL_P = {
/* Variable: del0 /* Variable: del0
* Referenced by: '<S629>/Constant' * Referenced by: '<S629>/Constant'
*/ */
-0.0137931034F, 0.012F,
/* Variable: der0 /* Variable: der0
* Referenced by: '<S629>/Constant2' * Referenced by: '<S629>/Constant2'
*/ */
-0.0292779431F, 0.015F,
/* Variable: det_time /* Variable: det_time
* Referenced by: '<S643>/Constant' * Referenced by: '<S643>/Constant'
@@ -455,7 +455,7 @@ P_SIL_T SIL_P = {
/* Variable: dr0 /* Variable: dr0
* Referenced by: '<S629>/Constant3' * Referenced by: '<S629>/Constant3'
*/ */
0.0342F, -0.01F,
/* Variable: emergency_ias /* Variable: emergency_ias
* Referenced by: '<S768>/Constant5' * Referenced by: '<S768>/Constant5'
@@ -850,21 +850,28 @@ const ConstP_SIL_T SIL_ConstP = {
16U, 16U,
1U, 1U,
{ 0.0F, 500.0F, 9000.0F, 0.0F, 5000.0F }, { 0.0F, 100.0F, 0.0F, 0.0F, 5000.0F },
{ 410459700, 1097767200 } { 410459700, 1096000000 }
}, { 0U, }, { 0U,
16U, 16U,
1U, 1U,
{ 0.0F, 500.0F, 9000.0F, 0.0F, 5000.0F }, { 0.0F, 500.0F, 9000.0F, 0.0F, 5000.0F },
{ 408647100, 1097767200 } { 410459700, 1097767200 }
}, { 2U, }, { 2U,
20001U, 20001U,
1U, 1U,
{ 35.0F, 1.0F, 0.0F, 0.0F, 0.0F }, { 36.0F, 1.0F, 0.0F, 0.0F, 0.0F },
{ 408647100, 1097767200 }
}, { 0U,
16U,
1U,
{ 0.0F, 500.0F, 9000.0F, 0.0F, 5000.0F },
{ 408647100, 1097767200 } { 408647100, 1097767200 }
}, { 0U, }, { 0U,
@@ -1032,16 +1039,16 @@ const ConstP_SIL_T SIL_ConstP = {
16U, 16U,
1U, 1U,
{ 0.0F, 0.0F, 0.0F, 0.0F, 1750.0F }, { 0.0F, 0.0F, 0.0F, 0.0F, 5000.0F },
{ 408647100, 1098500000 } { 410459700, 1096000000 }
}, { 0U, }, { 0U,
16U, 16U,
1U, 1U,
{ 0.0F, 0.0F, 0.0F, 0.0F, 2200.0F }, { 0.0F, 500.0F, 9000.0F, 0.0F, 3700.0F },
{ 409600000, 1097767200 } { 410459700, 1097767200 }
}, { 0U, }, { 0U,
16U, 16U,
1U, 1U,
@@ -1489,13 +1496,6 @@ const ConstP_SIL_T SIL_ConstP = {
{ 0.0F, 0.0F, 0.0F, 0.0F, 0.0F }, { 0.0F, 0.0F, 0.0F, 0.0F, 0.0F },
{ 0, 0 }
}, { 0U,
0U,
0U,
{ 0.0F, 0.0F, 0.0F, 0.0F, 0.0F },
{ 0, 0 } { 0, 0 }
} }, } },
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
Binary file not shown.
+1 -1
View File
@@ -5,7 +5,7 @@
* *
* Model version : 1.628 * Model version : 1.628
* Simulink Coder version : 9.0 (R2018b) 24-May-2018 * Simulink Coder version : 9.0 (R2018b) 24-May-2018
* C/C++ source code generated on : Sat Apr 24 08:11:24 2021 * C/C++ source code generated on : Sat Apr 24 19:55:36 2021
* *
* Target selection: ert_shrlib.tlc * Target selection: ert_shrlib.tlc
* Embedded hardware selection: Intel->x86-64 (Windows64) * Embedded hardware selection: Intel->x86-64 (Windows64)
Binary file not shown.