Merge pull request #1942 from meshtastic/develop

Develop to Master
This commit is contained in:
Ben Meadors 2022-11-13 15:42:41 -06:00 committed by GitHub
commit 2d7ff39ecc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 121 additions and 101 deletions

View File

@ -50,7 +50,7 @@ lib_deps =
https://github.com/meshtastic/esp8266-oled-ssd1306.git#53580644255b48ebb7a737343c6b4e71c7e11cf2 ; ESP8266_SSD1306 https://github.com/meshtastic/esp8266-oled-ssd1306.git#53580644255b48ebb7a737343c6b4e71c7e11cf2 ; ESP8266_SSD1306
mathertel/OneButton@^2.0.3 ; OneButton library for non-blocking button debounce mathertel/OneButton@^2.0.3 ; OneButton library for non-blocking button debounce
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159 https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159
https://github.com/meshtastic/TinyGPSPlus.git#2f0d0528d737000043e949f4c3bdfb623cf0b902 https://github.com/meshtastic/TinyGPSPlus.git#127ad674ef85f0201cb68a065879653ed94792c4
https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3 https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3
nanopb/Nanopb@^0.4.6 nanopb/Nanopb@^0.4.6
erriez/ErriezCRC32@^1.0.1 erriez/ErriezCRC32@^1.0.1
@ -69,6 +69,7 @@ lib_deps =
${env.lib_deps} ${env.lib_deps}
; Portduino is using meshtastic fork for now ; Portduino is using meshtastic fork for now
jgromes/RadioLib@5.4.1 jgromes/RadioLib@5.4.1
mprograms/QMC5883LCompass@^1.1.1
https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#52b5282639d08a8cbd4b748363089eed6102dc76 https://github.com/meshtastic/SparkFun_ATECCX08a_Arduino_Library.git#52b5282639d08a8cbd4b748363089eed6102dc76
build_flags = ${env.build_flags} -Os build_flags = ${env.build_flags} -Os

View File

@ -110,6 +110,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define INA_ADDR_ALTERNATE 0x41 #define INA_ADDR_ALTERNATE 0x41
#define QMC6310_ADDR 0x1C #define QMC6310_ADDR 0x1C
#define QMI8658_ADDR 0x6B #define QMI8658_ADDR 0x6B
#define QMC5883L_ADDR 0x1E
#define SHTC3_ADDR 0x70 #define SHTC3_ADDR 0x70
#define LPS22HB_ADDR 0x5C #define LPS22HB_ADDR 0x5C
#define LPS22HB_ADDR_ALT 0x5D #define LPS22HB_ADDR_ALT 0x5D

View File

@ -90,7 +90,7 @@ uint8_t oled_probe(byte addr)
return o_probe; return o_probe;
} }
void scanI2Cdevice(void) void scanI2Cdevice()
{ {
byte err, addr; byte err, addr;
uint16_t registerValue = 0x00; uint16_t registerValue = 0x00;
@ -189,24 +189,30 @@ void scanI2Cdevice(void)
} }
if (addr == MCP9808_ADDR) { if (addr == MCP9808_ADDR) {
nodeTelemetrySensorsMap[TelemetrySensorType_MCP9808] = addr; nodeTelemetrySensorsMap[TelemetrySensorType_MCP9808] = addr;
DEBUG_MSG("MCP9808 sensor found at address 0x%x\n", (uint8_t)addr); DEBUG_MSG("MCP9808 sensor found\n");
}
if (addr == QMC6310_ADDR) {
DEBUG_MSG("QMC6310 3-Axis magnetic sensor found at address 0x%x\n", (uint8_t)addr);
nodeTelemetrySensorsMap[TelemetrySensorType_QMC6310] = addr;
}
if (addr == QMI8658_ADDR) {
DEBUG_MSG("QMI8658 6-Axis inertial measurement sensor found at address 0x%x\n", (uint8_t)addr);
nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658] = addr;
} }
if (addr == SHTC3_ADDR) { if (addr == SHTC3_ADDR) {
DEBUG_MSG("SHTC3 sensor found at address 0x%x\n", (uint8_t)addr); DEBUG_MSG("SHTC3 sensor found\n");
nodeTelemetrySensorsMap[TelemetrySensorType_SHTC3] = addr; nodeTelemetrySensorsMap[TelemetrySensorType_SHTC3] = addr;
} }
if (addr == LPS22HB_ADDR || addr == LPS22HB_ADDR_ALT) { if (addr == LPS22HB_ADDR || addr == LPS22HB_ADDR_ALT) {
DEBUG_MSG("LPS22HB sensor found at address 0x%x\n", (uint8_t)addr); DEBUG_MSG("LPS22HB sensor found\n");
nodeTelemetrySensorsMap[TelemetrySensorType_LPS22] = addr; nodeTelemetrySensorsMap[TelemetrySensorType_LPS22] = addr;
} }
// High rate sensors, will be processed internally
if (addr == QMC6310_ADDR) {
DEBUG_MSG("QMC6310 Highrate 3-Axis magnetic sensor found\n");
nodeTelemetrySensorsMap[TelemetrySensorType_QMC6310] = addr;
}
if (addr == QMI8658_ADDR) {
DEBUG_MSG("QMI8658 Highrate 6-Axis inertial measurement sensor found\n");
nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658] = addr;
}
if (addr == QMC5883L_ADDR) {
DEBUG_MSG("QMC5883L Highrate 3-Axis magnetic sensor found\n");
nodeTelemetrySensorsMap[TelemetrySensorType_QMC5883L] = addr;
}
} else if (err == 4) { } else if (err == 4) {
DEBUG_MSG("Unknow error at address 0x%x\n", addr); DEBUG_MSG("Unknow error at address 0x%x\n", addr);
} }
@ -218,5 +224,5 @@ void scanI2Cdevice(void)
DEBUG_MSG("%i I2C devices found\n",nDevices); DEBUG_MSG("%i I2C devices found\n",nDevices);
} }
#else #else
void scanI2Cdevice(void) {} void scanI2Cdevice() {}
#endif #endif

View File

@ -1,4 +1,5 @@
#include "NMEAWPL.h" #include "NMEAWPL.h"
#include "GeoCoord.h"
/* ------------------------------------------- /* -------------------------------------------
* 1 2 3 4 5 6 * 1 2 3 4 5 6
@ -17,7 +18,15 @@
uint32_t printWPL(char *buf, const Position &pos, const char *name) uint32_t printWPL(char *buf, const Position &pos, const char *name)
{ {
uint32_t len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name); GeoCoord geoCoord(pos.latitude_i,pos.longitude_i,pos.altitude);
uint32_t len = sprintf(buf, "$GNWPL,%02d%07.4f,%c,%03d%07.4f,%c,%s",
geoCoord.getDMSLatDeg(),
(abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6,
geoCoord.getDMSLatCP(),
geoCoord.getDMSLonDeg(),
(abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6,
geoCoord.getDMSLonCP(),
name);
uint32_t chk = 0; uint32_t chk = 0;
for (uint32_t i = 1; i < len; i++) { for (uint32_t i = 1; i < len; i++) {
chk ^= buf[i]; chk ^= buf[i];
@ -52,15 +61,20 @@ uint32_t printWPL(char *buf, const Position &pos, const char *name)
uint32_t printGGA(char *buf, const Position &pos) uint32_t printGGA(char *buf, const Position &pos)
{ {
uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d", GeoCoord geoCoord(pos.latitude_i,pos.longitude_i,pos.altitude);
uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%02d%07.4f,%c,%03d%07.4f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d",
pos.time / 1000, pos.time / 1000,
pos.time % 1000, pos.time % 1000,
pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', geoCoord.getDMSLatDeg(),
pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', (abs(geoCoord.getLatitude()) - geoCoord.getDMSLatDeg() * 1e+7) * 6e-6,
geoCoord.getDMSLatCP(),
geoCoord.getDMSLonDeg(),
(abs(geoCoord.getLongitude()) - geoCoord.getDMSLonDeg() * 1e+7) * 6e-6,
geoCoord.getDMSLonCP(),
pos.fix_type, pos.fix_type,
pos.sats_in_view, pos.sats_in_view,
pos.HDOP, pos.HDOP,
pos.altitude, geoCoord.getAltitude(),
'M', 'M',
pos.altitude_geoidal_separation, pos.altitude_geoidal_separation,
'M', 'M',

View File

@ -538,9 +538,10 @@ static void drawGPScoordinates(OLEDDisplay *display, int16_t x, int16_t y, const
display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine); display->drawString(x + (SCREEN_WIDTH - (display->getStringWidth(displayLine))) / 2, y, displayLine);
} else { } else {
geoCoord.updateCoords(int32_t(gps->getLatitude()), int32_t(gps->getLongitude()), int32_t(gps->getAltitude()));
if (gpsFormat != Config_DisplayConfig_GpsCoordinateFormat_DMS) { if (gpsFormat != Config_DisplayConfig_GpsCoordinateFormat_DMS) {
char coordinateLine[22]; char coordinateLine[22];
geoCoord.updateCoords(int32_t(gps->getLatitude()), int32_t(gps->getLongitude()), int32_t(gps->getAltitude()));
if (gpsFormat == Config_DisplayConfig_GpsCoordinateFormat_DEC) { // Decimal Degrees if (gpsFormat == Config_DisplayConfig_GpsCoordinateFormat_DEC) { // Decimal Degrees
sprintf(coordinateLine, "%f %f", geoCoord.getLatitude() * 1e-7, geoCoord.getLongitude() * 1e-7); sprintf(coordinateLine, "%f %f", geoCoord.getLatitude() * 1e-7, geoCoord.getLongitude() * 1e-7);
} else if (gpsFormat == Config_DisplayConfig_GpsCoordinateFormat_UTM) { // Universal Transverse Mercator } else if (gpsFormat == Config_DisplayConfig_GpsCoordinateFormat_UTM) { // Universal Transverse Mercator

View File

@ -87,8 +87,6 @@ uint8_t kb_model;
// The I2C address of the RTC Module (if found) // The I2C address of the RTC Module (if found)
uint8_t rtc_found; uint8_t rtc_found;
bool rIf_wide_lora = false;
// Keystore Chips // Keystore Chips
uint8_t keystore_found; uint8_t keystore_found;
#ifndef ARCH_PORTDUINO #ifndef ARCH_PORTDUINO
@ -102,7 +100,7 @@ uint32_t serialSinceMsec;
bool pmu_found; bool pmu_found;
// Array map of sensor types (as array index) and i2c address as value we'll find in the i2c scan // Array map of sensor types (as array index) and i2c address as value we'll find in the i2c scan
uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; uint8_t nodeTelemetrySensorsMap[_TelemetrySensorType_MAX + 1] = { 0 }; // one is enough, missing elements will be initialized to 0 anyway.
Router *router = NULL; // Users of router don't care what sort of subclass implements that API Router *router = NULL; // Users of router don't care what sort of subclass implements that API
@ -306,13 +304,6 @@ void setup()
playStartMelody(); playStartMelody();
/*
* Repeat the scanning for I2C devices after power initialization or look for 'latecomers'.
* Boards with an PMU need to be powered on to correctly scan to the device address, such as t-beam-s3-core
*/
// scanI2Cdevice();
// fixed screen override? // fixed screen override?
if (config.display.oled != Config_DisplayConfig_OledType_OLED_AUTO) if (config.display.oled != Config_DisplayConfig_OledType_OLED_AUTO)
screen_model = config.display.oled; screen_model = config.display.oled;
@ -404,7 +395,6 @@ void setup()
rIf = NULL; rIf = NULL;
} else { } else {
DEBUG_MSG("SX1280 Radio init succeeded, using SX1280 radio\n"); DEBUG_MSG("SX1280 Radio init succeeded, using SX1280 radio\n");
rIf_wide_lora = true;
} }
} }
#endif #endif

View File

@ -17,7 +17,6 @@ extern uint8_t kb_model;
extern uint8_t rtc_found; extern uint8_t rtc_found;
extern uint8_t keystore_found; extern uint8_t keystore_found;
extern bool rIf_wide_lora;
extern bool eink_found; extern bool eink_found;
extern bool pmu_found; extern bool pmu_found;
extern bool isCharging; extern bool isCharging;
@ -27,7 +26,7 @@ extern bool isUSBPowered;
extern ATECCX08A atecc; extern ATECCX08A atecc;
#endif #endif
extern uint8_t nodeTelemetrySensorsMap[TelemetrySensorType_QMI8658+1]; extern uint8_t nodeTelemetrySensorsMap[_TelemetrySensorType_MAX + 1];
extern int TCPPort; // set by Portduino extern int TCPPort; // set by Portduino

View File

@ -365,37 +365,37 @@ void RadioInterface::applyModemConfig()
switch (loraConfig.modem_preset) { switch (loraConfig.modem_preset) {
case Config_LoRaConfig_ModemPreset_SHORT_FAST: case Config_LoRaConfig_ModemPreset_SHORT_FAST:
bw = (myRegion->wideLora && rIf_wide_lora) ? 800 : 250; bw = (myRegion->wideLora) ? 812.5 : 250;
cr = 8; cr = 8;
sf = 7; sf = 7;
break; break;
case Config_LoRaConfig_ModemPreset_SHORT_SLOW: case Config_LoRaConfig_ModemPreset_SHORT_SLOW:
bw = (myRegion->wideLora && rIf_wide_lora) ? 800 : 250; bw = (myRegion->wideLora) ? 812.5 : 250;
cr = 8; cr = 8;
sf = 8; sf = 8;
break; break;
case Config_LoRaConfig_ModemPreset_MEDIUM_FAST: case Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
bw = (myRegion->wideLora && rIf_wide_lora) ? 800 : 250; bw = (myRegion->wideLora) ? 812.5 : 250;
cr = 8; cr = 8;
sf = 9; sf = 9;
break; break;
case Config_LoRaConfig_ModemPreset_MEDIUM_SLOW: case Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
bw = (myRegion->wideLora && rIf_wide_lora) ? 800 : 250; bw = (myRegion->wideLora) ? 812.5 : 250;
cr = 8; cr = 8;
sf = 10; sf = 10;
break; break;
case Config_LoRaConfig_ModemPreset_LONG_FAST: case Config_LoRaConfig_ModemPreset_LONG_FAST:
bw = (myRegion->wideLora && rIf_wide_lora) ? 800 : 250; bw = (myRegion->wideLora) ? 812.5 : 250;
cr = 8; cr = 8;
sf = 11; sf = 11;
break; break;
case Config_LoRaConfig_ModemPreset_LONG_SLOW: case Config_LoRaConfig_ModemPreset_LONG_SLOW:
bw = (myRegion->wideLora && rIf_wide_lora) ? 400 : 125; bw = (myRegion->wideLora) ? 406.25 : 125;
cr = 8; cr = 8;
sf = 12; sf = 12;
break; break;
case Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW: case Config_LoRaConfig_ModemPreset_VERY_LONG_SLOW:
bw = (myRegion->wideLora && rIf_wide_lora) ? 200 : 31.25; bw = (myRegion->wideLora) ? 203.125 : 31.25;
cr = 8; cr = 8;
sf = 12; sf = 12;
break; break;
@ -411,6 +411,14 @@ void RadioInterface::applyModemConfig()
bw = 31.25; bw = 31.25;
if (bw == 62) // Fix for 62.5Khz bandwidth if (bw == 62) // Fix for 62.5Khz bandwidth
bw = 62.5; bw = 62.5;
if (bw == 200)
bw = 203.125;
if (bw == 400)
bw = 406.25;
if (bw == 800)
bw = 812.5;
if (bw == 1600)
bw = 1625.0;
} }
power = loraConfig.tx_power; power = loraConfig.tx_power;
@ -443,7 +451,7 @@ void RadioInterface::applyModemConfig()
DEBUG_MSG("Set radio: region=%s, name=%s, config=%u, ch=%d, power=%d\n", myRegion->name, channelName, loraConfig.modem_preset, channel_num, power); DEBUG_MSG("Set radio: region=%s, name=%s, config=%u, ch=%d, power=%d\n", myRegion->name, channelName, loraConfig.modem_preset, channel_num, power);
DEBUG_MSG("Radio myRegion->freqStart / myRegion->freqEnd: %f -> %f (%f mhz)\n", myRegion->freqStart, myRegion->freqEnd, myRegion->freqEnd - myRegion->freqStart); DEBUG_MSG("Radio myRegion->freqStart / myRegion->freqEnd: %f -> %f (%f mhz)\n", myRegion->freqStart, myRegion->freqEnd, myRegion->freqEnd - myRegion->freqStart);
DEBUG_MSG("Radio myRegion->numChannels: %d\n", numChannels); DEBUG_MSG("Radio myRegion->numChannels: %d x %.3fkHz\n", numChannels, bw);
DEBUG_MSG("Radio channel_num: %d\n", channel_num); DEBUG_MSG("Radio channel_num: %d\n", channel_num);
DEBUG_MSG("Radio frequency: %f\n", getFreq()); DEBUG_MSG("Radio frequency: %f\n", getFreq());
DEBUG_MSG("Slot time: %u msec\n", slotTimeMsec); DEBUG_MSG("Slot time: %u msec\n", slotTimeMsec);

View File

@ -6,7 +6,7 @@
// Particular boards might define a different max power based on what their hardware can do // Particular boards might define a different max power based on what their hardware can do
#ifndef SX128X_MAX_POWER #ifndef SX128X_MAX_POWER
#define SX128X_MAX_POWER 22 #define SX128X_MAX_POWER 13
#endif #endif
template<typename T> template<typename T>
@ -61,7 +61,7 @@ bool SX128xInterface<T>::init()
#endif #endif
if (res == RADIOLIB_ERR_NONE) if (res == RADIOLIB_ERR_NONE)
res = lora.setCRC(RADIOLIB_SX128X_LORA_CRC_ON); res = lora.setCRC(2);
if (res == RADIOLIB_ERR_NONE) if (res == RADIOLIB_ERR_NONE)
startReceive(); // start receiving startReceive(); // start receiving

View File

@ -21,8 +21,9 @@
1) Enable the module by setting audio.codec2_enabled to 1. 1) Enable the module by setting audio.codec2_enabled to 1.
2) Set the pins (audio.mic_pin / audio.amp_pin) for your preferred microphone and amplifier GPIO pins. 2) Set the pins (audio.mic_pin / audio.amp_pin) for your preferred microphone and amplifier GPIO pins.
On tbeam, recommend to use: On tbeam, recommend to use:
audio.mic_chan 7 (GPIO 35) audio.mic_chan 6 (GPIO 34)
audio.amp_pin 25 (GPIO 25) audio.amp_pin 14
audio.ptt_pin 39
3) Set audio.timeout to the amount of time to wait before we consider 3) Set audio.timeout to the amount of time to wait before we consider
your voice stream as "done". your voice stream as "done".
4) Set audio.bitrate to the desired codec2 rate (CODEC2_3200, CODEC2_2400, CODEC2_1600, CODEC2_1400, CODEC2_1300, CODEC2_1200, CODEC2_700, CODEC2_700B) 4) Set audio.bitrate to the desired codec2 rate (CODEC2_3200, CODEC2_2400, CODEC2_1600, CODEC2_1400, CODEC2_1300, CODEC2_1200, CODEC2_700, CODEC2_700B)
@ -33,8 +34,8 @@
* Will not work on NRF and the Linux device targets. * Will not work on NRF and the Linux device targets.
*/ */
#define AMIC 7 #define AMIC 6
#define AAMP 25 #define AAMP 14
#define PTT_PIN 39 #define PTT_PIN 39
#define AUDIO_MODULE_RX_BUFFER 128 #define AUDIO_MODULE_RX_BUFFER 128

View File

@ -12,7 +12,7 @@
//#include <assert.h> //#include <assert.h>
/* /*
As a sender, I can send packets every n-seonds. These packets include an incramented PacketID. As a sender, I can send packets every n seconds. These packets include an incremented PacketID.
As a receiver, I can receive packets from multiple senders. These packets can be saved to the Filesystem. As a receiver, I can receive packets from multiple senders. These packets can be saved to the Filesystem.
*/ */
@ -41,7 +41,7 @@ int32_t RangeTestModule::runOnce()
// moduleConfig.range_test.save = 1; // moduleConfig.range_test.save = 1;
// Fixed position is useful when testing indoors. // Fixed position is useful when testing indoors.
// radioConfig.preferences.fixed_position = 1; // config.position.fixed_position = 1;
uint32_t senderHeartbeat = moduleConfig.range_test.sender * 1000; uint32_t senderHeartbeat = moduleConfig.range_test.sender * 1000;
@ -57,7 +57,8 @@ int32_t RangeTestModule::runOnce()
return (5000); // Sending first message 5 seconds after initilization. return (5000); // Sending first message 5 seconds after initilization.
} else { } else {
DEBUG_MSG("Initializing Range Test Module -- Receiver\n"); DEBUG_MSG("Initializing Range Test Module -- Receiver\n");
return (500); return (INT32_MAX);
// This thread does not need to run as a receiver
} }
} else { } else {
@ -70,8 +71,7 @@ int32_t RangeTestModule::runOnce()
DEBUG_MSG("gpsStatus->getLongitude() %d\n", gpsStatus->getLongitude()); DEBUG_MSG("gpsStatus->getLongitude() %d\n", gpsStatus->getLongitude());
DEBUG_MSG("gpsStatus->getHasLock() %d\n", gpsStatus->getHasLock()); DEBUG_MSG("gpsStatus->getHasLock() %d\n", gpsStatus->getHasLock());
DEBUG_MSG("gpsStatus->getDOP() %d\n", gpsStatus->getDOP()); DEBUG_MSG("gpsStatus->getDOP() %d\n", gpsStatus->getDOP());
DEBUG_MSG("gpsStatus->getHasLock() %d\n", gpsStatus->getHasLock()); DEBUG_MSG("fixed_position() %d\n", config.position.fixed_position);
DEBUG_MSG("pref.fixed_position() %d\n", config.position.fixed_position);
// Only send packets if the channel is less than 25% utilized. // Only send packets if the channel is less than 25% utilized.
if (airTime->channelUtilizationPercent() < 25) { if (airTime->channelUtilizationPercent() < 25) {
@ -82,11 +82,11 @@ int32_t RangeTestModule::runOnce()
return (senderHeartbeat); return (senderHeartbeat);
} else { } else {
// Otherwise, we're a receiver. return (INT32_MAX);
// This thread does not need to run as a receiver
return (500);
} }
// TBD
} }
} else { } else {
@ -221,6 +221,8 @@ bool RangeTestModuleRadio::appendFile(const MeshPacket &mp)
return 0; return 0;
} }
FSCom.mkdir("/static");
// If the file doesn't exist, write the header. // If the file doesn't exist, write the header.
if (!FSCom.exists("/static/rangetest.csv")) { if (!FSCom.exists("/static/rangetest.csv")) {
//--------- Write to file //--------- Write to file

View File

@ -43,7 +43,7 @@ void setBluetoothEnable(bool on) {
static uint32_t calibrate_one(rtc_cal_sel_t cal_clk, const char *name) static uint32_t calibrate_one(rtc_cal_sel_t cal_clk, const char *name)
{ {
const uint32_t cal_count = 1000; const uint32_t cal_count = 1000;
const float factor = (1 << 19) * 1000.0f; // const float factor = (1 << 19) * 1000.0f; unused var?
uint32_t cali_val; uint32_t cali_val;
for (int i = 0; i < 5; ++i) { for (int i = 0; i < 5; ++i) {
cali_val = rtc_clk_cal(cal_clk, cal_count); cali_val = rtc_clk_cal(cal_clk, cal_count);

View File

@ -8,7 +8,7 @@ lib_deps =
${nrf52840_base.lib_deps} ${nrf52840_base.lib_deps}
${networking_base.lib_deps} ${networking_base.lib_deps}
melopero/Melopero RV3028@^1.1.0 melopero/Melopero RV3028@^1.1.0
https://github.com/meshtastic/RAK13800-W5100S.git#b680706eb8006cd62c919ac74c8af1950eb82c81 https://github.com/RAKWireless/RAK13800-W5100S.git#1.0.2
debug_tool = jlink debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm) ; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink ;upload_protocol = jlink

View File

@ -12,20 +12,17 @@
#define I2C_SDA 21 // I2C pins for this board #define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22 #define I2C_SCL 22
// #define RESET_OLED 16 // If defined, this pin will be used to reset the display controller. Crashes on newer ESP-IDF and not needed per schematic
#define VEXT_ENABLE 21 // active low, powers the oled display and the lora antenna boost
#define LED_PIN 25 // If defined we will blink this LED #define LED_PIN 25 // If defined we will blink this LED
#define BUTTON_PIN 12 // If defined, this will be used for user button presses, #define BUTTON_PIN 12 // If defined, this will be used for user button presses,
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP
#define USE_SX1280 #define USE_SX1280
#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 23 #define LORA_RESET 23
#define SX128X_CS 18 // FIXME - we really should define LORA_CS instead #define SX128X_CS 18 // FIXME - we really should define LORA_CS instead
#define SX128X_DIO1 33 #define SX128X_DIO1 26
#define SX128X_DIO2 33
#define SX128X_BUSY 32 #define SX128X_BUSY 32
#define SX128X_RESET LORA_RESET #define SX128X_RESET LORA_RESET
#define SX128X_E22 // Not really an E22 but TTGO seems to be trying to clone that #define SX128X_E22 // Not really an E22 but TTGO seems to be trying to clone that