-
Notifications
You must be signed in to change notification settings - Fork 28
/
Config.h
125 lines (87 loc) · 3.38 KB
/
Config.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#pragma once
#ifndef _Config_h
#define _Config_h
#include <stdint.h>
#include <WString.h>
#include "Config_PSAVanCanBridge_WifiAp.h"
//#include "Config_PSAVanCanBridge_Bluetooth.h"
//#include "Config_WifiAp_Replay.h"
//#include "Config_WifiClient.h"
struct Config
{
String VERSION = "2.0.0";
//#define PRINT_DEBUG
#define VIN_LENGTH 17
// 11: HW revision v1.1
// 14: HW revision v1.4
#define HW_VERSION 14
#ifdef WIFI_ENABLED
//#define WEBSOCKET_SERIAL
#endif
#ifndef WEBSOCKET_SERIAL
// if defined messages are sent on bluetooth connection, otherwise standard serial is used
#ifndef WIFI_ENABLED
#define USE_BLUETOOTH_SERIAL
#endif
#endif
const bool REPLAY_MODE = REPLAY_MODE_VALUE;
// if true then we can control the display from the built-in webpage
bool DISPLAY_CONTROL = false;
bool ORIGINAL_DISPLAY_PRESENT = false;
// if true then data of RD2/RD3 is bridged for the new display
bool BRIDGE_RADIO_DATA = false;
bool BRIDGE_ODOMETER_DATA = false;
// if true then remote stalk data is bridged for the head unit
bool BRIDGE_REMOTE_STALK_DATA = false;
// if true then the ignition signal is used from the VAN bus otherwise the ignition is considered as always on
bool USE_IGNITION_SIGNAL_FROM_VAN_BUS = false;
//0: none / PSA CAN
//1: PSA VAN - the distance data from the parking aid is queried with a diagnostic message (only works with rev 1.4)
//2: Chinese
uint8_t PARKING_AID_TYPE = 0;
bool READ_SERIAL_PORT_FOR_COMMANDS = false;
bool ENABLE_PARKING_AID_SOUND_FROM_SPEAKER = 0;
uint8_t FUEL_TANK_CAPACITY_IN_LITERS = 60;
uint32_t MILEAGE_AT_CMB_TRIP_RESET = 0;
bool ENABLE_MANUAL_GEARBOX_DISPLAY = true;
//0: final, 1: 1st, 2: 2nd ...
float GEAR_RATIOS[7] = { 4.53, 3.454, 1.869, 1.28, 0.95, 0.8, 0 };
//the values are in centimeters and are coming from observing the values of a 5008 from 2012
uint8_t AAS_REAR_CORNER_DISTANCES[4] = { 60, 50, 40, 30 };
uint8_t AAS_REAR_DISTANCES[4] = { 145, 100, 50, 30 };
uint8_t TIRE_SIZE = 15;
uint8_t TIRE_WIDTH = 195;
uint8_t TIRE_RATIO = 65;
// 0: CAN2004
// 1: CAN2010
uint8_t CAN_TYPE = 0;
// 0: Aftermarket
// 1: RD4/RD43
// 2: RD45
// 3: RD45 (CAN2010)
// 4: RD3
// 5: RTx
uint8_t RADIO_TYPE = 1;
bool DISPLAY_CONTROL_WITH_COM = false;
bool LEFT_STICK_BUTTON_SHOWS_OIL_TEMP = false;
bool USE_BRIGHTNESS_FROM_CAN_ODOMETER = false;
uint8_t VIN_FOR_HEADUNIT[VIN_LENGTH] = { 0 };
// if true, then SEND 0x167 on CAN bus
bool NO_EMF_C_INSTALLED = false;
// 1: original layout
// 2: my layout (displays fuel level, vehicle speed, rpm instead of the basic trip computer data)
uint8_t DISPLAY_MODE = 1;
// if true then AC changes are sent to the display
bool SEND_AC_CHANGES_TO_DISPLAY = false;
// if true then AC changes are sent to the display
bool SEND_AC_FAN_CHANGES_TO_DISPLAY = false;
bool ENABLE_REVERSE_CAMERA_ON_RTX = false;
// if true the AC status is queried with a diagnostic message (only works with rev 1.4)
bool QUERY_AC_STATUS = false;
const bool WIFI_AP_MODE = WIFI_AP_MODE_VALUE;
const char* WIFI_AP_NAME = WIFI_AP_NAME_VALUE;
const char* WIFI_SSID = WIFI_SSID_VALUE;
const char* WIFI_PASSWORD = WIFI_PASSWORD_VALUE;
Config();
};
#endif