format rx_unified_serial
@@ -78,7 +78,6 @@ uint16_t CRCByte = 0; //Defined here to allow Debug to see it.
uint8_t protocolToCheck = 1; //Defined here to allow Debug to see it.
uint16_t protocolDetectTimer = 0; //Defined here to allow Debug to see it.
-
int failsafe_sbus_failsafe = 0;
int failsafe_siglost = 0;
int failsafe_noframes = 0;
@@ -191,8 +190,7 @@ void rx_serial_init(void) {
void checkrx() {
if (RXProtocol == RX_PROTOCOL_INVALID) { //If there's no protocol, there's no reason to check failsafe.
findprotocol();
-}
-else{
+ } else {
//FAILSAFE! It gets checked every time! FAILSAFE! It gets checked every time! FAILSAFE! It gets checked every time!
if (gettime() - time_lastframe > 1000000) {
failsafe_noframes = 1;
@@ -252,11 +250,6 @@ else{
}
}
-
-
-
-
-
void processDSMX(void) {
for (uint8_t counter = 0; counter < 16; counter++) { //First up, get the rx_data out of the RX buffer and into somewhere safe
@@ -353,10 +346,6 @@ void processDSMX(void) {
}
}
-
-
-
-
void processSBUS(void) {
for (uint8_t counter = 0; counter < 25; counter++) { //First up, get therx_data out of the RX buffer and into somewhere safe
rx_data[counter] = rx_buffer[counter % RX_BUFF_SIZE]; // This can probably go away, as long as the buffer is large enough
@@ -485,9 +474,6 @@ void processSBUS(void) {
} // end frame received
-
-
-
void processIBUS(void) {
uint8_t frameLength = 0;
@@ -603,9 +589,6 @@ void processIBUS(void) {
}
} // end frame received
-
-
-
void processFPORT(void) {
uint8_t frameLength = 0;
static uint8_t escapedChars = 0;
@@ -774,9 +757,6 @@ void processFPORT(void) {
} // end frame received
}
-
-
-
void sendFPORTTelemetry() {
if (telemetryCounter > 0 && rx_frame_position >= 40 && frameStatus == 3) { // Send telemetry back every other packet. This gives the RX time to send ITS telemetry back
telemetryCounter = 0;
@@ -897,17 +877,10 @@ void sendFPORTTelemetry() {
}
}
-
-
-
void processCRSF(void) {
//We should probably put something here.
}
-
-
-
-
//NOTE TO SELF: Put in some double-check code on the detections somehow.
//NFE note: how about we force hold failsafe until protocol is saved. This acts like kind of a check on proper mapping/decoding as stick gesture must be used as a test
// also, we ought to be able to clear noframes_failsafe in addition to satisfying the start byte check in order to hard select a radio protocol
