Subversion Repositories FlightCtrl

Rev

Rev 781 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 781 Rev 782
Line 22... Line 22...
22
#include "mymath.h"
22
#include "mymath.h"
23
#include "fc.h"
23
#include "fc.h"
24
#include "timer0.h"
24
#include "timer0.h"
25
#include "rc.h"
25
#include "rc.h"
26
#include "eeprom.h"
26
#include "eeprom.h"
-
 
27
#include "uart.h"
Line 27... Line 28...
27
 
28
 
Line 28... Line 29...
28
#define MAX_AXIS_VALUE          500
29
#define MAX_AXIS_VALUE          500
Line 327... Line 328...
327
        int32_t  Hx, Hy, Hz, Hx_corr, Hy_corr;
328
        int32_t  Hx, Hy, Hz, Hx_corr, Hy_corr;
328
        int16_t angle;
329
        int16_t angle;
329
        uint16_t div_factor;
330
        uint16_t div_factor;
330
        int16_t heading;
331
        int16_t heading;
Line -... Line 332...
-
 
332
 
-
 
333
        DebugOut.Analog[11] = MM3_Timeout;
331
 
334
 
332
        if (MM3_Timeout)
335
        if (MM3_Timeout)
333
        {
336
        {
334
                // Offset correction and normalization (values of H are +/- 512)
337
                // Offset correction and normalization (values of H are +/- 512)
335
                Hx = (((int32_t)(MM3.x_axis - MM3_calib.X_off)) * 1024) / (int32_t)MM3_calib.X_range;
338
                Hx = (((int32_t)(MM3.x_axis - MM3_calib.X_off)) * 1024) / (int32_t)MM3_calib.X_range;