mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-28 16:52:33 +01:00
Compare commits
4 Commits
digi-corre
...
backToDigi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4fc99466f | ||
|
|
41f09af7b5 | ||
|
|
0eec028c5d | ||
|
|
c48dd15bd6 |
@@ -1,17 +1,17 @@
|
||||
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
|
||||
*
|
||||
*
|
||||
* This file is part of LoRa APRS iGate.
|
||||
*
|
||||
*
|
||||
* LoRa APRS iGate is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* LoRa APRS iGate is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -105,9 +105,9 @@ namespace BATTERY_Utils {
|
||||
void getI2CVoltageSensorAddress() {
|
||||
uint8_t err, addr;
|
||||
for(addr = 1; addr < 0x7F; addr++) {
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||
Wire1.beginTransmission(addr);
|
||||
err = Wire1.endTransmission();
|
||||
#ifdef SENSOR_I2C_BUS
|
||||
SENSOR_I2C_BUS.beginTransmission(addr);
|
||||
err = SENSOR_I2C_BUS.endTransmission();
|
||||
#else
|
||||
Wire.beginTransmission(addr);
|
||||
err = Wire.endTransmission();
|
||||
@@ -145,7 +145,7 @@ namespace BATTERY_Utils {
|
||||
}
|
||||
}
|
||||
|
||||
float checkInternalVoltage() {
|
||||
float checkInternalVoltage() {
|
||||
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
||||
if(POWER_Utils::isBatteryConnected()) {
|
||||
return POWER_Utils::getBatteryVoltage();
|
||||
@@ -153,7 +153,7 @@ namespace BATTERY_Utils {
|
||||
return 0.0;
|
||||
}
|
||||
#else
|
||||
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
POWER_Utils::adc_ctrl_ON();
|
||||
#endif
|
||||
@@ -177,7 +177,7 @@ namespace BATTERY_Utils {
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
delay(3);
|
||||
delay(3);
|
||||
}
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
@@ -241,7 +241,7 @@ namespace BATTERY_Utils {
|
||||
#else
|
||||
extVoltage = ((((sampleSum/100.0)* adcReadingTransformation) + readingCorrection) * voltageDividerTransformation) - multiplyCorrection;
|
||||
#endif
|
||||
|
||||
|
||||
return extVoltage; // raw voltage without mapping
|
||||
|
||||
// return mapVoltage(voltage, 5.05, 6.32, 4.5, 5.5); // mapped voltage
|
||||
|
||||
@@ -43,24 +43,29 @@ extern bool backupDigiMode;
|
||||
|
||||
namespace DIGI_Utils {
|
||||
|
||||
String buildPacket(const String& path, const String& packet, bool thirdParty, bool crossFreq) {
|
||||
String stationCallsign = (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign);
|
||||
if (!crossFreq) {
|
||||
String packetToRepeat = packet.substring(0, packet.indexOf(",") + 1);
|
||||
String tempPath = path;
|
||||
int digiMode = Config.digi.mode;
|
||||
String cleanPathAsterisks(String path) {
|
||||
String terms[] = {",WIDE1*", ",WIDE2*", "*"};
|
||||
for (String term : terms) {
|
||||
int index = path.indexOf(term);
|
||||
if (index != -1) path.remove(index, term.length()); // less memory than: tempPath.replace("*", "");
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
if (path.indexOf("WIDE1-1") != -1 && (digiMode == 2 || digiMode == 3)) {
|
||||
String buildPacket(const String& path, const String& packet, bool thirdParty, bool crossFreq) {
|
||||
String stationCallsign = (Config.tacticalCallsign == "" ? Config.callsign : Config.tacticalCallsign);
|
||||
String suffix = thirdParty ? ":}" : ":";
|
||||
int suffixIndex = packet.indexOf(suffix);
|
||||
String packetToRepeat;
|
||||
if (!crossFreq) {
|
||||
int digiMode = Config.digi.mode;
|
||||
String tempPath = path;
|
||||
|
||||
if (tempPath.indexOf("WIDE1-1") != -1 && (digiMode == 2 || digiMode == 3)) { // WIDE1-1 Digipeater
|
||||
if (tempPath.indexOf("*") != -1 ) return ""; // "*" shouldn't be in WIDE1-1 (only) type of packet
|
||||
tempPath.replace("WIDE1-1", stationCallsign + "*");
|
||||
} else if (path.indexOf("WIDE2-") != -1 && digiMode == 3) {
|
||||
int wide1AsteriskIndex = path.indexOf(",WIDE1*"); // less memory than: tempPath.replace(",WIDE1*", "");
|
||||
if (wide1AsteriskIndex != -1) {
|
||||
tempPath.remove(wide1AsteriskIndex, 7);
|
||||
}
|
||||
int asteriskIndex = path.indexOf("*"); // less memory than: tempPath.replace("*", "");
|
||||
if (asteriskIndex != -1) {
|
||||
tempPath.remove(asteriskIndex, 1);
|
||||
}
|
||||
} else if (tempPath.indexOf("WIDE2-") != -1 && digiMode == 3) { // WIDE2-n Digipeater
|
||||
tempPath = cleanPathAsterisks(path);
|
||||
if (path.indexOf("WIDE2-1") != -1) {
|
||||
tempPath.replace("WIDE2-1", stationCallsign + "*");
|
||||
} else if (path.indexOf("WIDE2-2") != -1) {
|
||||
@@ -69,32 +74,22 @@ namespace DIGI_Utils {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
packetToRepeat = packet.substring(0, packet.indexOf(",") + 1);
|
||||
packetToRepeat += tempPath;
|
||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(packet.indexOf(thirdParty ? ":}" : ":")));
|
||||
return packetToRepeat;
|
||||
} else { // CrossFreq Digipeater
|
||||
String suffix = thirdParty ? ":}" : ":";
|
||||
int suffixIndex = packet.indexOf(suffix);
|
||||
String packetToRepeat = packet.substring(0, suffixIndex);
|
||||
|
||||
String terms[] = {",WIDE1*", ",WIDE2*", "*"};
|
||||
for (String term : terms) {
|
||||
int index = packetToRepeat.indexOf(term);
|
||||
if (index != -1) {
|
||||
packetToRepeat.remove(index, term.length());
|
||||
}
|
||||
}
|
||||
packetToRepeat = cleanPathAsterisks(packet.substring(0, suffixIndex));
|
||||
if (packetToRepeat.indexOf(stationCallsign) != -1) return ""; // stationCallsign shouldn't be in path
|
||||
packetToRepeat += ",";
|
||||
packetToRepeat += stationCallsign;
|
||||
packetToRepeat += "*";
|
||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(suffixIndex));
|
||||
return packetToRepeat;
|
||||
}
|
||||
packetToRepeat += APRS_IS_Utils::checkForStartingBytes(packet.substring(suffixIndex));
|
||||
return packetToRepeat;
|
||||
}
|
||||
|
||||
String generateDigipeatedPacket(const String& packet, bool thirdParty){
|
||||
String temp;
|
||||
if (thirdParty) { // only header is used
|
||||
if (thirdParty) { // only header is used
|
||||
const String& header = packet.substring(0, packet.indexOf(":}"));
|
||||
temp = header.substring(header.indexOf(">") + 1);
|
||||
} else {
|
||||
@@ -104,7 +99,7 @@ namespace DIGI_Utils {
|
||||
int digiMode = Config.digi.mode;
|
||||
bool crossFreq = abs(Config.loramodule.txFreq - Config.loramodule.rxFreq) >= 125000; // CrossFreq Digi
|
||||
|
||||
if (commaIndex > 2) { // Packet has "path"
|
||||
if (commaIndex > 2) { // "path" found
|
||||
const String& path = temp.substring(commaIndex + 1);
|
||||
if (digiMode == 2 || backupDigiMode) {
|
||||
bool hasWide = path.indexOf("WIDE1-1") != -1;
|
||||
@@ -167,13 +162,13 @@ namespace DIGI_Utils {
|
||||
queryMessage = APRS_IS_Utils::processReceivedLoRaMessage(Sender, AddresseeAndMessage, thirdPartyPacket);
|
||||
}
|
||||
}
|
||||
if (!queryMessage) {
|
||||
String loraPacket = generateDigipeatedPacket(packet.substring(3), thirdPartyPacket);
|
||||
if (loraPacket != "") {
|
||||
STATION_Utils::addToOutputPacketBuffer(loraPacket);
|
||||
if (Config.digi.ecoMode != 1) displayToggle(true);
|
||||
lastScreenOn = millis();
|
||||
}
|
||||
if (queryMessage) return; // answer should not be repeated.
|
||||
|
||||
String loraPacket = generateDigipeatedPacket(packet.substring(3), thirdPartyPacket);
|
||||
if (loraPacket != "") {
|
||||
STATION_Utils::addToOutputPacketBuffer(loraPacket);
|
||||
if (Config.digi.ecoMode != 1) displayToggle(true);
|
||||
lastScreenOn = millis();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,40 +49,23 @@ extern bool stationCallsignIsValid;
|
||||
|
||||
namespace POWER_Utils {
|
||||
|
||||
#ifdef VEXT_CTRL
|
||||
void vext_ctrl_ON() {
|
||||
#if VEXT_CTRL_INVERTED == 1
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
||||
#else
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
||||
#endif
|
||||
}
|
||||
|
||||
void vext_ctrl_OFF() {
|
||||
#if VEXT_CTRL_INVERTED == 1
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? LOW : HIGH);
|
||||
#else
|
||||
digitalWrite(VEXT_CTRL, Config.digi.ecoMode == 1 ? HIGH : LOW);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ADC_CTRL
|
||||
#ifdef ADC_CTRL_PIN
|
||||
void adc_ctrl_ON() {
|
||||
#if ADC_CTRL_INVERTED == 1
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#else
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#endif
|
||||
digitalWrite(ADC_CTRL_PIN, ADC_CTRL_ON_STATE);
|
||||
}
|
||||
|
||||
void adc_ctrl_OFF() {
|
||||
#if ADC_CTRL_INVERTED == 1
|
||||
digitalWrite(ADC_CTRL, HIGH);
|
||||
#else
|
||||
digitalWrite(ADC_CTRL, LOW);
|
||||
#endif
|
||||
digitalWrite(ADC_CTRL_PIN, !ADC_CTRL_ON_STATE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VEXT_CTRL_PIN
|
||||
void vext_ctrl_ON() {
|
||||
digitalWrite(VEXT_CTRL_PIN, Config.digi.ecoMode == 1 ? !VEXT_CTRL_ON_STATE : VEXT_CTRL_ON_STATE);
|
||||
}
|
||||
|
||||
void vext_ctrl_OFF() {
|
||||
digitalWrite(VEXT_CTRL_PIN, Config.digi.ecoMode == 1 ? VEXT_CTRL_ON_STATE : !VEXT_CTRL_ON_STATE);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -313,12 +296,8 @@ namespace POWER_Utils {
|
||||
Wire.begin(OLED_SDA, OLED_SCL);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
Wire.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
#ifdef USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#ifdef SENSOR_I2C_BUS
|
||||
SENSOR_I2C_BUS.begin(BOARD_I2C_SDA, BOARD_I2C_SCL);
|
||||
#endif
|
||||
|
||||
delay(1000);
|
||||
|
||||
@@ -61,9 +61,9 @@ namespace WX_Utils {
|
||||
void getWxModuleAddres() {
|
||||
uint8_t err, addr;
|
||||
for(addr = 1; addr < 0x7F; addr++) {
|
||||
#if defined(HELTEC_V3) || defined(HELTEC_V3_2) || defined(HELTEC_WSL_V3) || defined(HELTEC_WSL_V3_DISPLAY)
|
||||
Wire1.beginTransmission(addr);
|
||||
err = Wire1.endTransmission();
|
||||
#ifdef SENSOR_I2C_BUS
|
||||
SENSOR_I2C_BUS.beginTransmission(addr);
|
||||
err = SENSOR_I2C_BUS.endTransmission();
|
||||
#else
|
||||
Wire.beginTransmission(addr);
|
||||
#ifdef LIGHTGATEWAY_PLUS_1_0
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_38
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire
|
||||
#define BOARD_I2C_SDA 11
|
||||
#define BOARD_I2C_SCL 12
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
#define INTERNAL_LED_PIN 48
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define OLED_SDA 5
|
||||
#define OLED_SCL 6
|
||||
#define SENSOR_I2C_BUS Wire
|
||||
#define BOARD_I2C_SDA 5
|
||||
#define BOARD_I2C_SCL 6
|
||||
|
||||
#endif
|
||||
@@ -48,7 +48,8 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 25
|
||||
#define BATTERY_PIN 37
|
||||
#define ADC_CTRL 21
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 21
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -48,7 +48,8 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 25
|
||||
#define BATTERY_PIN 37
|
||||
|
||||
#define ADC_CTRL 21
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 39
|
||||
#define BOARD_I2C_SCL 38
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 45
|
||||
#define BATTERY_PIN 7
|
||||
#define ADC_CTRL 46
|
||||
#define ADC_CTRL_INVERTED 0
|
||||
#define VEXT_CTRL 18
|
||||
#define VEXT_CTRL_INVERTED 0
|
||||
|
||||
#define ADC_CTRL_PIN 46
|
||||
#define ADC_CTRL_ON_STATE HIGH
|
||||
#define VEXT_CTRL_PIN 18
|
||||
#define VEXT_CTRL_ON_STATE HIGH
|
||||
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 0
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE HIGH
|
||||
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_INVERTED 0
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE HIGH
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_OLED_PINS
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
@@ -53,10 +53,11 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_INVERTED 0
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE HIGH
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
// GPS ??
|
||||
#define VGNS_CTRL 34 // cambiar nombre para prender GPS ?
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 37
|
||||
#define BOARD_I2C_SCL 36
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 18
|
||||
#define BATTERY_PIN 20
|
||||
#define ADC_CTRL 19
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
#define VEXT_CTRL 45
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 19
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 45
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 37
|
||||
#define BOARD_I2C_SCL 36
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 18
|
||||
#define BATTERY_PIN 20
|
||||
#define ADC_CTRL 19
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
#define VEXT_CTRL 45
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 19
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 45
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -50,9 +50,11 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define ADC_CTRL 37
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
@@ -33,16 +33,17 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE1_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire1
|
||||
#define BOARD_I2C_SDA 41
|
||||
#define BOARD_I2C_SCL 42
|
||||
|
||||
@@ -44,9 +44,10 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 35
|
||||
#define BATTERY_PIN 1
|
||||
#define ADC_CTRL 37
|
||||
#define ADC_CTRL_INVERTED 1
|
||||
#define VEXT_CTRL 36
|
||||
#define VEXT_CTRL_INVERTED 1
|
||||
|
||||
#define ADC_CTRL_PIN 37
|
||||
#define ADC_CTRL_ON_STATE LOW
|
||||
#define VEXT_CTRL_PIN 36
|
||||
#define VEXT_CTRL_ON_STATE LOW
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_14
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire
|
||||
#define BOARD_I2C_SDA 7
|
||||
#define BOARD_I2C_SCL 6
|
||||
|
||||
@@ -44,10 +44,11 @@
|
||||
// Aditional Config
|
||||
#define INTERNAL_LED_PIN 18
|
||||
#define BATTERY_PIN 1
|
||||
#define VEXT_CTRL 3 // To turn on GPS and TFT
|
||||
#define VEXT_CTRL_INVERTED 0
|
||||
#define ADC_CTRL 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
|
||||
#define ADC_CTRL_INVERTED 0
|
||||
|
||||
#define ADC_CTRL_PIN 2 // HELTEC Wireless Tracker ADC_CTRL = HIGH powers the voltage divider to read BatteryPin. Only on V05 = V1.1
|
||||
#define ADC_CTRL_ON_STATE HIGH
|
||||
#define VEXT_CTRL_PIN 3 // To turn on GPS and TFT
|
||||
#define VEXT_CTRL_ON_STATE HIGH
|
||||
|
||||
// GPS
|
||||
#define HAS_GPS
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_45
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define GPIO_WAKEUP_PIN GPIO_SEL_45
|
||||
|
||||
// I2C
|
||||
#define USE_WIRE_WITH_BOARD_I2C_PINS
|
||||
#define SENSOR_I2C_BUS Wire
|
||||
#define BOARD_I2C_SDA 18
|
||||
#define BOARD_I2C_SCL 8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user