Consistently making space for a maximum of 12 channels, 10 channels (including reference / temperature) are used / available right now

This commit is contained in:
Lorenz Meier
2014-03-17 17:02:10 +01:00
parent 4e6e40e5d8
commit d940bdf7f6
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1169,8 +1169,8 @@ Sensors::adc_poll(struct sensor_combined_s &raw)
hrt_abstime t = hrt_absolute_time();
/* rate limit to 100 Hz */
if (t - _last_adc >= 10000) {
/* make space for a maximum of ten channels (to ensure reading all channels at once) */
struct adc_msg_s buf_adc[10];
/* make space for a maximum of twelve channels (to ensure reading all channels at once) */
struct adc_msg_s buf_adc[12];
/* read all channels available */
int ret = read(_fd_adc, &buf_adc, sizeof(buf_adc));