Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Smeat committed Mar 14, 2020
1 parent 3b85488 commit b06263b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
3 changes: 0 additions & 3 deletions ESP32LapTimer/src/HardwareConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
#define BOARD BOARD_WROOM
#endif

/// If your setup doesn't use an OLED remove or comment the following line
#define OLED

/// Sets the WiFi acces point name
#define WIFI_AP_NAME "Chorus32 LapTimer"
#define BLUETOOTH_NAME WIFI_AP_NAME
Expand Down
12 changes: 6 additions & 6 deletions ESP32LapTimer/src/OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void oledSetup(void) {
display.drawFastImage(0, 0, 128, 64, ChorusLaptimerLogo_Screensaver);
display.display();
display.setFont(Dialog_plain_9);

for(uint8_t i = 0; i < NUM_OLED_PAGES; ++i) {
if(oled_pages[i].init) {
oled_pages[i].init(oled_pages[i].data);
Expand Down Expand Up @@ -194,7 +194,7 @@ void summary_page_input(void* data, uint8_t index, uint8_t type) {
my_data->first_pilot = 0;
} else {
my_data->first_pilot += MIN(SUMMARY_PILOTS_PER_PAGE, getActivePilots() - SUMMARY_PILOTS_PER_PAGE);
}
}
}
else {
next_page_input(data, index, type);
Expand Down Expand Up @@ -261,7 +261,7 @@ void race_page_update(void* data) {
display.setTextAlignment(TEXT_ALIGN_LEFT);
uint8_t skipped = 0;
for(uint8_t i = 0; i < MAX_NUM_PILOTS; ++i) {
if(isPilotActive(i)) {
if(isPilotActive(i)) {
uint32_t last_lap = getLaptimeRel(i);
uint32_t best_lap = getLaptimeRel(i, getBestLap(i));
char last_lap_str[12];
Expand All @@ -282,7 +282,7 @@ void race_page_update(void* data) {

void adc_page_init(void* data) {
adcPageData_s* my_data = (adcPageData_s*)data;
filter_init(&my_data->filter, 1, oledRefreshTime/1000.0);
filter_init(&my_data->filter, 1, oledRefreshTime/1000.0);
}

void adc_page_update(void* data) {
Expand All @@ -300,7 +300,7 @@ void calib_page_update(void* data) {
display.drawString(0, 0, "Calibrating - " + String(getcalibrationFreqIndex()) + "/" + String(8*(MAX_BAND+1)));
} else {
display.drawString(0, 0, "Frequency - " + String(channelFreqTable[getcalibrationFreqIndex()]) + "Hz");
}
}
display.drawString(0, 9, "Min = " + String(EepromSettings.RxCalibrationMin[0]) + ", Max = " + String(EepromSettings.RxCalibrationMax[0]));
display.drawString(0, 18, "Min = " + String(EepromSettings.RxCalibrationMin[1]) + ", Max = " + String(EepromSettings.RxCalibrationMax[1]));
display.drawString(0, 27, "Min = " + String(EepromSettings.RxCalibrationMin[2]) + ", Max = " + String(EepromSettings.RxCalibrationMax[2]));
Expand All @@ -312,7 +312,7 @@ void calib_page_update(void* data) {
void calib_page_input(void* data, uint8_t index, uint8_t type) {
(void)data;
if(index == 1 && type == BUTTON_SHORT) {
rssiCalibration();
rssiCalibration();
}
else {
next_page_input(data, index, type);
Expand Down
1 change: 1 addition & 0 deletions ESP32LapTimer/src/targets/config_default.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
#define ADC5_GPIO 32
#define ADC6_GPIO 33

#define OLED
#define OLED_SCL 21
#define OLED_SDA 22
6 changes: 4 additions & 2 deletions ESP32LapTimer/src/targets/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "config_dev_board.h"
#elif BOARD==BOARD_WROOM
#include "config_wroom.h"
#else
#else
#error "Unknown board!"
#endif

Expand All @@ -35,6 +35,8 @@
#define I2C_SCL SCL
#endif

#if (!defined(OLED_SCL) || !defined(OLED_SDA)) && defined(OLED)
#if (!defined(OLED_SCL) || !defined(OLED_SDA))
#undef OLED
#define OLED_SCL -1
#define OLED_SDA -1
#endif

0 comments on commit b06263b

Please sign in to comment.