Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
apps.cpp File Reference
#include "apps.h"
#include "debug.h"
#include "can.h"
#include <Arduino.h>
#include <elapsedMillis.h>
Include dependency graph for apps.cpp:

Go to the source code of this file.

Functions

int average (int *buffer, int n)
 
void bufferInsert (int *buffer, int n, int value)
 
int scaleApps2 (int apps2)
 
bool plausibility (int v_apps1, int v_apps2)
 
int convertToBamocarScale (int apps1, int apps2)
 
int readApps ()
 

Variables

elapsedMillis appsImplausibilityTimer
 
elapsedMillis appsBrakePlausibilityTimer
 
volatile uint16_t brakeValue
 
bool APPsTimeout = false
 
int avgBuffer1 [AVG_SAMPLES] = {0}
 
int avgBuffer2 [AVG_SAMPLES] = {0}
 

Function Documentation

◆ average()

int average ( int *  buffer,
int  n 
)

Definition at line 17 of file apps.cpp.

◆ bufferInsert()

void bufferInsert ( int *  buffer,
int  n,
int  value 
)

Definition at line 25 of file apps.cpp.

Here is the caller graph for this function:

◆ convertToBamocarScale()

int convertToBamocarScale ( int  apps1,
int  apps2 
)

Definition at line 58 of file apps.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plausibility()

bool plausibility ( int  v_apps1,
int  v_apps2 
)

Definition at line 36 of file apps.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readApps()

int readApps ( )

Definition at line 82 of file apps.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleApps2()

int scaleApps2 ( int  apps2)

Definition at line 32 of file apps.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ appsBrakePlausibilityTimer

elapsedMillis appsBrakePlausibilityTimer

Definition at line 9 of file apps.cpp.

◆ appsImplausibilityTimer

elapsedMillis appsImplausibilityTimer

Definition at line 8 of file apps.cpp.

◆ APPsTimeout

bool APPsTimeout = false

Definition at line 12 of file apps.cpp.

◆ avgBuffer1

int avgBuffer1[AVG_SAMPLES] = {0}

Definition at line 14 of file apps.cpp.

◆ avgBuffer2

int avgBuffer2[AVG_SAMPLES] = {0}

Definition at line 15 of file apps.cpp.

◆ brakeValue

volatile uint16_t brakeValue

Definition at line 11 of file apps.cpp.