syouichi imamori / Mbed OS MulticopterQuadX

Dependencies:   IAP

Revision:
0:cca1c4e84da4
Child:
2:59ac9df97701
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config.h	Thu Jul 11 19:18:44 2013 +0000
@@ -0,0 +1,106 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#define SERIAL_LCD
+//#define LPCXpresso
+//#define LocalFileOut
+
+#define TX_TYPE 0               // 0:FM 1:IR
+#define Thro_Min 25
+#define Thro_Lo 75
+#define Thro_Hi 950
+#define Pulse_Min 1000
+#define Pulse_Max 2000
+#define Stick_Limit 150
+#define M1 M[0]
+#define M2 M[1]
+#define M3 M[2]
+#define M4 M[3]
+#define M5 M[4]
+#define M6 M[5]
+#define THR CH[0]
+#define AIL CH[1]
+#define ELE CH[2]
+#define RUD CH[3]
+#define AUX CH[4]
+#define _ITG3200  0x00
+#define _L3GD20   0x01
+
+//enum PortNum{Port_THR=1,Port_AIL=3,Port_ELE=5,Port_RUD=7,Port_AUX=6};
+enum IRNum{IR_THR=1,IR_AIL,IR_ELE,IR_RUD,IR_AUX};       //Input Pulse Sequence
+enum channel{ROL=0,PIT,YAW,COL,GAIN};
+
+
+struct config {
+    float Revision;
+    int Struct_Size;
+    int Stick_Ref[5];            //Stick Neutral Position
+    float Stick_Mix[3];               //Mixing ratio of stick operation
+    signed char Gyro_Dir[4];
+    float Gyro_Gain[6];
+    signed char Accel_Dir[4];
+    float Accel_Gain[3];
+    int Gyro_Gain_Setting;
+    int Gyro_Divider;
+    int Gyro_LPF_Value;
+    int Gyro_SamplRate_Divider;
+    int LCD_Contrast;
+    int PWM_Mode;
+    float Gyro_Stick_offset_effect;
+    int PWM_Interval; 
+//    int Accel_Rang;
+//    int Accel_Rate;
+//    int PWM_Resolution;
+    char StartMode;
+    char Gyro_Type;
+public:
+    config() {
+        Revision = 1.03;
+        Struct_Size = sizeof(config);
+        Stick_Ref[0] = 1500;
+        Stick_Ref[1] = 1500;
+        Stick_Ref[2] = 1500;
+        Stick_Ref[3] = 1100;
+        Stick_Ref[4] = 1500;
+        Stick_Mix[0] = 0.5;
+        Stick_Mix[1] = 0.5;
+        Stick_Mix[2] = 1.0;
+        Gyro_Dir[0] = 1;
+        Gyro_Dir[1] = 1;
+        Gyro_Dir[2] = 1;
+        Gyro_Dir[3] = -1;
+        Gyro_Gain[0] = 0.40;
+        Gyro_Gain[1] = 0.40;
+        Gyro_Gain[2] = 0.40;
+        Gyro_Gain[3] = 0.00;
+        Gyro_Gain[4] = 0.00;
+        Gyro_Gain[5] = 0.00;
+        Accel_Dir[0] = 1;
+        Accel_Dir[1] = 1;
+        Accel_Dir[2] = 1;
+        Accel_Dir[3] = 1;
+        Accel_Gain[0] = 0.50;
+        Accel_Gain[1] = 0.50;
+        Accel_Gain[2] = 0.50;
+        Gyro_Gain_Setting = -1;
+        Gyro_Divider=7;
+        Gyro_LPF_Value=0;
+        Gyro_SamplRate_Divider=1;
+        LCD_Contrast = 60;
+        PWM_Mode = 1;
+        Gyro_Stick_offset_effect = 0.00;
+        PWM_Interval = 3000; 
+//        Accel_Rang = 2;
+//        Accel_Rate = 14;
+//        PWM_Resolution = 0;
+        StartMode = 'C';
+        Gyro_Type = _ITG3200;
+    }
+};
+#endif
+
+
+
+
+
+