Remove sensor struct arg

* Remove sensor arg from sensor functions
* Use sensor struct in sensor.c