mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-02 11:55:56 +00:00
Compare commits
5 Commits
2adc5407dd
...
da81a738a5
Author | SHA1 | Date | |
---|---|---|---|
![]() |
da81a738a5 | ||
![]() |
cc5d00e211 | ||
![]() |
1a8ab2aadc | ||
![]() |
608fdc6f52 | ||
![]() |
d7f62c77fc |
@ -871,12 +871,16 @@ void Power::readPowerStatus()
|
|||||||
LOG_DEBUG("Low voltage counter: %d/10", low_voltage_counter);
|
LOG_DEBUG("Low voltage counter: %d/10", low_voltage_counter);
|
||||||
if (low_voltage_counter > 10) {
|
if (low_voltage_counter > 10) {
|
||||||
#ifdef ARCH_NRF52
|
#ifdef ARCH_NRF52
|
||||||
// We can't trigger deep sleep on NRF52, it's freezing the board
|
// NRF52 doesn't wake from super deep sleep for some reason
|
||||||
LOG_DEBUG("Low voltage detected, but not trigger deep sleep");
|
// Only trigger it if Super Deep Sleep Seconds is UINT32_MAX
|
||||||
#else
|
if (config.power.sds_secs != UINT32_MAX) {
|
||||||
LOG_INFO("Low voltage detected, trigger deep sleep");
|
LOG_DEBUG("Low voltage detected, but not triggering deep sleep");
|
||||||
powerFSM.trigger(EVENT_LOW_BATTERY);
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
LOG_INFO("Low voltage detected, trigger deep sleep");
|
||||||
|
powerFSM.trigger(EVENT_LOW_BATTERY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
low_voltage_counter = 0;
|
low_voltage_counter = 0;
|
||||||
|
@ -205,6 +205,7 @@ size_t PhoneAPI::getFromRadio(uint8_t *buf)
|
|||||||
// app not to send locations on our behalf.
|
// app not to send locations on our behalf.
|
||||||
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag;
|
fromRadioScratch.which_payload_variant = meshtastic_FromRadio_my_info_tag;
|
||||||
strncpy(myNodeInfo.pio_env, optstr(APP_ENV), sizeof(myNodeInfo.pio_env));
|
strncpy(myNodeInfo.pio_env, optstr(APP_ENV), sizeof(myNodeInfo.pio_env));
|
||||||
|
myNodeInfo.nodedb_count = static_cast<uint16_t>(nodeDB->getNumMeshNodes());
|
||||||
fromRadioScratch.my_info = myNodeInfo;
|
fromRadioScratch.my_info = myNodeInfo;
|
||||||
state = STATE_SEND_UIDATA;
|
state = STATE_SEND_UIDATA;
|
||||||
|
|
||||||
|
@ -651,11 +651,12 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
|
|||||||
shouldIgnoreNonstandardPorts = true;
|
shouldIgnoreNonstandardPorts = true;
|
||||||
#endif
|
#endif
|
||||||
if (shouldIgnoreNonstandardPorts && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&
|
if (shouldIgnoreNonstandardPorts && p->which_payload_variant == meshtastic_MeshPacket_decoded_tag &&
|
||||||
IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_ATAK_FORWARDER, meshtastic_PortNum_ATAK_PLUGIN,
|
!IS_ONE_OF(p->decoded.portnum, meshtastic_PortNum_TEXT_MESSAGE_APP, meshtastic_PortNum_TEXT_MESSAGE_COMPRESSED_APP,
|
||||||
meshtastic_PortNum_PAXCOUNTER_APP, meshtastic_PortNum_IP_TUNNEL_APP, meshtastic_PortNum_AUDIO_APP,
|
meshtastic_PortNum_POSITION_APP, meshtastic_PortNum_NODEINFO_APP, meshtastic_PortNum_ROUTING_APP,
|
||||||
meshtastic_PortNum_PRIVATE_APP, meshtastic_PortNum_DETECTION_SENSOR_APP, meshtastic_PortNum_RANGE_TEST_APP,
|
meshtastic_PortNum_TELEMETRY_APP, meshtastic_PortNum_ADMIN_APP, meshtastic_PortNum_ALERT_APP,
|
||||||
meshtastic_PortNum_REMOTE_HARDWARE_APP)) {
|
meshtastic_PortNum_KEY_VERIFICATION_APP, meshtastic_PortNum_WAYPOINT_APP,
|
||||||
LOG_DEBUG("Ignore packet on blacklisted portnum for CORE_PORTNUMS_ONLY");
|
meshtastic_PortNum_STORE_FORWARD_APP, meshtastic_PortNum_TRACEROUTE_APP)) {
|
||||||
|
LOG_DEBUG("Ignore packet on non-standard portnum for CORE_PORTNUMS_ONLY");
|
||||||
cancelSending(p->from, p->id);
|
cancelSending(p->from, p->id);
|
||||||
skipHandle = true;
|
skipHandle = true;
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
#ifndef _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
#ifndef _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
||||||
#define _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
#define _VARIANT_GAT562_MESH_TRIAL_TRACKER_
|
||||||
|
|
||||||
#define GAT562_MESH_TRIAL_TRACKER
|
|
||||||
|
|
||||||
// led pin 2 (blue), see https://github.com/meshtastic/firmware/blob/master/src/mesh/NodeDB.cpp#L723
|
// led pin 2 (blue), see https://github.com/meshtastic/firmware/blob/master/src/mesh/NodeDB.cpp#L723
|
||||||
#define RAK4630
|
#define RAK4630
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user