Send on Sync message

Dependencies:   BNO055_fusion RF24_fork mbed

Fork of F042_BNO055_toNRF24 by BME SmartLab

config.h

Committer:
mrcrsch
Date:
2017-01-16
Revision:
0:5283bf22044b
Child:
1:03c9c0e3fc70

File content as of revision 0:5283bf22044b:

#ifndef CONFIG_H
#define CONFIG_H

#include "BNO055.h"

//This header contains calibration data

#define NodeID 2

#define NumOfTx 2
#define SendDelay 33 // Send Delay in ms
#define calibration 0 // 0 -> normal 1-> mag cal  2->accel 3->gyro 4-> y,p,r 5-> refresh Rate

//define MCU for bias and pinout
#define F042
//#define L052
//#define F103







//Macro for pinout

#ifdef F042
    #define ledpin      PA_10
    
    #define nrf_CE      PA_1
    #define nrf_CSN     PA_4
    #define spi_SCK     PA_5
    #define spi_MOSI    PA_7
    #define spi_MISO    PA_6
    #define nrf_irq     PA_1 //TODO
    
    #define i2c_sda     PF_0
    #define i2c_scl     PF_1
    
#elif defined L052
    

    #define ledpin      PA_8
    
    #define nrf_CE      PB_4
    #define nrf_CSN     PB_3
    #define spi_SCK     PA_5
    #define spi_MOSI    PA_7
    #define spi_MISO    PA_6
    #define nrf_irq     PA_15 
    
    #define i2c_sda     PB_7 
    #define i2c_scl     PB_6
    
#elif defined F103

    #define ledpin      PA_10
    
    #define nrf_CE      PA_9
    #define nrf_CSN     PA_8
    #define spi_SCK     PB_13
    #define spi_MOSI    PB_15
    #define spi_MISO    PB_14
    #define nrf_irq     PA_12
    
    #define i2c_sda     PB_11
    #define i2c_scl     PB_10
        
#endif






//Macro for Bias for MPU9250

#if NodeID == 0  //for calibration
    float magbias[3] = {0, 0, 0}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1, 1, 1};
    float gyroBias[3] = {0,0,0}, accelBias[3] = {0,0,0};
#elif NodeID == 01
    float magbias[3] = {230.06, 200.52, -272.84}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.06, 1.013, 0.975};
    float gyroBias[3] = {0.764127,-0.92574,0.693003}, accelBias[3] = {0.081106,0.00221,0.000569}; // Bias corrections for gyro and accelerometer   
#elif NodeID == 02
    float magbias[3] = {139.309, 268.018, 45.38}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.05367, 0.99, 0.963824};
    float gyroBias[3] = {2.868652,-3.94802,-16.9032}, accelBias[3] = {0.004451,-0.05648,0.034475};
#elif NodeID == 03
    float magbias[3] = {-39.37,159.975,-156.101}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.01149, 1.0193, 0.970588};
    float gyroBias[3] = {-1.767136968,-1.293883734,-0.089169659}, accelBias[3] = {-0.036429195, -0.062139254, -0.007011032};
#elif NodeID == 04
    float magbias[3] = {204.2954, 82.6538, -33.0917}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.0079681, 1.020161, 0.973077};
    float gyroBias[3] = {0.069701,0.426213,2.010493}, accelBias[3] = {-0.03679,-0.00328,-0.08524};
#elif NodeID == 05
    float magbias[3] = {-66.19355, 193.05185, 61.052193}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.03841111, 0.989542111, 0.9742611};
    float gyroBias[3] = {0.158259,1.049968,0.993654}, accelBias[3] = {-0.02721,0.03663,0.011271};
#elif NodeID == 06
    float magbias[3] = {-51.4838, 145.285, -191.774}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.049227, 0.99328, 0.971354};
    float gyroBias[3] = {-1.08982,0.222767,-0.49911}, accelBias[3] = {-0.01986,0.007156,-0.02797};
#elif NodeID == 07
    float magbias[3] = {218.049286, 107.05262, -110.171631}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.042177, 0.966667, 1.030303};
    float gyroBias[3] = {-2.127218,0.4099984,-0.700637}, accelBias[3] = {-0.0041746,-0.017296524,-0.070773};
#elif NodeID == 11 //racket
    float magbias[3] = {263.908875, 440.263977, -235.16362}, magCalibration[3] = {0,0,0};  // Factory mag calibration and mag bias
    float magscale[3] = {1.013227, 0.997396, 0.989664};
    float gyroBias[3] = {-1.12645,0.154036,0.416789}, accelBias[3] = {-0.00275,0.030735,-0.13714};
#endif

#endif