SMART_COMPONENTS_CrashDetec.../CrashDetection.h

34 lines
914 B
C

//
// Created by ilya on 05.04.24.
//
#ifndef SMART_COMPONENTS_CRASHDETECTION_H
#define SMART_COMPONENTS_CRASHDETECTION_H
#include "CarCrashDetection.h"
#include "LoggerInterface.h"
typedef struct {
tCarCrashDetection carCrashDetection;
tUveosEmergencyEventInterface emergencyEvents;
tUveosEmergencySimulationInterface simulationInterface;
tLoggerInterface *logger;
struct {
osThreadId_t id;
uint32_t stack[512];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread;
} tCrashDetection;
void CrashDetection_Init(
tCrashDetection *env,
tAccelDataFlowInterface *accelData,
float *asi15threshold,
tCarFlipDetectionSettings *settings,
tLoggerInterface *logger
);
void CrashDetection_StopThread(tCrashDetection *env);
void CrashDetection_StartThread(tCrashDetection *env);
#endif //SMART_COMPONENTS_CRASHDETECTION_H