mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-18 11:13:29 +00:00
Merge branch 'master' into tft-gui-work
This commit is contained in:
commit
4ad08223c7
@ -167,8 +167,6 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key)
|
|||||||
auto old = findPendingPacket(key);
|
auto old = findPendingPacket(key);
|
||||||
if (old) {
|
if (old) {
|
||||||
auto p = old->packet;
|
auto p = old->packet;
|
||||||
auto numErased = pending.erase(key);
|
|
||||||
assert(numErased == 1);
|
|
||||||
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
|
/* Only when we already transmitted a packet via LoRa, we will cancel the packet in the Tx queue
|
||||||
to avoid canceling a transmission if it was ACKed super fast via MQTT */
|
to avoid canceling a transmission if it was ACKed super fast via MQTT */
|
||||||
if (old->numRetransmissions < NUM_RETRANSMISSIONS - 1) {
|
if (old->numRetransmissions < NUM_RETRANSMISSIONS - 1) {
|
||||||
@ -177,6 +175,8 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key)
|
|||||||
// now free the pooled copy for retransmission too
|
// now free the pooled copy for retransmission too
|
||||||
packetPool.release(p);
|
packetPool.release(p);
|
||||||
}
|
}
|
||||||
|
auto numErased = pending.erase(key);
|
||||||
|
assert(numErased == 1);
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
@ -114,7 +114,7 @@ void RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies)
|
|||||||
p->to = dest;
|
p->to = dest;
|
||||||
p->decoded.want_response = wantReplies;
|
p->decoded.want_response = wantReplies;
|
||||||
p->hop_limit = 0;
|
p->hop_limit = 0;
|
||||||
p->want_ack = true;
|
p->want_ack = false;
|
||||||
|
|
||||||
packetSequence++;
|
packetSequence++;
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ int32_t SHT31Sensor::runOnce()
|
|||||||
if (!hasSensor()) {
|
if (!hasSensor()) {
|
||||||
return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;
|
return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS;
|
||||||
}
|
}
|
||||||
|
sht31 = Adafruit_SHT31(nodeTelemetrySensorsMap[sensorType].second);
|
||||||
status = sht31.begin(nodeTelemetrySensorsMap[sensorType].first);
|
status = sht31.begin(nodeTelemetrySensorsMap[sensorType].first);
|
||||||
return initI2CSensor();
|
return initI2CSensor();
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
class SHT31Sensor : public TelemetrySensor
|
class SHT31Sensor : public TelemetrySensor
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
Adafruit_SHT31 sht31 = Adafruit_SHT31(nodeTelemetrySensorsMap[sensorType].second);
|
Adafruit_SHT31 sht31;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void setup() override;
|
virtual void setup() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user