-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Hello!
Very cool library, thank you!
I want to send data in Fixed mode.
To do this I need to set OPT_FMENABLE and create a function that will accept addresses and a channel.
I created a function in the library to send a structure.
But I don't know how to do it correctly.
Can you help me add functionality to the library?
bool EBYTE::SendStructFixed(const void *TheStructure, uint16_t size_, const uint8_t ADDH, const uint8_t ADDL, const uint8_t CHAN) {
const uint8_t addh_old = GetAddressH();
const uint8_t addl_old = GetAddressL();
const uint8_t chan_old = GetChannel();
SetAddressH(ADDH);
SetAddressL(ADDL);
SetChannel(CHAN);
SaveParameters(TEMPORARY);
_buf = _s->write((uint8_t *)TheStructure, size_);
CompleteTask(1000);
SetAddressH(addh_old);
SetAddressL(addl_old);
SetChannel(chan_old);
SaveParameters(TEMPORARY);
return (_buf == size_);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels