mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 12:13:34 +08:00
fix Logger::add_topic: 0 is a valid file descriptor
This commit is contained in:
@@ -333,7 +333,7 @@ int Logger::add_topic(const char *name, unsigned interval = 0)
|
||||
}
|
||||
}
|
||||
|
||||
if ((fd > 0) && (interval != 0)) {
|
||||
if (fd >= 0 && interval != 0) {
|
||||
orb_set_interval(fd, interval);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user