updated SensorTest.cpp and sensor.cpp