38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
//
|
|
// 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
|