Skip to content

Commit 2dedc02

Browse files
committed
bug fixes
1 parent c4069bf commit 2dedc02

File tree

2 files changed

+25
-43
lines changed

2 files changed

+25
-43
lines changed

include/configuration.h

+23-27
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1+
//////////////
2+
// Settings //
3+
//////////////
4+
//#define MODE_DEBUG_FULL
5+
//#define MODE_DEBUG
6+
#define MODE_RELEASE
7+
8+
// Enable EEPROM to save settings in EEPROM
9+
#define ENABLE_EEPROM
10+
//#define CLEAR_SETTINGS
11+
12+
#ifdef ESP32
13+
// Dual Core
14+
#define USE_MULTI_THREAD
15+
#endif
16+
17+
#ifdef ESP8266
18+
//
19+
#define DRAW_FAST
20+
#endif
21+
122
//////////////////
223
// OBD - ELM327 //
324
//////////////////
425
// Enable ELM327 (internal) debug logs
5-
#define ENABLE_ELM327_DEBUG_LOGS
6-
7-
#define MODE_DEBUG_FULL
8-
//#define MODE_DEBUG
9-
//#define MODE_RELEASE
26+
//#define ENABLE_ELM327_DEBUG_LOGS
1027

1128
// Mock OBD for testing without real OBD device
1229
//#define MOCK_OBD
@@ -46,27 +63,6 @@
4663
//#define SECONDARY_GAUGE_ENGINE_LOAD
4764
//#define SECONDARY_GAUGE_THROTTLE
4865

49-
//////////////
50-
// Settings //
51-
//////////////
52-
53-
#define DEBUG_MODE
54-
#define ENABLE_SECONDARY_VIEWS
55-
56-
// Enable EEPROM to save settings in EEPROM
57-
#define ENABLE_EEPROM
58-
//#define CLEAR_SETTINGS
59-
60-
#ifdef ESP32
61-
// Dual Core
62-
#define USE_MULTI_THREAD
63-
#endif
64-
65-
#ifdef ESP8266
66-
//
67-
#define DRAW_FAST
68-
#endif
69-
7066

7167
/////////////////
7268
// Date - Time //
@@ -82,7 +78,7 @@
8278
//#define ENABLE_STARTUP_LOGO
8379

8480
// Enable the 2nd TFT screen
85-
#define ENABLE_SECOND_DISPLAY
81+
//#define ENABLE_SECOND_DISPLAY
8682

8783

8884
////////////////

src/displayManager.cpp

+2-16
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ void DisplayManager::goToNextDisplay() {
6363
void DisplayManager::goToPreviousView() {
6464

6565
bool changeGauge = true;
66-
#ifdef USE_MULTI_THREAD
67-
xSemaphoreTake(semaphoreActiveView, portMAX_DELAY);
68-
#endif
6966

7067
Display *display = myDisplays[activeDisplay];
7168
int activeIndex = display->getActiveView();
@@ -92,19 +89,12 @@ void DisplayManager::goToPreviousView() {
9289
mySettings->setSecondaryActiveView(display->getId(), display->getSecondaryActiveView());
9390
mySettings->save();
9491

95-
#ifdef USE_MULTI_THREAD
96-
xSemaphoreGive(semaphoreActiveView);
97-
yield();
98-
#endif
92+
yield();
9993

10094

10195
}
10296
void DisplayManager::goToNextView() {
10397
bool changeGauge = true;
104-
105-
#ifdef USE_MULTI_THREAD
106-
xSemaphoreTake(semaphoreActiveView, portMAX_DELAY);
107-
#endif
10898

10999
Display *display = myDisplays[activeDisplay];
110100
Gauge *gauge = display->getActiveGauge();
@@ -144,11 +134,7 @@ void DisplayManager::goToNextView() {
144134
mySettings->setActiveView(display->getId(), display->getActiveView());
145135
mySettings->setSecondaryActiveView(display->getId(), display->getSecondaryActiveView());
146136
mySettings->save();
147-
148-
#ifdef USE_MULTI_THREAD
149-
xSemaphoreGive(semaphoreActiveView);
150-
yield();
151-
#endif
137+
152138
}
153139

154140
int DisplayManager::getActiveDisplayId() {

0 commit comments

Comments
 (0)