-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathop_devicedata_struct.h
More file actions
67 lines (53 loc) · 3.47 KB
/
op_devicedata_struct.h
File metadata and controls
67 lines (53 loc) · 3.47 KB
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
#ifndef OP_DEVICEDATA_STRUCT
#define OP_DEVICEDATA_STRUCT
#include <arduino_compat.h> // Gives us Arduino-like data type names
#include <op_defines.h>
// This struct is similiar to the _eeprom_data struct in Arduino, but not exactly!
// We include a few more things here than there. These are all settings we might be interested
// in reading from the device, not just things the device stores in EEPROM. (For example, we might want
// to know the current throttle stick position, but that is not a setting the device stores in EEPROM)
//--------------------------------------------------------------------------------------------------------------------------------------->>
struct _device_data {
// First Var
uint8_t FirstVar;
// Channel settings
channel_settings RCChannel[CHANNELS]; // Create CHANNELS number of type channel_settings
// Sound settings
squeak_settings Squeak[NUM_SQUEAKS];
uint8_t MinSqueakSpeedPct; // Prevent squeaks from occuring when vehicle is moving slower than this percent of movement
boolean HeadlightSound_Enabled; // Is the headlight sound enabled or not
boolean TurretSound_Enabled; // Is turret rotation sound enabled or not
boolean BarrelSound_Enabled; // Is barrel elevation sound enabled or not
boolean SoundBankA_Loop; // Should sounds in Sound Bank A play continuously
boolean SoundBankB_Loop; // Should sounds in Sound Bank B play continuously
uint8_t VolumeEngine; // Relative, not absolute volumes
uint8_t VolumeTrackOverlay; // Relative, not absolute volumes
uint8_t VolumeEffects; // Relative, not absolute volumes
// Lights
uint16_t Light1FlashTime_mS; // Single blink on time in milliseconds.
uint16_t Light1BlinkOnTime_mS; // This is the time the blink stays on.
uint16_t Light1BlinkOffTime_mS; // This is the time the blink stays off.
uint16_t Light2FlashTime_mS; // Single blink on time in milliseconds.
uint16_t Light2BlinkOnTime_mS; // This is the time the blink stays on.
uint16_t Light2BlinkOffTime_mS; // This is the time the blink stays off.
uint16_t Light3FlashTime_mS; // Single blink on time in milliseconds.
uint16_t Light3BlinkOnTime_mS; // This is the time the blink stays on.
uint16_t Light3BlinkOffTime_mS; // This is the time the blink stays off.
// Servo
uint16_t ServoTimeToRecoil; // In mS
uint16_t ServoTimeToReturn; // In mS
boolean ServoReversed;
uint8_t ServoEndPointRecoiled;
uint8_t ServoEndPointBattery;
// Throttle
boolean centerThrottle; // If true, stick centered = idle, if false stick at low position = idle
uint8_t idleDeadband; // Percentage of throttle movement to ignore around idle position
// Engine
boolean EngineAutoStart; // If true, engine will auto-start on first blip of throttle. If false, start engine with user selected trigger.
int32_t EngineAutoStopTime_mS; // If positive, after this amount of time at idle the engine will turn itself off (in milliseconds). 0 to disable.
// Program setting
boolean PrintDebug; // If true, will print debugging messages out the DebugSerial serial port
// Marker
uint32_t InitStamp; //
};
#endif // Define OP_DEVICEDATA_STRUCT