UAVCAN: improve mag compatibility

This commit is contained in:
Holger Steinhaus
2014-11-13 16:17:35 +01:00
parent 4f5e2e379d
commit 4d489ef7f4
+3
View File
@@ -74,6 +74,9 @@ int UavcanMagnetometerBridge::init()
int UavcanMagnetometerBridge::ioctl(struct file *filp, int cmd, unsigned long arg)
{
switch (cmd) {
case SENSORIOCSQUEUEDEPTH: {
return OK; // Pretend that this stuff is supported to keep APM happy
}
case MAGIOCSSCALE: {
std::memcpy(&_scale, reinterpret_cast<const void*>(arg), sizeof(_scale));
return 0;