ardupilot/libraries/AP_Compass/AP_Compass_HIL.cpp
DrZiplok@gmail.com cc06f07067 Major update including AP_Var support.
Most of the compass functionality is now abstracted in a base class, with the various sub-classes implementing just their unique functionality.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1647 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 04:25:20 +00:00

30 lines
811 B
C++

/*
AP_Compass_HIL.cpp - Arduino Library for HIL model of HMC5843 I2C Magnetometer
Code by James Goppert. DIYDrones.com
This library is free software; you can redistribute it and / or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
*/
#include "AP_Compass_HIL.h"
// Public Methods //////////////////////////////////////////////////////////////
void AP_Compass_HIL::read()
{
// values set by setHIL function
}
// Update raw magnetometer values from HIL data
//
void AP_Compass_HIL::setHIL(float _mag_x, float _mag_y, float _mag_z)
{
// TODO: map floats to raw
mag_x = _mag_x;
mag_y = _mag_y;
mag_z = _mag_z;
}