srf02 driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions

This commit is contained in:
DanielePettenuzzo
2018-06-21 11:02:10 +02:00
committed by Beat Küng
parent 5b259a008a
commit fed6c9ae34
4 changed files with 146 additions and 42 deletions

View File

@@ -807,6 +807,11 @@ start_bus(uint8_t rotation, int i2c_bus)
{
int fd = -1;
if (g_dev != nullptr) {
PX4_ERR("already started");
return PX4_ERROR;
}
/* create the driver */
g_dev = new TERARANGER(rotation, i2c_bus);