WindhoverLabs / airliner

7 stars 3 forks source link

RCIN App didn't set RcLost when the translated data indicated "Measure.RcLost = TRUE" #340

Open ynielson opened 1 year ago

ynielson commented 1 year ago

When the RCIN Custom Parser translated the sbusData(with correct header and footer) with the result of "Measure.RcFailsafe = TRUE" && "Measure.RcLost = TRUE", it didn't set the RcLost status by calling "RCIN_Custom_RC_Lost(TRUE)" as it did in other failure cases.

The app "ReadDevice" checked this status "Measure.RcFailsafe = TRUE" && "Measure.RcLost = TRUE", but it caused different error_count depending on the ReadDevice calling frequecy, as the parser's errorCount depends on the "RCIN_Stream_Task()" frequency.

The error count can be increased or decreased depending on the app tuning status as follows:

  1. App Wakeup frequency
  2. RCIN_Stream_Task() frequency
  3. Received byte size at a time : for example when the streaming task received 25 bytes every time the total error count was 13, but when the task received 12 bytes every time with the same data, the total error count was 30.
ynielson commented 1 year ago

From the above comment, "it didn't set the RcLost status by calling "RCIN_Custom_RC_Lost(TRUE)" as it did in other failure cases."

I can see that it may not need to do so, because the RcLost and RcFailSafe was already set by the Translate function, "RCIN_Custom_PWM_Translate()". It considered that it is streaming correctly, because the app received that data and was received correctly, no matter what data corruption happened in the middle of the way. (I think it's the matter of whose responsibility)

But the frequencies mentioned in number 1, 2, 3 will affect the performance greatly or somehow depending on the tuning status.