48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
/*
|
|
* asi15.h
|
|
*
|
|
* Created on: Aug 25, 2020
|
|
* Author: FICOM-IT LTD
|
|
*
|
|
*/
|
|
|
|
#ifndef INC_ASI15_H_
|
|
#define INC_ASI15_H_
|
|
|
|
#include <stdbool.h>
|
|
#include <cmsis_os.h>
|
|
#include "stdint.h"
|
|
#include "vector.h"
|
|
#include "UveosEmergencyEventInterface.h"
|
|
#include "AccelDataFlowInterface.h"
|
|
#include "EraGlonassAsi15.h"
|
|
#include "CarFlipDetection.h"
|
|
|
|
typedef struct {
|
|
tAccelDataFlowInterface *accelData;
|
|
osMessageQueueId_t outEvents;
|
|
|
|
tEraGlonassAsi15 asi15;
|
|
tCarFlipDetection flip;
|
|
|
|
vector3 currentAcceleration;
|
|
bool crashEventGenerated;
|
|
} tCarCrashDetection;
|
|
|
|
void CarCrashDetection_Init(
|
|
tCarCrashDetection *env,
|
|
tAccelDataFlowInterface *accelData,
|
|
float *asi15threshold,
|
|
tCarFlipDetectionSettings *settings
|
|
);
|
|
|
|
void CarCrashDetection_Processing(tCarCrashDetection *env, uint32_t timeout);
|
|
|
|
bool CarCrashDetection_GetNext(tCarCrashDetection *env, tUveosEmergencyEvent *event, uint32_t timeout);
|
|
|
|
tUveosEmergencyEventInterface CarCrashDetection_GetInterface(tCarCrashDetection *env);
|
|
|
|
tUveosEmergencySimulationInterface CarCrashDetection_GetSimInterface(tCarCrashDetection *env);
|
|
|
|
#endif /* INC_ASI15_H_ */
|