Update sensors.cpp

I don't remember from where is this taken, is it from MWistheBest or from somewhere else. Thanks to the one who made this change to sensors.cpp