mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-17 18:53:30 +00:00
Merge branch 'master' into node-db
This commit is contained in:
commit
da12360105
10
src/main.cpp
10
src/main.cpp
@ -233,6 +233,8 @@ void setup()
|
|||||||
delay(1);
|
delay(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// We need to scan here to decide if we have a screen for nodeDB.init()
|
||||||
|
scanI2Cdevice();
|
||||||
#ifdef RAK4630
|
#ifdef RAK4630
|
||||||
// scanEInkDevice();
|
// scanEInkDevice();
|
||||||
#endif
|
#endif
|
||||||
@ -273,10 +275,12 @@ void setup()
|
|||||||
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
|
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Move the scanning I2C device to the back of power initialization.
|
* Repeat the scanning for I2C devices after power initialization.
|
||||||
* Some boards need to be powered on to correctly scan to the device address, such as t-beam-s3-core
|
* Boards with an PMU need to be powered on to correctly scan to the device address, such as t-beam-s3-core
|
||||||
*/
|
*/
|
||||||
scanI2Cdevice();
|
if ((HW_VENDOR == HardwareModel_LILYGO_TBEAM_S3_CORE) || (HW_VENDOR == HardwareModel_TBEAM)) {
|
||||||
|
scanI2Cdevice();
|
||||||
|
}
|
||||||
|
|
||||||
// Init our SPI controller (must be before screen and lora)
|
// Init our SPI controller (must be before screen and lora)
|
||||||
initSPI();
|
initSPI();
|
||||||
|
@ -171,6 +171,8 @@ void SimRadio::onNotify(uint32_t notification)
|
|||||||
// Packet has been sent, count it toward our TX airtime utilization.
|
// Packet has been sent, count it toward our TX airtime utilization.
|
||||||
uint32_t xmitMsec = getPacketTime(txp);
|
uint32_t xmitMsec = getPacketTime(txp);
|
||||||
airTime->logAirtime(TX_LOG, xmitMsec);
|
airTime->logAirtime(TX_LOG, xmitMsec);
|
||||||
|
|
||||||
|
delay(xmitMsec); // Model the time it is busy sending
|
||||||
completeSending();
|
completeSending();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,6 +209,9 @@ void SimRadio::startSend(MeshPacket * txp)
|
|||||||
|
|
||||||
void SimRadio::startReceive(MeshPacket *p) {
|
void SimRadio::startReceive(MeshPacket *p) {
|
||||||
isReceiving = true;
|
isReceiving = true;
|
||||||
|
size_t length = getPacketLength(p);
|
||||||
|
uint32_t xmitMsec = getPacketTime(length);
|
||||||
|
delay(xmitMsec); // Model the time it is busy receiving
|
||||||
handleReceiveInterrupt(p);
|
handleReceiveInterrupt(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user