commit 123d576844db754dee9cd553fcdf8205e1c2bca6 Author: cfif Date: Mon Jun 2 13:26:40 2025 +0300 Init diff --git a/Inc/UveosEmergencyEventInterface.h b/Inc/UveosEmergencyEventInterface.h new file mode 100644 index 0000000..b7320e7 --- /dev/null +++ b/Inc/UveosEmergencyEventInterface.h @@ -0,0 +1,37 @@ +// +// Created by xemon on 21.11.22. +// + +#ifndef UVEOS_ON_NATION_UVEOSEMERGENCYEVENTINTERFACE_H +#define UVEOS_ON_NATION_UVEOSEMERGENCYEVENTINTERFACE_H + +#include "stdbool.h" +#include "stdint.h" + +typedef struct { + bool isImpact; + float impactValue; + bool isFlip; + float flipAngleCos; +} tUveosEmergencyEvent; + +typedef bool (*UveosEmergencyGetNextCall)(void *env, tUveosEmergencyEvent *event, uint32_t timeout); + +typedef void (*UveosEmergencySimulate)(void *env, float value); + +typedef struct { + void *env; + UveosEmergencyGetNextCall getNext; +} tUveosEmergencyEventInterface; + +typedef struct { + void *env; + UveosEmergencySimulate simulateImpact; + UveosEmergencySimulate simulateFlip; +} tUveosEmergencySimulationInterface; + +#define UveosEmergencyEvent_GetNext(ENV, EVENT, TIMEOUT) (ENV)->getNext((ENV)->env,EVENT,TIMEOUT) +#define UveosEmergencySimulationInterface_ASI15(ENV, IMPACT_ASI15) (ENV)->simulateImpact((ENV)->env, IMPACT_ASI15); +#define UveosEmergencySimulationInterface_Flip(ENV, FLIP_ANGLE) (ENV)->simulateFlip((ENV)->env, FLIP_ANGLE); + +#endif //UVEOS_ON_NATION_UVEOSEMERGENCYEVENTINTERFACE_H diff --git a/Src/UveosEmergencyEventInterface.c b/Src/UveosEmergencyEventInterface.c new file mode 100644 index 0000000..e69de29 diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..d4d574e --- /dev/null +++ b/modular.json @@ -0,0 +1,12 @@ +{ + "dep": [ + ], + "cmake": { + "inc_dirs": [ + "Inc" + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file