-
Notifications
You must be signed in to change notification settings - Fork 2
/
trip.h
45 lines (40 loc) · 1.51 KB
/
trip.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
45
#ifndef TRIP_H
#define TRIP_H
class Trip{
public:
enum varnames { loopCount=0,
injPulses,
injHiSec,
injHius,
injIdleHiSec,
injIdleHius,
vssPulses,
vssEOCPulses,
vssPulseLength,
varCount }; /* this is always last ! */
unsigned long var[varCount];
/* ----
loopCount -- how long has this trip been running
injPulses -- rpm
injHiSec -- seconds the injector has been open
injHius -- microseconds, fractional part of the injectors open
injIdleHiSec -- seconds the injector has been open
injIdleHius -- microseconds, fractional part of the injectors open
vssPulses -- from the speedo
vssEOCPulses -- from the speedo
vssPulseLength -- only used by instant
---- */
//these functions actually return in thousandths,
unsigned long miles();
unsigned long gallons();
unsigned long mpg();
unsigned long mph();
unsigned long time(); //mmm.ss
unsigned long eocMiles(); //how many "free" miles?
unsigned long idleGallons(); //how many gallons spent at 0 mph?
unsigned long fuelCost();
void update(Trip t);
void reset();
Trip();
};
#endif