diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL.c b/SIL/work/SIL_ert_shrlib_rtw/SIL.c index 6b084c1..b8b7de4 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL.c +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL.c @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * 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, ENUM_AT *out2); static void SIL_parachute(void); -static void SIL_Idle(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_req_int(void); @@ -5982,9 +5981,9 @@ static boolean_T SIL_sf_msg_pop_cmd(void) if (SIL_DW.cmd_isValid) { isPresent = true; } else { - SIL_DW.cmd_msgHandle = SIL_proc_cmd_In1_RecvMsg(); - if (SIL_DW.cmd_msgHandle != NULL) { - SIL_DW.cmd_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd_msgHandle)->fData; + SIL_DW.cmd2_msgHandle = SIL_proc_cmd_In1_RecvMsg(); + if (SIL_DW.cmd2_msgHandle != NULL) { + SIL_DW.cmd2_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle)->fData; isPresent = true; } else { isPresent = false; @@ -6020,9 +6019,9 @@ static boolean_T SIL_sf_msg_pop_cmd2(void) if (SIL_DW.cmd2_isValid) { isPresent = true; } else { - SIL_DW.cmd2_msgHandle = SIL_proc_cmd_In2_RecvMsg(); - if (SIL_DW.cmd2_msgHandle != NULL) { - SIL_DW.cmd2_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd2_msgHandle)->fData; + SIL_DW.cmd_msgHandle = SIL_proc_cmd_In2_RecvMsg(); + if (SIL_DW.cmd_msgHandle != NULL) { + SIL_DW.cmd_msgDataPtr = ((Msg_CommandMsg *)SIL_DW.cmd_msgHandle)->fData; isPresent = true; } else { isPresent = false; @@ -6049,7 +6048,7 @@ void SIL_destroyMsg(const Msg_CommandMsg *msg) static void SIL_sf_msg_discard_cmd(void) { 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; } } @@ -6058,7 +6057,7 @@ static void SIL_sf_msg_discard_cmd(void) static void SIL_sf_msg_discard_cmd2(void) { 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; } } @@ -6337,26 +6336,6 @@ static void SIL_parachute(void) } } -/* Function for Chart: '/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, Msg_mavlink_mission_item_int_t *elementOut) { @@ -17376,9 +17355,9 @@ void SIL_step(void) default: if (SIL_sf_msg_pop_cmd()) { 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++) { - SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd_msgDataPtr) + SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr) ->params[idx]; } @@ -17386,9 +17365,9 @@ void SIL_step(void) } else { if (SIL_sf_msg_pop_cmd2()) { 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++) { - SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd2_msgDataPtr) + SIL_B.params_e[idx] = ((CommandMsg *)SIL_DW.cmd_msgDataPtr) ->params[idx]; } @@ -20482,7 +20461,21 @@ void SIL_step(void) } else { switch (SIL_DW.is_c22_kb3_autopilot) { 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; case SIL_IN_Idle1: @@ -31882,7 +31875,7 @@ void SIL_initialize(void) sizeof(MavMission)); /* Start for DataStoreMemory: '/dummyMissionCount' */ - dummyMissionCount = 41U; + dummyMissionCount = 42U; /* Start for DataStoreMemory: '/dummyRally' */ memcpy(&dummyRally[0], &SIL_ConstP.dummyRally_InitialValue[0], sizeof diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL.h b/SIL/work/SIL_ert_shrlib_rtw/SIL.h index 9a6dbf0..d38f436 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL.h +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL.h @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.c b/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.c index 4247ada..66de4c6 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.c +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.c @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) @@ -664,10 +664,10 @@ static rtwCAPI_ModelMappingStaticInfo mmiStatic = { rtElementMap, rtSampleTimeMap, rtDimensionArray }, "float", - { 2950105907U, - 2513293757U, - 3027994693U, - 2044130847U }, + { 1611960380U, + 3625593346U, + 2670386422U, + 2264851553U }, (NULL), 0, 0 }; diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.h b/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.h index dfcd843..62ce3a4 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.h +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL_capi.h @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL_data.c b/SIL/work/SIL_ert_shrlib_rtw/SIL_data.c index 613ac3f..4848e02 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL_data.c +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL_data.c @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) @@ -406,12 +406,12 @@ P_SIL_T SIL_P = { /* Variable: dal0 * Referenced by: '/Constant4' */ - 0.0503983535F, + -0.0503983535F, /* Variable: dar0 * Referenced by: '/Constant5' */ - 0.0521011427F, + -0.0521011427F, /* Variable: de_takeoff * Referenced by: '/Constant' @@ -440,12 +440,12 @@ P_SIL_T SIL_P = { /* Variable: del0 * Referenced by: '/Constant' */ - -0.0137931034F, + 0.012F, /* Variable: der0 * Referenced by: '/Constant2' */ - -0.0292779431F, + 0.015F, /* Variable: det_time * Referenced by: '/Constant' @@ -455,7 +455,7 @@ P_SIL_T SIL_P = { /* Variable: dr0 * Referenced by: '/Constant3' */ - 0.0342F, + -0.01F, /* Variable: emergency_ias * Referenced by: '/Constant5' @@ -850,21 +850,28 @@ const ConstP_SIL_T SIL_ConstP = { 16U, 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, 16U, 1U, { 0.0F, 500.0F, 9000.0F, 0.0F, 5000.0F }, - { 408647100, 1097767200 } + { 410459700, 1097767200 } }, { 2U, 20001U, 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 } }, { 0U, @@ -1032,16 +1039,16 @@ const ConstP_SIL_T SIL_ConstP = { 16U, 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, 16U, 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, 16U, 1U, @@ -1489,13 +1496,6 @@ const ConstP_SIL_T SIL_ConstP = { { 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 } } }, diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL_private.h b/SIL/work/SIL_ert_shrlib_rtw/SIL_private.h index 2157df3..86e6e94 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL_private.h +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL_private.h @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) diff --git a/SIL/work/SIL_ert_shrlib_rtw/SIL_types.h b/SIL/work/SIL_ert_shrlib_rtw/SIL_types.h index a41696c..0a98c16 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/SIL_types.h +++ b/SIL/work/SIL_ert_shrlib_rtw/SIL_types.h @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) diff --git a/SIL/work/SIL_ert_shrlib_rtw/buildInfo.mat b/SIL/work/SIL_ert_shrlib_rtw/buildInfo.mat index b1249e1..acb5926 100644 Binary files a/SIL/work/SIL_ert_shrlib_rtw/buildInfo.mat and b/SIL/work/SIL_ert_shrlib_rtw/buildInfo.mat differ diff --git a/SIL/work/SIL_ert_shrlib_rtw/rtmodel.h b/SIL/work/SIL_ert_shrlib_rtw/rtmodel.h index ff4a91a..a23485b 100644 --- a/SIL/work/SIL_ert_shrlib_rtw/rtmodel.h +++ b/SIL/work/SIL_ert_shrlib_rtw/rtmodel.h @@ -5,7 +5,7 @@ * * Model version : 1.628 * 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 * Embedded hardware selection: Intel->x86-64 (Windows64) diff --git a/SIL/work/SIL_win64.dll b/SIL/work/SIL_win64.dll index 047f16c..6d59e71 100644 Binary files a/SIL/work/SIL_win64.dll and b/SIL/work/SIL_win64.dll differ