Update sensors.cpp with Ziyann's changes to fix sensors correctly