Made all usual suspects default to their custom names and only register the default name if its not already taken by someone else

This commit is contained in:
Lorenz Meier
2013-12-07 10:34:32 +01:00
parent 264ef47197
commit 7becbcdbd5
4 changed files with 60 additions and 20 deletions
+7
View File
@@ -360,6 +360,13 @@ L3GD20::init()
if (_reports == nullptr)
goto out;
/* try to claim the generic accel node as well - it's OK if we fail at this */
ret = register_driver(GYRO_DEVICE_PATH, &fops, 0666, (void *)this);
if (ret == OK) {
log("default gyro device");
}
/* advertise sensor topic */
struct gyro_report zero_report;
memset(&zero_report, 0, sizeof(zero_report));