Fixed bug with delayAfterSend

parent 22e9bcef
Pipeline #351 passed with stage
in 1 minute and 6 seconds
## v2.1.1 - 2020-04-23
- Fixed bug with *delay after send*
## v2.1.0 - 2020-04-22
- Polled data will always be send to the address of the polling node
- Made *server address*, *own address* and *delay after send* configurable at runtime
......
{
"name": "auto-watering-control",
"version": "2.1.0",
"version": "2.1.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
{
"name": "auto-watering-control",
"version": "2.1.0",
"version": "2.1.1",
"description": "Control tool for the automatic watering system",
"main": "index.js",
"scripts": {
......
......@@ -21,7 +21,7 @@
// version number of the software
#define SOFTWARE_VERSION_MAJOR 2
#define SOFTWARE_VERSION_MINOR 1
#define SOFTWARE_VERSION_PATCH 0
#define SOFTWARE_VERSION_PATCH 1
// version of the eeporm data model; must be increased if the data model changes
#define EEPROM_VERSION 4
......
......@@ -221,7 +221,7 @@ void rhRecv () {
* @param sendTo Target address to send the message to. Defaults to the configured server address.
* @return `true` if the message is successfully send.
*/
bool rhSend(uint8_t msgType, uint8_t len, uint8_t sendTo, uint8_t delayAfterSend) {
bool rhSend(uint8_t msgType, uint8_t len, uint8_t sendTo, uint16_t delayAfterSend) {
rhBufTx[0] = msgType;
if (!rhManager.sendtoWait(rhBufTx, len, sendTo)) {
blinkCode(BLINK_CODE_RH_SEND_ERROR);
......@@ -241,7 +241,7 @@ bool rhSend(uint8_t msgType, uint8_t len, uint8_t sendTo, uint8_t delayAfterSend
* @param sendTo Target address to send the message to. Defaults to the configured server address.
* @return `true` if the message is successfully send.
*/
bool rhSendData(uint8_t msgType, bool forceSend, uint8_t sendTo, uint8_t delayAfterSend) {
bool rhSendData(uint8_t msgType, bool forceSend, uint8_t sendTo, uint16_t delayAfterSend) {
if (!forceSend && !settings.pushDataEnabled) {
// to nothing if push data is not enabled and we should not force sending data
return true;
......
......@@ -50,7 +50,7 @@ extern uint8_t rhBufRx[RH_BUF_RX_LEN];
void rhInit ();
void rhRecv ();
bool rhSend(uint8_t msgType, uint8_t len, uint8_t sendTo = settings.serverAddress, uint8_t delayAfterSend = settings.delayAfterSend);
bool rhSendData(uint8_t msgType, bool forceSend = RH_SEND_ONLY_WHEN_PUSH_ENABLED, uint8_t sendTo = settings.serverAddress, uint8_t delayAfterSend = settings.delayAfterSend);
bool rhSend(uint8_t msgType, uint8_t len, uint8_t sendTo = settings.serverAddress, uint16_t delayAfterSend = settings.delayAfterSend);
bool rhSendData(uint8_t msgType, bool forceSend = RH_SEND_ONLY_WHEN_PUSH_ENABLED, uint8_t sendTo = settings.serverAddress, uint16_t delayAfterSend = settings.delayAfterSend);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment