CLI work, flightorientation

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1082 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
jphelirc 2010-12-08 12:34:02 +00:00
parent 0a91b02a93
commit 8764e1bb1d
2 changed files with 14 additions and 8 deletions

View File

@ -407,7 +407,14 @@ void Show_Settings() {
SerPri("Camera mode: ");
SerPriln(cam_mode, DEC);
SerPri("Flight orientation: ");
if(SW_DIP1) {
SerPriln("x mode");
} else {
SerPriln("+ mode");
}
SerPrln();
SerPrln();

View File

@ -97,6 +97,12 @@ void APM_Init() {
#endif
#endif
// Read DIP Switches and other important values. DIP switches needs special functions to
// read due they are not defined as normal pins like other GPIO's are.
SW_DIP1 = APMPinRead(PINE, 7);
SW_DIP2 = APMPinRead(PINE, 6);
SW_DIP3 = APMPinRead(PINL, 6);
SW_DIP4 = APMPinRead(PINL, 7);
// Is CLI mode active or not, if it is fire it up and never return.
if(digitalRead(SW2)) {
@ -105,13 +111,6 @@ void APM_Init() {
}
// Read DIP Switches and other important values. DIP switches needs special functions to
// read due they are not defined as normal pins like other GPIO's are.
SW_DIP1 = APMPinRead(PINE, 7);
SW_DIP2 = APMPinRead(PINE, 6);
SW_DIP3 = APMPinRead(PINL, 6);
SW_DIP4 = APMPinRead(PINL, 7);
/* Works, tested 18-10-10 JP
if(SW_DIP1) {
SerPrln("+ mode");