This commit is contained in:
cfif 2024-12-04 13:10:48 +03:00
commit c5a4ae38b3
3 changed files with 49 additions and 0 deletions

View File

@ -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

View File

12
modular.json Normal file
View File

@ -0,0 +1,12 @@
{
"dep": [
],
"cmake": {
"inc_dirs": [
"Inc"
],
"srcs": [
"Src/**.c"
]
}
}