Subversion Repositories FlightCtrl

Rev

Rev 1615 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1615 Rev 1616
1
Dongfang's FC firmware rewrite
1
Dongfang's FC firmware rewrite
2
------------------------------
2
------------------------------
3
 
3
 
4
The basis was V0.74d Code Redesign Killagreg.
4
The basis was V0.74d Code Redesign Killagreg.
5
 
5
 
6
Goal:
6
Goal:
7
- To be the preferred hacker-friendly FC firmware.
7
- To be the preferred hacker-friendly FC firmware.
-
 
8
- To use H&Is design experience but make the code clearer and easier to extend+modify.
8
 
9
 
9
Non-goal:
10
Non-goal:
10
- To follow up on all changes and all new features in the H&I firmware.
11
- To follow up on all changes and all new features in the H&I firmware.
11
 
12
 
12
Features:
13
Features:
13
- Readable, reasonably documented source code makes it easy to implement the features you
14
- Readable, reasonably documented source code makes it easy to implement the features you
14
  want yourself (and to remove those you don't like).
15
  want yourself (and to remove those you don't like).
15
- The code was broken into smaller pieces and modularized (fc.c in particular). 
16
- The code was broken into smaller pieces and modularized (fc.c in particular). 
16
  Global variables are (almost) only written to by one module each. 
17
  Global variables are (almost) only written to by one module each. 
17
- New or experimental hardware is easy to incorporate. Gyro and acc. meter axes are reversible,
18
- New or experimental hardware is easy to incorporate. Gyro and acc. meter axes are reversible,
18
  and resetting the sensitivity actually works.
19
  and resetting the sensitivity actually works.
-
 
20
- New or experiemental controls are easy to incorporate. All controls (eg. R/C, external
-
 
21
  serial, NC, automatic emergency landing pilot and automatic altitude controller pilot)
-
 
22
  are potentially abstractable to one interface.
-
 
23
- Reversal of gyro or accelerometer axes is easy. It is easy to adapt the firmware for
-
 
24
  upside down installation of the FC too.
-
 
25
- The firmware is compatible with MK-Tool. This may be changed, if somebody writes a new
-
 
26
  MK-Tool which is easy to adapt for addition of / removal of features.
19
  
27
  
20
Non-features (currently):
28
Non-features (currently):
21
- Navi support temporarily removed (should be added again later).
29
- Navi support temporarily removed (should be added again later).
22
- Compass support temporarily removed (should be added again later).
30
- Compass support temporarily removed (should be added again later).
23
- Parts of menu.c are dummy implemented or removed. It is possible that menu.c and all use
31
- Parts of menu.c are dummy implemented or removed. It is possible that menu.c and all use
24
  of printf will be removed later, and replaced by something else (debud on steroids).
32
  of printf will be removed later, and replaced by something else (debud on steroids).
25
- Control rate limiter removed.
33
- Control rate limiter removed.
26
- Altitude control temporarily removed (should be added again later).
34
- Altitude control temporarily removed (should be added again later).
27
- Automatic board detection removed. This firmware is for compiling yourself, possibly
35
- Automatic board detection removed. This firmware is for compiling yourself, possibly
28
  with nonstandard or experimental hardware. That conflicts with automatically switching
36
  with nonstandard or experimental hardware. That conflicts with automatically switching
29
  between standard hardware versions, so the feature was removed. Instead, is was made
37
  between standard hardware versions, so the feature was removed. Instead, is was made
30
  easy to choose gyro types etc. in the makefile.
-
 
31
38
  easy to choose gyro types etc. in the makefile.
-
 
39
 
-
 
40
How to build:
-
 
41
- Choose a gyro definition, depending on your hardware, and enable it in the makefile
-
 
42
  and (GYRO=.....) and #include its header file in analog.h (how to make that follow the 
-
 
43
  makefile automatically?). Currently, ENC-03_FC1.3, ADXRS610_FC2.0 and invenSense are
-
 
44
  supported (each has a .c and a .h file).
-
 
45
- make all
-
 
46
32
47