cleanup ini file and update source code
This commit is contained in:
parent
cf80cefe63
commit
7abc44f521
|
@ -1,31 +1,24 @@
|
|||
|
||||
[env]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
board = ttgo-t-beam
|
||||
lib_ldf_mode = deep+
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
adafruit/Adafruit GFX Library @ 1.7.5
|
||||
adafruit/Adafruit SSD1306 @ 2.4.0
|
||||
lewisxhe/AXP202X_Library @ 1.1.2
|
||||
sandeepmistry/LoRa @ 0.7.2
|
||||
peterus/APRS-Decoder-Lib @ 0.0.5
|
||||
mikalhart/TinyGPSPlus @ 1.0.2
|
||||
check_tool = cppcheck
|
||||
check_flags =
|
||||
cppcheck: --suppress=*:*.pio\* --inline-suppr
|
||||
cppcheck: --suppress=*:*.pio\* --inline-suppr
|
||||
|
||||
# lib TinyGPSPlus is 1655
|
||||
|
||||
#ESP8266 and ESP32 OLED driver for SSD1306 displays
|
||||
[env:ttgo-t-beam-v1]
|
||||
lib_deps =
|
||||
Adafruit GFX Library@1.7.5
|
||||
Adafruit SSD1306
|
||||
LoRa
|
||||
APRS-Decoder-Lib
|
||||
1655
|
||||
AXP202X_Library
|
||||
board = ttgo-t-beam
|
||||
build_flags = -Werror -Wall -DTTGO_T_Beam_V1_0
|
||||
|
||||
[env:ttgo-t-beam-v0_7]
|
||||
lib_deps =
|
||||
Adafruit GFX Library@1.7.5
|
||||
Adafruit SSD1306
|
||||
LoRa
|
||||
APRS-Decoder-Lib
|
||||
APRS-IS-Lib
|
||||
1655
|
||||
build_flags = -DARDUINO_T_Beam_V0_7
|
||||
board = ttgo-t-beam
|
||||
build_flags = -Werror -Wall -DTTGO_T_Beam_V0_7
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
#include <Arduino.h>
|
||||
#include <LoRa.h>
|
||||
#include <APRS-Decoder.h>
|
||||
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||
#include <axp20x.h>
|
||||
#endif
|
||||
#include <TinyGPS++.h>
|
||||
|
||||
#include "settings.h"
|
||||
#include "display.h"
|
||||
|
||||
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||
#ifdef TTGO_T_Beam_V1_0
|
||||
#include <axp20x.h>
|
||||
void setup_axp();
|
||||
AXP20X_Class axp;
|
||||
#endif
|
||||
|
@ -32,7 +30,7 @@ void setup()
|
|||
Serial.println("[INFO] LoRa APRS Tracker by OE5BPA (Peter Buchegger)");
|
||||
show_display("OE5BPA", "LoRa APRS Tracker", "by Peter Buchegger", 2000);
|
||||
|
||||
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||
#ifdef TTGO_T_Beam_V1_0
|
||||
setup_axp();
|
||||
#endif
|
||||
setup_gps();
|
||||
|
@ -116,7 +114,7 @@ void loop()
|
|||
}
|
||||
}
|
||||
|
||||
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||
#ifdef TTGO_T_Beam_V1_0
|
||||
void setup_axp()
|
||||
{
|
||||
Wire.begin(SDA, SCL);
|
||||
|
@ -160,13 +158,6 @@ void setup_lora()
|
|||
|
||||
void setup_gps()
|
||||
{
|
||||
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
#else
|
||||
#define GPS_RX 15
|
||||
#define GPS_TX 12
|
||||
#endif
|
||||
ss.begin(9600, SERIAL_8N1, GPS_TX, GPS_RX);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,10 +11,4 @@ void show_display(String header, String line1, String line2, String line3, int w
|
|||
void show_display(String header, String line1, String line2, String line3, String line4, int wait = 0);
|
||||
void show_display(String header, String line1, String line2, String line3, String line4, String line5, int wait = 0);
|
||||
|
||||
#ifdef ARDUINO_T_Beam
|
||||
#define OLED_SDA 21
|
||||
#define OLED_SCL 22
|
||||
#define OLED_RST 4
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
22
src/pins.h
Normal file
22
src/pins.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef PINS_H_
|
||||
#define PINS_H_
|
||||
|
||||
#undef OLED_SDA
|
||||
#undef OLED_SCL
|
||||
#undef OLED_RST
|
||||
|
||||
#define OLED_SDA 21
|
||||
#define OLED_SCL 22
|
||||
#define OLED_RST 16
|
||||
|
||||
#ifdef(TTGO_T_Beam_V0_7)
|
||||
#define GPS_RX 15
|
||||
#define GPS_TX 12
|
||||
#endif
|
||||
|
||||
#ifdef(TTGO_T_Beam_V1_0)
|
||||
#define GPS_RX 12
|
||||
#define GPS_TX 34
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue