fix everything

This commit is contained in:
Joeri Exelmans 2025-06-04 17:43:29 +02:00
parent e8f246cfa5
commit 675efff85c
8 changed files with 71 additions and 41 deletions

View file

@ -34,6 +34,9 @@ typedef struct StatechartTimeEvents StatechartTimeEvents;
#include "../src/data_types.h"
#include "../src/sc_types.h"
#include "../src/sc_rxc.h"
#include "../src/sc_rxc_int32_t.h"
#include "../src/sc_rxc_int32_t.h"
#include "../src/sc_rxc_int32_t.h"
#ifdef __cplusplus
extern "C" {
@ -72,7 +75,7 @@ Header of the state machine 'Statechart'.
* Union of all possible event value types.
*/
typedef union {
sc_real Statechart_sensor_value;
int32_t Statechart_sensor_value;
} statechart_event_value;
/*
@ -125,11 +128,11 @@ typedef enum
struct StatechartIface
{
sc_boolean sensor_raised;
sc_real sensor_value;
int32_t sensor_value;
sc_boolean buttonPressed_raised;
sc_boolean buttonReleased_raised;
sc_observable_sc_real setMotorR;
sc_observable_sc_real setMotorL;
sc_observable_int32_t setMotorR;
sc_observable_int32_t setMotorL;
};
@ -137,7 +140,7 @@ struct StatechartIface
/*! Type declaration of the data structure for the StatechartInternal interface scope. */
struct StatechartInternal
{
sc_real speed;
int32_t speed;
pid_vars_t pid_vars;
};
@ -192,16 +195,16 @@ extern void statechart_trigger_without_event(Statechart* handle);
extern void statechart_raise_time_event(Statechart* handle, sc_eventid evid);
/*! Raises the in event 'sensor' that is defined in the default interface scope. */
extern void statechart_raise_sensor(Statechart* handle, sc_real value);
extern void statechart_raise_sensor(Statechart* handle, int32_t value);
/*! Raises the in event 'buttonPressed' that is defined in the default interface scope. */
extern void statechart_raise_buttonPressed(Statechart* handle);
/*! Raises the in event 'buttonReleased' that is defined in the default interface scope. */
extern void statechart_raise_buttonReleased(Statechart* handle);
/*! Returns the observable for the out event 'setMotorR' that is defined in the default interface scope. */
extern sc_observable_sc_real* statechart_get_setMotorR(Statechart* handle);
extern sc_observable_int32_t* statechart_get_setMotorR(Statechart* handle);
/*! Returns the observable for the out event 'setMotorL' that is defined in the default interface scope. */
extern sc_observable_sc_real* statechart_get_setMotorL(Statechart* handle);
extern sc_observable_int32_t* statechart_get_setMotorL(Statechart* handle);
/*!