getLastTemperature returns not ready (-5) if it is called immediately after readCO2UART. This happens because getLastTemperature() calls isReady() which will return false if called too often compared to the MHZxxx_RESPONSE_TIME. It should not be necessary to add a delay between reading uart value and returning the 4th byte og said value.
It should not be necessary to call isReady() in getLastTemperature() as it only returns pre stored values. Propose to remove the call or call isPreHeating() instead.
getLastTemperature returns not ready (-5) if it is called immediately after readCO2UART. This happens because getLastTemperature() calls isReady() which will return false if called too often compared to the MHZxxx_RESPONSE_TIME. It should not be necessary to add a delay between reading uart value and returning the 4th byte og said value.
It should not be necessary to call isReady() in getLastTemperature() as it only returns pre stored values. Propose to remove the call or call isPreHeating() instead.