At t=0, the first RPM and speed data recorded are set as R1 & S1 respectively
Read the data into the variables. If the parameters are met by the data received then set a boolean to true else set it to false.
Read the data again into the same variables. If the parameters are met by the data received then set the boolean to true else set it to false.
Read the data again into the same variables. If the parameters are met by the data received then set the boolean to true else set it to false.
Read the data again into the same variables. If the parameters are met by the data received then set the boolean to true else set it to false.
If the boolean is still true after 4 reads then the conditions have been met.