Update sensor.cpp