mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 15:02:41 +00:00
Move airtime calculation to when Tx is complete (#8427)
Some checks failed
CI / setup (all) (push) Has been cancelled
CI / setup (check) (push) Has been cancelled
CI / version (push) Has been cancelled
CI / build-debian-src (push) Has been cancelled
CI / package-pio-deps-native-tft (push) Has been cancelled
CI / test-native (push) Has been cancelled
CI / docker (alpine, native, linux/amd64) (push) Has been cancelled
CI / docker (alpine, native, linux/arm64) (push) Has been cancelled
CI / docker (alpine, native-tft, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/arm/v7) (push) Has been cancelled
CI / docker (debian, native, linux/arm64) (push) Has been cancelled
CI / docker (debian, native-tft, linux/amd64) (push) Has been cancelled
CI / check (push) Has been cancelled
CI / build (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (rp2350) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (rp2350) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
Some checks failed
CI / setup (all) (push) Has been cancelled
CI / setup (check) (push) Has been cancelled
CI / version (push) Has been cancelled
CI / build-debian-src (push) Has been cancelled
CI / package-pio-deps-native-tft (push) Has been cancelled
CI / test-native (push) Has been cancelled
CI / docker (alpine, native, linux/amd64) (push) Has been cancelled
CI / docker (alpine, native, linux/arm64) (push) Has been cancelled
CI / docker (alpine, native-tft, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/arm/v7) (push) Has been cancelled
CI / docker (debian, native, linux/arm64) (push) Has been cancelled
CI / docker (debian, native-tft, linux/amd64) (push) Has been cancelled
CI / check (push) Has been cancelled
CI / build (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (rp2350) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (rp2350) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
This commit is contained in:
parent
15ee1c2819
commit
07d354fa02
@ -289,12 +289,7 @@ void RadioLibInterface::onNotify(uint32_t notification)
|
|||||||
// actual transmission as short as possible
|
// actual transmission as short as possible
|
||||||
txp = txQueue.dequeue();
|
txp = txQueue.dequeue();
|
||||||
assert(txp);
|
assert(txp);
|
||||||
bool sent = startSend(txp);
|
startSend(txp);
|
||||||
if (sent) {
|
|
||||||
// Packet has been sent, count it toward our TX airtime utilization.
|
|
||||||
uint32_t xmitMsec = getPacketTime(txp);
|
|
||||||
airTime->logAirtime(TX_LOG, xmitMsec);
|
|
||||||
}
|
|
||||||
LOG_DEBUG("%d packets remain in the TX queue", txQueue.getMaxLen() - txQueue.getFree());
|
LOG_DEBUG("%d packets remain in the TX queue", txQueue.getMaxLen() - txQueue.getFree());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -413,6 +408,10 @@ void RadioLibInterface::completeSending()
|
|||||||
sendingPacket = NULL;
|
sendingPacket = NULL;
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
|
// Packet has been sent, count it toward our TX airtime utilization.
|
||||||
|
uint32_t xmitMsec = getPacketTime(p);
|
||||||
|
airTime->logAirtime(TX_LOG, xmitMsec);
|
||||||
|
|
||||||
txGood++;
|
txGood++;
|
||||||
if (!isFromUs(p))
|
if (!isFromUs(p))
|
||||||
txRelay++;
|
txRelay++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user