Merge branch 'master' into neighborinfo

This commit is contained in:
Ben Meadors
2023-07-17 09:21:08 -05:00
committed by GitHub
106 changed files with 1515 additions and 322 deletions

View File

@@ -16,9 +16,7 @@
#include "unistd.h"
#endif
#if HAS_WIFI || HAS_ETHERNET
#include "mqtt/MQTT.h"
#endif
#define DEFAULT_REBOOT_SECONDS 7
@@ -572,7 +570,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
if (conn.wifi.status.is_connected) {
conn.wifi.rssi = WiFi.RSSI();
conn.wifi.status.ip_address = WiFi.localIP();
conn.wifi.status.is_mqtt_connected = mqtt && mqtt->connected();
conn.wifi.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly();
conn.wifi.status.is_syslog_connected = false; // FIXME wire this up
}
#endif
@@ -583,7 +581,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
if (Ethernet.linkStatus() == LinkON) {
conn.ethernet.status.is_connected = true;
conn.ethernet.status.ip_address = Ethernet.localIP();
conn.ethernet.status.is_mqtt_connected = mqtt && mqtt->connected();
conn.ethernet.status.is_mqtt_connected = mqtt && mqtt->isConnectedDirectly();
conn.ethernet.status.is_syslog_connected = false; // FIXME wire this up
} else {
conn.ethernet.status.is_connected = false;

View File

@@ -4,7 +4,7 @@
#include "FSCommon.h"
#include "MeshService.h"
#include "NodeDB.h"
#include "PowerFSM.h" // neede for button bypass
#include "PowerFSM.h" // needed for button bypass
#include "detect/ScanI2C.h"
#include "mesh/generated/meshtastic/cannedmessages.pb.h"
@@ -123,8 +123,8 @@ int CannedMessageModule::splitConfiguredMessages()
int CannedMessageModule::handleInputEvent(const InputEvent *event)
{
if ((strlen(moduleConfig.canned_message.allow_input_source) > 0) &&
(strcmp(moduleConfig.canned_message.allow_input_source, event->source) != 0) &&
(strcmp(moduleConfig.canned_message.allow_input_source, "_any") != 0)) {
(strcasecmp(moduleConfig.canned_message.allow_input_source, event->source) != 0) &&
(strcasecmp(moduleConfig.canned_message.allow_input_source, "_any") != 0)) {
// Event source is not accepted.
// Event only accepted if source matches the configured one, or
// the configured one is "_any" (or if there is no configured

View File

@@ -10,7 +10,7 @@
#include "main.h"
#ifdef RAK4630
#ifdef HAS_NCP5623
#include <graphics/RAKled.h>
NCP5623 rgb;
@@ -84,7 +84,7 @@ int32_t ExternalNotificationModule::runOnce()
millis()) {
getExternal(2) ? setExternalOff(2) : setExternalOn(2);
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
green = (green + 50) % 255;
red = abs(red - green) % 255;
@@ -127,7 +127,7 @@ void ExternalNotificationModule::setExternalOn(uint8_t index)
digitalWrite(output, (moduleConfig.external_notification.active ? true : false));
break;
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
rgb.setColor(red, green, blue);
}
@@ -153,7 +153,7 @@ void ExternalNotificationModule::setExternalOff(uint8_t index)
break;
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
red = 0;
green = 0;
@@ -235,7 +235,7 @@ ExternalNotificationModule::ExternalNotificationModule()
LOG_INFO("Using Pin %i in PWM mode\n", config.device.buzzer_gpio);
}
}
#ifdef RAK4630
#ifdef HAS_NCP5623
if (rgb_found.type == ScanI2C::NCP5623) {
rgb.begin();
rgb.setCurrent(10);

View File

@@ -54,7 +54,7 @@ int32_t RangeTestModule::runOnce()
if (moduleConfig.range_test.sender) {
LOG_INFO("Initializing Range Test Module -- Sender\n");
started = millis(); // make a note of when we started
return (5000); // Sending first message 5 seconds after initilization.
return (5000); // Sending first message 5 seconds after initialization.
} else {
LOG_INFO("Initializing Range Test Module -- Receiver\n");
return disable();
@@ -147,8 +147,8 @@ ProcessMessage RangeTestModuleRadio::handleReceived(const meshtastic_MeshPacket
LOG_DEBUG("mp.from %d\n", mp.from);
LOG_DEBUG("mp.rx_snr %f\n", mp.rx_snr);
LOG_DEBUG("mp.hop_limit %d\n", mp.hop_limit);
// LOG_DEBUG("mp.decoded.position.latitude_i %d\n", mp.decoded.position.latitude_i); // Depricated
// LOG_DEBUG("mp.decoded.position.longitude_i %d\n", mp.decoded.position.longitude_i); // Depricated
// LOG_DEBUG("mp.decoded.position.latitude_i %d\n", mp.decoded.position.latitude_i); // Deprecated
// LOG_DEBUG("mp.decoded.position.longitude_i %d\n", mp.decoded.position.longitude_i); // Deprecated
LOG_DEBUG("---- Node Information of Received Packet (mp.from):\n");
LOG_DEBUG("n->user.long_name %s\n", n->user.long_name);
LOG_DEBUG("n->user.short_name %s\n", n->user.short_name);
@@ -186,8 +186,8 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
LOG_DEBUG("mp.from %d\n", mp.from);
LOG_DEBUG("mp.rx_snr %f\n", mp.rx_snr);
LOG_DEBUG("mp.hop_limit %d\n", mp.hop_limit);
// LOG_DEBUG("mp.decoded.position.latitude_i %d\n", mp.decoded.position.latitude_i); // Depricated
// LOG_DEBUG("mp.decoded.position.longitude_i %d\n", mp.decoded.position.longitude_i); // Depricated
// LOG_DEBUG("mp.decoded.position.latitude_i %d\n", mp.decoded.position.latitude_i); // Deprecated
// LOG_DEBUG("mp.decoded.position.longitude_i %d\n", mp.decoded.position.longitude_i); // Deprecated
LOG_DEBUG("---- Node Information of Received Packet (mp.from):\n");
LOG_DEBUG("n->user.long_name %s\n", n->user.long_name);
LOG_DEBUG("n->user.short_name %s\n", n->user.short_name);

View File

@@ -33,11 +33,11 @@
to your device.
TODO (in this order):
* Define a verbose RX mode to report on mesh and packet infomration.
* Define a verbose RX mode to report on mesh and packet information.
- This won't happen any time soon.
KNOWN PROBLEMS
* Until the module is initilized by the startup sequence, the TX pin is in a floating
* Until the module is initialized by the startup sequence, the TX pin is in a floating
state. Device connected to that pin may see this as "noise".
* Will not work on Linux device targets.

View File

@@ -86,6 +86,10 @@ int32_t EnvironmentTelemetryModule::runOnce()
result = lps22hbSensor.runOnce();
if (sht31Sensor.hasSensor())
result = sht31Sensor.runOnce();
if (ina219Sensor.hasSensor() && !ina219Sensor.isInitialized())
result = ina219Sensor.runOnce();
if (ina260Sensor.hasSensor() && !ina260Sensor.isInitialized())
result = ina260Sensor.runOnce();
}
return result;
} else {

View File

@@ -62,7 +62,7 @@ void StoreForwardModule::populatePSRAM()
https://learn.upesy.com/en/programmation/psram.html#psram-tab
*/
LOG_DEBUG("*** Before PSRAM initilization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(),
LOG_DEBUG("*** Before PSRAM initialization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(),
memGet.getFreePsram(), memGet.getPsramSize());
this->packetHistoryTXQueue =
@@ -77,7 +77,7 @@ void StoreForwardModule::populatePSRAM()
this->packetHistory = static_cast<PacketHistoryStruct *>(ps_calloc(numberOfPackets, sizeof(PacketHistoryStruct)));
LOG_DEBUG("*** After PSRAM initilization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(),
LOG_DEBUG("*** After PSRAM initialization: heap %d/%d PSRAM %d/%d\n", memGet.getFreeHeap(), memGet.getHeapSize(),
memGet.getFreePsram(), memGet.getPsramSize());
LOG_DEBUG("*** numberOfPackets for packetHistory - %u\n", numberOfPackets);
}