Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2189 | - | 1 | /* |
2 | AP_Compass_HIL.cpp - Arduino Library for HIL model of HMC5843 I2C Magnetometer |
||
3 | Code by James Goppert. DIYDrones.com |
||
4 | |||
5 | This library is free software; you can redistribute it and / or |
||
6 | modify it under the terms of the GNU Lesser General Public |
||
7 | License as published by the Free Software Foundation; either |
||
8 | version 2.1 of the License, or (at your option) any later version. |
||
9 | |||
10 | #include "AP_Compass_HIL.h" |
||
11 | |||
12 | // Public Methods ////////////////////////////////////////////////////////////// |
||
13 | |||
14 | bool AP_Compass_HIL::read() |
||
15 | { |
||
16 | // values set by setHIL function |
||
17 | last_update = 0; //micros(); // record time of update |
||
18 | return true; |
||
19 | } |
||
20 | |||
21 | // Update raw magnetometer values from HIL data |
||
22 | // |
||
23 | void AP_Compass_HIL::setHIL(float _mag_x, float _mag_y, float _mag_z) { |
||
24 | Vector3f ofs = _offset;// .get(); |
||
25 | mag_x = _mag_x + ofs.x; |
||
26 | mag_y = _mag_y + ofs.y; |
||
27 | mag_z = _mag_z + ofs.z; |
||
28 | healthy = true; |
||
29 | } |
||
30 | */ |