SX1268 not fast enough with Radiolib
This commit is contained in:
parent
69e3906bc1
commit
2dced88317
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"beacons": [
|
||||
{
|
||||
"callsign": "CD2RXU-8",
|
||||
"callsign": "CD2RXU-6",
|
||||
"symbol": "[",
|
||||
"overlay": "/",
|
||||
"comment": "",
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"callsign": "CD2RXU-8",
|
||||
"callsign": "CD2RXU-6",
|
||||
"symbol": ">",
|
||||
"overlay": "/",
|
||||
"comment": "",
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"callsign": "CD2RXU-8",
|
||||
"callsign": "CD2RXU-6",
|
||||
"symbol": "j",
|
||||
"overlay": "/",
|
||||
"comment": "",
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void setup() {
|
|||
|
||||
WiFi.mode(WIFI_OFF);
|
||||
logger.log(logging::LoggerLevel::LOGGER_LEVEL_INFO, "Main", "WiFi controller stopped");
|
||||
//BLUETOOTH_Utils::setup();
|
||||
BLUETOOTH_Utils::setup();
|
||||
|
||||
userButton.attachClick(BUTTON_Utils::singlePress);
|
||||
userButton.attachLongPressStart(BUTTON_Utils::longPress);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "display.h"
|
||||
#include "lora_utils.h"
|
||||
#include "configuration.h"
|
||||
#include "TinyGPSPlus.h"
|
||||
#include <TinyGPS++.h>
|
||||
|
||||
extern Configuration Config;
|
||||
extern BluetoothSerial SerialBT;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "pins_config.h"
|
||||
#include "display.h"
|
||||
|
||||
//#define ssd1306 //uncomment this line when using SH1106 screen instead of SSD1306
|
||||
#define ssd1306 //uncomment this line when using SH1106 screen instead of SSD1306
|
||||
|
||||
#ifdef ssd1306
|
||||
#include <Adafruit_SSD1306.h>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
extern logging::Logger logger;
|
||||
extern Configuration Config;
|
||||
|
||||
#if defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
SX1268 radio = new Module(RADIO_CS_PIN, RADIO_DIO1_PIN, RADIO_RST_PIN, RADIO_BUSY_PIN);
|
||||
#endif
|
||||
|
||||
namespace LoRa_Utils {
|
||||
|
||||
|
|
@ -115,7 +117,6 @@ namespace LoRa_Utils {
|
|||
loraPacket += (char)inChar;
|
||||
}
|
||||
}
|
||||
return loraPacket;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
int state = radio.receive(loraPacket);
|
||||
|
|
@ -131,8 +132,8 @@ namespace LoRa_Utils {
|
|||
Serial.print(F("failed, code "));
|
||||
Serial.println(state);
|
||||
}
|
||||
return loraPacket;
|
||||
#endif
|
||||
return loraPacket;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -10,6 +10,10 @@ extern logging::Logger logger;
|
|||
|
||||
// cppcheck-suppress unusedFunction
|
||||
bool PowerManagement::begin(TwoWire &port) {
|
||||
#ifdef TTGO_T_Beam_V0_7
|
||||
bool result = true;
|
||||
return result;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
|
||||
if (!result) {
|
||||
|
|
@ -131,6 +135,9 @@ void PowerManagement::deactivateMeasurement() {
|
|||
|
||||
// cppcheck-suppress unusedFunction
|
||||
double PowerManagement::getBatteryVoltage() {
|
||||
#ifdef TTGO_T_Beam_V0_7
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
return axp.getBattVoltage() / 1000.0;
|
||||
#endif
|
||||
|
|
@ -141,6 +148,9 @@ double PowerManagement::getBatteryVoltage() {
|
|||
|
||||
// cppcheck-suppress unusedFunction
|
||||
double PowerManagement::getBatteryChargeDischargeCurrent() {
|
||||
#ifdef TTGO_T_Beam_V0_7
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
if (axp.isChargeing()) {
|
||||
return axp.getBattChargeCurrent();
|
||||
|
|
@ -153,6 +163,9 @@ double PowerManagement::getBatteryChargeDischargeCurrent() {
|
|||
}
|
||||
|
||||
bool PowerManagement::isBatteryConnected() {
|
||||
#ifdef TTGO_T_Beam_V0_7
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
return axp.isBatteryConnect();
|
||||
#endif
|
||||
|
|
@ -162,6 +175,9 @@ bool PowerManagement::isBatteryConnected() {
|
|||
}
|
||||
|
||||
bool PowerManagement::isChargeing() {
|
||||
#ifdef TTGO_T_Beam_V0_7
|
||||
return 0;
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
return axp.isChargeing();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#define POWER_UTILS_H_
|
||||
|
||||
#include <Arduino.h>
|
||||
#if defined(TTGO_T_Beam_V0_7)
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_LORA_V2_1) || defined(TTGO_T_Beam_V1_0_SX1268)
|
||||
#include <axp20x.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue