der linker dieser sack, double declatartion of FSM, FSM3.0 implemented !
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
//
|
||||
// Code generated for Simulink model 'FSMTreppe'.
|
||||
//
|
||||
// Model version : 1.49
|
||||
// Model version : 1.51
|
||||
// Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
|
||||
// C/C++ source code generated on : Wed Jul 7 15:27:06 2021
|
||||
// C/C++ source code generated on : Wed Jul 7 18:54:01 2021
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
|
||||
@@ -19,16 +19,16 @@
|
||||
#include "FSMTreppe3.h"
|
||||
|
||||
// Named constants for Chart: '<Root>/FSMTreppe'
|
||||
const uint8_t FSMTreppe_IN_abdimmen_hoch = 1U;
|
||||
const uint8_t FSMTreppe_IN_abdimmen_ldr = 2U;
|
||||
const uint8_t FSMTreppe_IN_abdimmen_runter = 3U;
|
||||
const uint8_t FSMTreppe_IN_aufdimmen_hoch = 4U;
|
||||
const uint8_t FSMTreppe_IN_aufdimmen_ldr = 5U;
|
||||
const uint8_t FSMTreppe_IN_aufdimmen_runter = 6U;
|
||||
const uint8_t FSMTreppe_IN_inaktiv = 7U;
|
||||
const uint8_t FSMTreppe_IN_ruhezustand = 8U;
|
||||
const uint8_t FSMTreppe_IN_warten_hoch = 9U;
|
||||
const uint8_t FSMTreppe_IN_warten_runter = 10U;
|
||||
const uint32_t FSMTreppe_IN_abdimmen_hoch = 1U;
|
||||
const uint32_t FSMTreppe_IN_abdimmen_ldr = 2U;
|
||||
const uint32_t FSMTreppe_IN_abdimmen_runter = 3U;
|
||||
const uint32_t FSMTreppe_IN_aufdimmen_hoch = 4U;
|
||||
const uint32_t FSMTreppe_IN_aufdimmen_ldr = 5U;
|
||||
const uint32_t FSMTreppe_IN_aufdimmen_runter = 6U;
|
||||
const uint32_t FSMTreppe_IN_inaktiv = 7U;
|
||||
const uint32_t FSMTreppe_IN_ruhezustand = 8U;
|
||||
const uint32_t FSMTreppe_IN_warten_hoch = 9U;
|
||||
const uint32_t FSMTreppe_IN_warten_runter = 10U;
|
||||
|
||||
// Model step function
|
||||
void FSMTreppeModelClass::step()
|
||||
@@ -168,16 +168,7 @@ void FSMTreppeModelClass::step()
|
||||
case FSMTreppe_IN_ruhezustand:
|
||||
// Outport: '<Root>/status'
|
||||
FSMTreppe_Y.status = 3U;
|
||||
if (FSMTreppe_U.ldr_schwelle == 0U) {
|
||||
FSMTreppe_DW.is_c3_FSMTreppe = FSMTreppe_IN_abdimmen_ldr;
|
||||
FSMTreppe_DW.temporalCounter_i1 = 0U;
|
||||
|
||||
// Outport: '<Root>/status'
|
||||
FSMTreppe_Y.status = 2U;
|
||||
|
||||
// Outport: '<Root>/dimmrichtung'
|
||||
FSMTreppe_Y.dimmrichtung = 0U;
|
||||
} else if (FSMTreppe_U.sensor_unten == 1U) {
|
||||
if (FSMTreppe_U.sensor_unten == 1U) {
|
||||
FSMTreppe_DW.is_c3_FSMTreppe = FSMTreppe_IN_aufdimmen_hoch;
|
||||
FSMTreppe_DW.temporalCounter_i1 = 0U;
|
||||
|
||||
@@ -201,6 +192,15 @@ void FSMTreppeModelClass::step()
|
||||
|
||||
// Outport: '<Root>/status'
|
||||
FSMTreppe_Y.status = 7U;
|
||||
} else if (FSMTreppe_U.ldr_schwelle == 0U) {
|
||||
FSMTreppe_DW.is_c3_FSMTreppe = FSMTreppe_IN_abdimmen_ldr;
|
||||
FSMTreppe_DW.temporalCounter_i1 = 0U;
|
||||
|
||||
// Outport: '<Root>/status'
|
||||
FSMTreppe_Y.status = 2U;
|
||||
|
||||
// Outport: '<Root>/dimmrichtung'
|
||||
FSMTreppe_Y.dimmrichtung = 0U;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
//
|
||||
// Code generated for Simulink model 'FSMTreppe'.
|
||||
//
|
||||
// Model version : 1.49
|
||||
// Model version : 1.51
|
||||
// Simulink Coder version : 9.5 (R2021a) 14-Nov-2020
|
||||
// C/C++ source code generated on : Wed Jul 7 15:27:06 2021
|
||||
// C/C++ source code generated on : Wed Jul 7 18:54:01 2021
|
||||
//
|
||||
// Target selection: ert.tlc
|
||||
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
|
||||
@@ -27,24 +27,24 @@ class FSMTreppeModelClass {
|
||||
public:
|
||||
// Block states (default storage) for system '<Root>'
|
||||
struct DW_FSMTreppe_T {
|
||||
uint16_t temporalCounter_i1; // '<Root>/FSMTreppe'
|
||||
uint8_t is_active_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
uint8_t is_c3_FSMTreppe; // '<Root>/FSMTreppe'
|
||||
uint16_t temporalCounter_i1=0; // '<Root>/FSMTreppe'
|
||||
uint8_t is_active_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
|
||||
uint8_t is_c3_FSMTreppe=0; // '<Root>/FSMTreppe'
|
||||
};
|
||||
|
||||
// External inputs (root inport signals with default storage)
|
||||
struct ExtU_FSMTreppe_T {
|
||||
uint32_t sensor_unten; // '<Root>/sensor_unten'
|
||||
uint32_t sensor_oben; // '<Root>/sensor_oben'
|
||||
uint32_t anim_beendet; // '<Root>/anim_beendet'
|
||||
uint32_t ldr_schwelle; // '<Root>/ldr_schwelle'
|
||||
uint32_t sensor_unten=0; // '<Root>/sensor_unten'
|
||||
uint32_t sensor_oben=0; // '<Root>/sensor_oben'
|
||||
uint32_t anim_beendet=0; // '<Root>/anim_beendet'
|
||||
uint32_t ldr_schwelle=0; // '<Root>/ldr_schwelle'
|
||||
};
|
||||
|
||||
|
||||
// External outputs (root outports fed by signals with default storage)
|
||||
struct ExtY_FSMTreppe_T {
|
||||
uint32_t laufrichtung; // '<Root>/laufrichtung'
|
||||
uint32_t status; // '<Root>/status'
|
||||
uint32_t dimmrichtung; // '<Root>/dimmrichtung'
|
||||
uint32_t laufrichtung=0; // '<Root>/laufrichtung'
|
||||
uint32_t status=0; // '<Root>/status'
|
||||
uint32_t dimmrichtung=0; // '<Root>/dimmrichtung'
|
||||
};
|
||||
|
||||
// model initialize function
|
||||
@@ -67,13 +67,16 @@ class FSMTreppeModelClass {
|
||||
// Root inports set method
|
||||
void setExternalInputs(const ExtU_FSMTreppe_T* pExtU_FSMTreppe_T)
|
||||
{
|
||||
FSMTreppe_U = *pExtU_FSMTreppe_T;
|
||||
FSMTreppe_U.anim_beendet = pExtU_FSMTreppe_T->anim_beendet;
|
||||
FSMTreppe_U.ldr_schwelle = pExtU_FSMTreppe_T->ldr_schwelle;
|
||||
FSMTreppe_U.sensor_oben = pExtU_FSMTreppe_T->sensor_oben;
|
||||
FSMTreppe_U.sensor_unten = pExtU_FSMTreppe_T->sensor_unten;
|
||||
}
|
||||
|
||||
// Root-level structure-based outputs get method
|
||||
|
||||
// Root outports get method
|
||||
const FSMTreppeModelClass::ExtY_FSMTreppe_T & getExternalOutputs() const
|
||||
const FSMTreppeModelClass::ExtY_FSMTreppe_T getExternalOutputs() const
|
||||
{
|
||||
return FSMTreppe_Y;
|
||||
}
|
||||
@@ -88,7 +91,6 @@ class FSMTreppeModelClass {
|
||||
|
||||
// External outputs
|
||||
ExtY_FSMTreppe_T FSMTreppe_Y;
|
||||
|
||||
};
|
||||
|
||||
//-
|
||||
|
||||
Reference in New Issue
Block a user