Given a dataset of sensor readings, write an algorithm to find the longest contiguous subarray of readings that fall within a specific safe threshold.