forked from HanzeRacingDivision/HRD05-pedalbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensors.h
28 lines (18 loc) · 734 Bytes
/
sensors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "./config.h"
#include "./variables.h"
#include "./filtering.h"
namespace SENSORS {
unsigned long last_read; // Millis when last update was executed.
MovingAverage APPS1 = MovingAverage(APPS1_IN);
MovingAverage APPS2 = MovingAverage(APPS2_IN);
MovingAverage BPS1 = MovingAverage(BPS1_IN);
MovingAverage BPS2 = MovingAverage(BPS2_IN);
float THROTTLE = 0.0f; // Final acceleration torque value (after plausibility check)
float BRAKE = 0.0f; // Final brake torque value (after plausibility check)
void read();
float check_plausibility(const float &POT1, const float &POT2);
float get_APPS();
float get_BPS();
bool is_brake_pressed();
}