Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/support and hint for ttgo v2 board #944

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions platformio_orig.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
; ---> SELECT ONE TARGET BOARD FROM FOLLOWING ROWS <---
;
; Note: For "LILYGO TTGO ESP32-Paxcounter LoRa32 V2.1 1.6.1" select board ttgov21new.h
; Note: For "LILYGO TTGO ESP32-Paxcounter LoRa32 V2.0 1.6.0" select board ttgov2.h and add bodge wire from LORA_IO1 to GPIO33
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this hint to ttgov2.h, since it's board specific.

;
;
[board]
Expand Down Expand Up @@ -126,6 +127,11 @@ upload_protocol = custom

[env:usb]
upload_protocol = esptool
upload_speed = 921600
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting is global, for all type boards. Thus, we can't have this here, because some older boards do not support high upload speed. Please remove.

monitor_speed = 115200
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you move this from section common to here?

; necessary for macos - adjust devicename accordingly
;upload_port = /dev/tty.usbserial-xxxxxxx
;monitor_port = /dev/tty.usbserial-xxxxxxx

[env:dev]
upload_protocol = esptool
Expand Down
2 changes: 1 addition & 1 deletion src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void dp_refresh(bool nextPage) {
dp_clear();
break;
#else // skip this page
DisplayPage++;
DisplayPage = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a hack aorund a bug to me. I think the bug is in display.h:
#define DISPLAY_PAGES (7) // number of paxcounter display pages Please try with (6). That should work.

break;
#endif
} // switch (page)
Expand Down
9 changes: 6 additions & 3 deletions src/hal/ttgov2.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// clang-format off
// upload_speed 921600
// board ttgo-lora32-v1
// board ttgo-lora32-v2
// https://github.com/LilyGO/TTGO-LORA32

#ifndef _TTGOV2_H
#define _TTGOV2_H

#include <stdint.h>

// Hardware related definitions for TTGO V2 Board
// Hardware related definitions for LilyGO TTGO LORA32 V2 Board

#define HAS_LORA 1 // comment out if device shall not send data via LoRa
#define CFG_sx1276_radio 1 // HPD13A LoRa SoC
Expand All @@ -34,8 +35,10 @@

// Pins for LORA chip SPI interface come from board file, we need some
// additional definitions for LMIC
#define LORA_RST LMIC_UNUSED_PIN
// ********************************************************************************************
//! LORA_IO1 is not connected on LilyGO TTGO V2 - bodge wire from LORA_IO1 to GPIO33 necessary
#define LORA_IO1 (33)
// ********************************************************************************************
#define LORA_IO2 LMIC_UNUSED_PIN

#endif