Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
MonitorSystem.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
2#define RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7
8#include "System.h"
9
10typedef enum {
16
17typedef enum {
18 NONE, // If a fault is detected, do nothing
19 SYSTEM_ADJUST, // If a fault is detected, adjust the system
20 SYSTEM_DISABLE, // If a fault is detected, disable the system, and adjust the vehicle
21 VEHICLE_SHUTDOWN // If a fault is detected, shut down the vehicle
23
24typedef struct {
29
39void initMonitorSystem(MonitorSystem* monitor, const char* name, int hz,
41
42#endif // RENSSELAERMOTORSPORT_MONITOR_SYSTEM_H
void initMonitorSystem(MonitorSystem *monitor, const char *name, int hz, MonitorType type, FaultType fault)
Initializes the Monitor System with initial settings.
Definition: MonitorSystem.c:3
MonitorType
Definition: MonitorSystem.h:10
@ m_APPS
Definition: MonitorSystem.h:12
@ m_ACCUMULATOR
Definition: MonitorSystem.h:14
@ m_TRACTION
Definition: MonitorSystem.h:13
@ m_TORQUE
Definition: MonitorSystem.h:11
FaultType
Definition: MonitorSystem.h:17
@ VEHICLE_SHUTDOWN
Definition: MonitorSystem.h:21
@ SYSTEM_ADJUST
Definition: MonitorSystem.h:19
@ SYSTEM_DISABLE
Definition: MonitorSystem.h:20
@ NONE
Definition: MonitorSystem.h:18
type
Definition: Updateable.h:17
MonitorType type
Definition: MonitorSystem.h:26
FaultType fault
Definition: MonitorSystem.h:27
Definition: System.h:17