mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 02:09:57 +00:00
Cherry picks (#5166)
* fix compiler error std::find() * fix wifi/bt connection status * try-fix crash * added 1200baud reset --------- Co-authored-by: mverch67 <manuel.verch@gmx.de>
This commit is contained in:
parent
1334d07c6a
commit
82145e0661
@ -28,6 +28,8 @@
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 8388608,
|
||||
"use_1200bps_touch": true,
|
||||
"wait_for_upload_port": true,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifdef ARCH_PORTDUINO
|
||||
#include "PortduinoGlue.h"
|
||||
#include "meshUtils.h"
|
||||
#include <algorithm>
|
||||
#include <ctime>
|
||||
#endif
|
||||
|
||||
|
@ -900,7 +900,7 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
||||
#ifdef ARCH_PORTDUINO
|
||||
conn.wifi.status.is_connected = true;
|
||||
#else
|
||||
conn.wifi.status.is_connected = WiFi.status() != WL_CONNECTED;
|
||||
conn.wifi.status.is_connected = WiFi.status() == WL_CONNECTED;
|
||||
#endif
|
||||
strncpy(conn.wifi.ssid, config.network.wifi_ssid, 33);
|
||||
if (conn.wifi.status.is_connected) {
|
||||
@ -932,10 +932,14 @@ void AdminModule::handleGetDeviceConnectionStatus(const meshtastic_MeshPacket &r
|
||||
conn.has_bluetooth = true;
|
||||
conn.bluetooth.pin = config.bluetooth.fixed_pin;
|
||||
#ifdef ARCH_ESP32
|
||||
conn.bluetooth.is_connected = nimbleBluetooth->isConnected();
|
||||
conn.bluetooth.rssi = nimbleBluetooth->getRssi();
|
||||
if (config.bluetooth.enabled && nimbleBluetooth) {
|
||||
conn.bluetooth.is_connected = nimbleBluetooth->isConnected();
|
||||
conn.bluetooth.rssi = nimbleBluetooth->getRssi();
|
||||
}
|
||||
#elif defined(ARCH_NRF52)
|
||||
conn.bluetooth.is_connected = nrf52Bluetooth->isConnected();
|
||||
if (config.bluetooth.enabled && nrf52Bluetooth) {
|
||||
conn.bluetooth.is_connected = nrf52Bluetooth->isConnected();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
conn.has_serial = true; // No serial-less devices
|
||||
|
@ -184,7 +184,7 @@ int32_t ExternalNotificationModule::runOnce()
|
||||
}
|
||||
#endif
|
||||
// now let the PWM buzzer play
|
||||
if (moduleConfig.external_notification.use_pwm) {
|
||||
if (moduleConfig.external_notification.use_pwm && config.device.buzzer_gpio) {
|
||||
if (rtttl::isPlaying()) {
|
||||
rtttl::play();
|
||||
} else if (isNagging && (nagCycleCutoff >= millis())) {
|
||||
|
@ -32,7 +32,7 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency:
|
||||
public:
|
||||
ExternalNotificationModule();
|
||||
|
||||
uint32_t nagCycleCutoff = UINT32_MAX;
|
||||
uint32_t nagCycleCutoff = 1;
|
||||
|
||||
void setExternalOn(uint8_t index = 0);
|
||||
void setExternalOff(uint8_t index = 0);
|
||||
|
Loading…
Reference in New Issue
Block a user