-
Notifications
You must be signed in to change notification settings - Fork 56
/
constants.h
109 lines (96 loc) · 4.44 KB
/
constants.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
* constants.h
*
* Defines the global / application wide constants
*
Copyright (c) 2013 Collin Kidder, Michael Neuweiler, Charles Galpin
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* Author: Michael Neuweiler
*/
#ifndef CONSTANTS_H_
#define CONSTANTS_H_
namespace Constants {
// misc
static const char* trueStr = "true";
static const char* falseStr = "false";
static const char* notAvailable = "n/a";
static const char* ichipCommandPrefix = "AT+i";
static const char* ichipErrorString = "I/ERROR";
// configuration
static const char* numThrottlePots = "numThrottlePots";
static const char* throttleSubType = "throttleSubType";
static const char* throttleMin1 = "throttleMin1";
static const char* throttleMin2 = "throttleMin2";
static const char* throttleMax1 = "throttleMax1";
static const char* throttleMax2 = "throttleMax2";
static const char* throttleRegenMax = "throttleRegenMax";
static const char* throttleRegenMin = "throttleRegenMin";
static const char* throttleFwd = "throttleFwd";
static const char* throttleMap = "throttleMap";
static const char* throttleMinRegen = "throttleMinRegen";
static const char* throttleMaxRegen = "throttleMaxRegen";
static const char* throttleCreep = "throttleCreep";
static const char* brakeMin = "brakeMin";
static const char* brakeMax = "brakeMax";
static const char* brakeMinRegen = "brakeMinRegen";
static const char* brakeMaxRegen = "brakeMaxRegen";
static const char* brakeLight = "brakeLight";
static const char* revLight = "revLight";
static const char* enableIn = "enableIn";
static const char* reverseIn = "reverseIn";
static const char* speedMax = "speedMax";
static const char* torqueMax = "torqueMax";
static const char* logLevel = "logLevel";
// status
static const char* timeRunning = "timeRunning";
static const char* torqueRequested = "torqueRequested";
static const char* torqueActual = "torqueActual";
static const char* throttle = "throttle";
static const char* brake = "brake";
static const char* motorMode = "motorMode";
static const char* speedRequested = "speedRequested";
static const char* speedActual = "speedActual";
static const char* dcVoltage = "dcVoltage";
static const char* nominalVolt = "nominalVolt";
static const char* dcCurrent = "dcCurrent";
static const char* acCurrent = "acCurrent";
static const char* kiloWattHours = "kiloWattHours";
static const char* bitfield1 = "bitfield1";
static const char* bitfield2 = "bitfield2";
static const char* bitfield3 = "bitfield3";
static const char* bitfield4 = "bitfield4";
static const char* running = "running";
static const char* faulted = "faulted";
static const char* warning = "warning";
static const char* gear = "gear";
static const char* tempMotor = "tempMotor";
static const char* tempInverter = "tempInverter";
static const char* tempSystem = "tempSystem";
static const char* mechPower = "mechPower";
static const char* prechargeR = "prechargeR";
static const char* prechargeRelay = "prechargeRelay";
static const char* mainContactorRelay = "mainContactorRelay";
static const char* coolFan = "coolFan";
static const char* coolOn = "coolOn";
static const char* coolOff = "coolOff";
static const char* validChecksum = "Valid checksum, using stored config values";
static const char* invalidChecksum = "Invalid checksum, using hard coded config values";
static const char* valueOutOfRange = "value out of range: %l";
static const char* normalOperation = "normal operation restored";
}
#endif /* CONSTANTS_H_ */