Skip to content

Commit adf540c

Browse files
committed
configuration changes
1 parent e35c20d commit adf540c

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

include/configuration.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// OBD - ELM327 //
33
//////////////////
44
// Enable ELM327 (internal) debug logs
5-
//#define ENABLE_ELM327_DEBUG_LOGS
5+
#define ENABLE_ELM327_DEBUG_LOGS
66

77
// Mock OBD for testing without real OBD device
8-
#define MOCK_OBD
8+
//#define MOCK_OBD
99

1010
// Mock values for testing without real OBD device //
1111
// Enable only one of the follow
@@ -56,8 +56,8 @@
5656
// Select connection method (only one of the follow)
5757

5858
#ifdef ESP32
59-
#define USE_OBD_BLUETOOTH
60-
//#define USE_OBD_WIFI
59+
//#define USE_OBD_BLUETOOTH
60+
#define USE_OBD_WIFI
6161
#endif
6262

6363
#ifdef ESP8266
@@ -68,7 +68,7 @@
6868
////////////
6969
// Keypad //
7070
////////////
71-
#define USE_MOCK_KEYPAD
71+
//#define USE_MOCK_KEYPAD
7272

7373

7474

include/odbAdapter.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ class OdbAdapter {
3535
WiFiClient SerialDevice;
3636
const char* ssid = "WiFi_OBDII";
3737
const char* password = "your-password";
38-
#ifdef ESP32
39-
IPAddress server(192, 168, 0, 10);
40-
#endif
41-
#ifdef ESP8266
42-
const char* server = "192.168.0.10";
43-
#endif
38+
const char* server = "192.168.0.10";
4439
#endif
4540

4641
bool deviceConnected;

src/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ void setup() {
165165
myGauges[1] = new Gauge(myDisplays[1], VIEW_BATTERY_VOLTAGE, TYPE_GAUGE_GRAPH, DELAY_VIEW_BATTERY_VOLTAGE, (char*)"Volt", (char*)"%0.1f", RED, RED, true, true, 110, 120, 140, 150);
166166
// KM/h
167167
myGauges[2] = new Gauge(myDisplays[1], VIEW_KPH, TYPE_GAUGE_GRAPH, DELAY_VIEW_KPH, (char*)"Km/h", (char*)"%d", WHITE, RED, false, false, 0, 0, 130, 200);
168-
myGauges[2]->addSecondaryView(VIEW_RPM, (char*)"%d");
168+
//myGauges[2]->addSecondaryView(VIEW_RPM, (char*)"%d");
169169
// RPM
170170
myGauges[3] = new Gauge(myDisplays[1], VIEW_RPM, TYPE_GAUGE_GRAPH, DELAY_VIEW_RPM, (char*)"RPM", (char*)"%d", WHITE, RED, false, true, 0, 0, 6000, 7500);
171-
myGauges[3]->addSecondaryView(VIEW_KPH, (char*)"%d");
171+
//myGauges[3]->addSecondaryView(VIEW_KPH, (char*)"%d");
172172
// Engine coolant
173173
myGauges[4] = new Gauge(myDisplays[1], VIEW_COOLANT_TEMP, TYPE_GAUGE_GRAPH, DELAY_VIEW_COOLANT_TEMP, (char*)"Engine", (char*)"%d C", BLUE, RED, true, true, 0, 40, 105, 120);
174174
myGauges[4]->addSecondaryView(VIEW_INTAKE_TEMP, (char*)"%d C");
@@ -179,10 +179,10 @@ void setup() {
179179
myGauges[6] = new Gauge(myDisplays[1], VIEW_TIMING_ADV, TYPE_SIMPLE_TEXT, DELAY_VIEW_TIMING_ADV, (char*)"Advance", (char*)"%d º", WHITE, WHITE, false, false, 0, 0, 50, 50);
180180
// Throttle
181181
myGauges[7] = new Gauge(myDisplays[1], VIEW_THROTTLE, TYPE_GAUGE_GRAPH, DELAY_VIEW_THROTTLE, (char*)"THROTL", (char*)"%d", WHITE, WHITE, false, false, 0, 0, 100, 100);
182-
myGauges[7]->addSecondaryView(VIEW_ENGINE_LOAD, (char*)"%d");
182+
//myGauges[7]->addSecondaryView(VIEW_ENGINE_LOAD, (char*)"%d");
183183
// Engine load
184184
myGauges[8] = new Gauge(myDisplays[1], VIEW_ENGINE_LOAD, TYPE_GAUGE_GRAPH, DELAY_VIEW_ENGINE_LOAD, (char*)"Load", (char*)"%d", WHITE, WHITE, false, false, 0, 0, 100, 100);
185-
myGauges[8]->addSecondaryView(VIEW_THROTTLE, (char*)"%d");
185+
//myGauges[8]->addSecondaryView(VIEW_THROTTLE, (char*)"%d");
186186
// Short fuel trims
187187
myGauges[9] = new Gauge(myDisplays[1], VIEW_SHORT_FUEL_TRIM, TYPE_DUAL_TEXT, DELAY_VIEW_SHORT_FUEL_TRIM, (char*)"S.F.T.", (char*)"%d", RED, RED, false, false, -30, -20, 20, 30);
188188
myGauges[9]->addSecondaryView(VIEW_LONG_FUEL_TRIM, (char*)"%d");

src/odbAdapter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ bool OdbAdapter::isOBDConnected() {
9090
}*/
9191

9292
void OdbAdapter::disconnect() {
93-
if (SerialDevice.connected()) {
93+
/*if (SerialDevice.connected()) {
9494
#ifdef ESP32
9595
SerialDevice.disconnect();
9696
#endif
97-
}
97+
}*/
9898
setDeviceConnected(false);
9999
setObdConnected(false);
100100
}

0 commit comments

Comments
 (0)