36 lines
		
	
	
		
			861 B
		
	
	
	
		
			C
		
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			861 B
		
	
	
	
		
			C
		
	
	
	
| //
 | |
| // Created by xemon on 23.11.22.
 | |
| //
 | |
| 
 | |
| #ifndef UVEOS_ON_NATION_CRASHDETECTION_H
 | |
| #define UVEOS_ON_NATION_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_StartThread(tCrashDetection *env);
 | |
| 
 | |
| #endif //UVEOS_ON_NATION_CRASHDETECTION_H
 |