mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* startSendRaw() now returns false if fail
This commit is contained in:
parent
dd16197eae
commit
b08436eba7
6 changed files with 27 additions and 13 deletions
|
|
@ -77,13 +77,16 @@ uint32_t RadioLibWrapper::getEstAirtimeFor(int len_bytes) {
|
|||
return _radio->getTimeOnAir(len_bytes) / 1000;
|
||||
}
|
||||
|
||||
void RadioLibWrapper::startSendRaw(const uint8_t* bytes, int len) {
|
||||
state = STATE_TX_WAIT;
|
||||
bool RadioLibWrapper::startSendRaw(const uint8_t* bytes, int len) {
|
||||
_board->onBeforeTransmit();
|
||||
int err = _radio->startTransmit((uint8_t *) bytes, len);
|
||||
if (err != RADIOLIB_ERR_NONE) {
|
||||
MESH_DEBUG_PRINTLN("RadioLibWrapper: error: startTransmit(%d)", err);
|
||||
if (err == RADIOLIB_ERR_NONE) {
|
||||
state = STATE_TX_WAIT;
|
||||
return true;
|
||||
}
|
||||
MESH_DEBUG_PRINTLN("RadioLibWrapper: error: startTransmit(%d)", err);
|
||||
idle(); // trigger another startRecv()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RadioLibWrapper::isSendComplete() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue