This code is flyable, but a few problems exist which cause values in the .config files to be overwritten by the defaults in the .XML file.

This commit is contained in:
jwilson
2016-02-19 16:59:49 +01:00
committed by Julian Oes
parent 8cc37db595
commit d84639f8c4
7 changed files with 171 additions and 16 deletions
+12 -1
View File
@@ -2231,7 +2231,18 @@ Sensors::task_main()
/* this is undesirable but not much we can do - might want to flag unhappy status */
if (pret < 0) {
warnx("poll error %d, %d", pret, errno);
warnx("poll error: pret: %d, errno: %d, gyro_sub: %d", pret, errno, fds[0].fd);
// TODO-JYW: TESTING-TESTING
/* if the polling operation failed because no gyro sensor is available yet,
* then attempt to subscribe once again
*/
if (_gyro_count == 0) {
_gyro_count = init_sensor_class(ORB_ID(sensor_gyro), &_gyro_sub[0],
&raw.gyro_priority[0], &raw.gyro_errcount[0]);
fds[0].fd = _gyro_sub[0];
warnx("poll error: gyro count: %d, gyro sub: %d", _gyro_count, fds[0].fd);
}
continue;
}