mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 15:38:52 +08:00
PWM input: Fixed code style
This commit is contained in:
@@ -302,6 +302,7 @@ PWMIN::init()
|
|||||||
CDev::init();
|
CDev::init();
|
||||||
|
|
||||||
_reports = new ringbuffer::RingBuffer(2, sizeof(struct pwm_input_s));
|
_reports = new ringbuffer::RingBuffer(2, sizeof(struct pwm_input_s));
|
||||||
|
|
||||||
if (_reports == nullptr) {
|
if (_reports == nullptr) {
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -490,6 +491,7 @@ PWMIN::read(struct file *filp, char *buffer, size_t buflen)
|
|||||||
buf++;
|
buf++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if there was no data, warn the caller */
|
/* if there was no data, warn the caller */
|
||||||
return ret ? ret : -EAGAIN;
|
return ret ? ret : -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user