go ahead smart guy, tell me why this works
if (millis() - retryRefreshMarker2 > 40) {
requestRX1update();
retryRefreshMarker2 = millis();
}
if (nrfEnabled) {
if (updateState == 1) {
//Serial.println("requestrx1");
//requestRX1update();
// retryRefreshMarker = millis();
updateState = 2;
}
if (millis() - retryRefreshMarker > 15) {
if (updateState == 2) {
wirelessSPI.flush_rx();
requestRX2update();
wirelessSPI.flush_tx();
retryRefreshMarker = millis();
updateState = 3;
}
}
if (millis() - retryRefreshMarker > 15) {
if (updateState == 3) {
requestRX3update();
updateState = 4;
retryRefreshMarker = millis();
}
}
if (millis() - retryRefreshMarker > 15) {
if (updateState == 4) {
requestRX3Paramsupdate();
updateState = 5;
retryRefreshMarker = millis();
}
}
if (millis() - retryRefreshMarker > 20) {
if (updateState == 5) {
updateState = 1;
}
}
}
but this dont
if (nrfEnabled) {
if (updateState == 1) {
requestRX1update();
retryRefreshMarker = millis();
updateState = 2;
}
if (millis() - retryRefreshMarker > 250) {
if (updateState == 2) {
wirelessSPI.flush_rx();
requestRX2update();
wirelessSPI.flush_tx();
retryRefreshMarker = millis();
updateState = 3;
}
}
if (millis() - retryRefreshMarker > 250) {
if (updateState == 3) {
requestRX3update();
updateState = 4;
retryRefreshMarker = millis();
}
}
if (millis() - retryRefreshMarker > 250) {
if (updateState == 4) {
requestRX3Paramsupdate();
updateState = 5;
}
}
if (millis() - retryRefreshMarker > 450) {
if (updateState == 5) {
updateState = 1;
}
}
}
}
this is obviously the compilers fault. i should mention that i did put a serial.print right underneath requestRX1update(); and its SUPPOSEDLY called in either case but only in the top half with requestRX1update(); outside of updateState does it actually send any data to rx1