-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathSensors.h
44 lines (35 loc) · 1.14 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SENSORS_H
#define SENSORS_H
#include <AnalogChannel.h>
#include <Gyro.h>
#include "ports.h"
class Sensors
{
public:
AnalogChannel* ultrasonic;
AnalogChannel* infraredShooter;
AnalogChannel* infraredLoad;
static const double VPMINF = 7.38976; //volate per meter shooter
static const double VPIULTRA = 0.0097361;
static const double ULTRA_YINT = 0.7008307562;
Sensors(class main_robot* robot,
uint8_t usMod, uint32_t usChan, uint8_t isMod, uint32_t isChan,
uint8_t ilMod, uint32_t ilChan,
uint8_t gyMod, uint32_t gyChan);
~Sensors();
float getVoltsInfShooter();//Get volts from infered shooter
float getVoltsInfLoad();//get volts inf load
float getVoltsUltra();//Get volts from ultra sonic
float getInfraredShooter();
bool getInfraredLoad();
float getUltrasonic();
//Gyro* gyro612;
class main_robot* robot;
float getGyroAngle();
double getGyroRate();
void gyroReset();
void setGyroSens(float vpdps); //Set the Gyro Sensitivitutbgsvi sh
// static void updateHelper(void* instName);
static const float LOAD_THRESHOLD = 10;
};
#endif