mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
srf02 driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions
This commit is contained in:
committed by
Beat Küng
parent
5b259a008a
commit
fed6c9ae34
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user