boolean requestACK = false ?

Started by Creotom, November 28, 2018, 01:54:57 PM

Creotom

Can anyone tell me what Boolean value for Request ACK does?
I am experimenting with the struct send receive examples and whether I set this value to true or false an ack is sent back after each send.

int TRANSMITPERIOD = 300; //transmit a packet to gateway so often (in ms)
byte sendSize=0;
boolean requestACK = false;
SPIFlash flash(8, 0xEF30); //EF40 for 16mbit windbond chip
RFM69 radio;
long lastPeriod = -1;

Felix

It's just a boolean (true/false) value that's used in radio.send functions, to request an ACK or not.

Creotom

Cool thanks. But I don't get different behavior when I change it's value. Is this normal?

Felix

Well, what behavior do you expect?
And what's your code doing with that variable?

Creotom

It's the sample struct code. I haven't modified it.
Im on a mobile device now but I'll describe better what I mean tomorrow.
Thanks

TomWS

Quote from: Creotom on November 28, 2018, 03:21:13 PM
Cool thanks. But I don't get different behavior when I change it's value. Is this normal?
Yes, it is very 'normal'.  You've declared and set a variable that isn't used anywhere else.  Consequently there is no change in behavior to you program.

Now, if you had actually used it as a positional parameter to the send() method, then you might observe different behavior.