First up im very grateful for all the support documentation , without which i wouldnt have gotten this far , with my build.
Im having a few issues (probably just my stupidity ) with the APM setup process .
I got my APM board and Oilpan(2.2) about a month ago .I finished assembly and ran the blinking LED program , and also the servo dance program (which seems fine to me.)
The APM Beta Code is currently loaded on my board , last evening i took it outside to test the GPS LED behavior .
This is the behavior i got :
- Fast flashing - cablibrating gyros.
- BC go solid for 2-3 seconds - pause.
- A and BC flash alternating - rotation flashing.
- ABC flash slowly - waiting for GPS lock.
- B Solid ,C Flashing (for about 2 minutes)
- Then B and C solid.
Ive Included a picture showing my APM running on the Receiver battery .I hadnt done the radio setup before this .
I then connected the APM via usb and ran a gps test , the test confirmed that the home coordinates were accurate.
im wondering why didnt the A LED glow solid.
This morning i proceeded to the radio setup :
This is how the RX is connected to the APM
THRO == IN2
AILE == IN0
ELEV == IN1
RUDD == IN3
AUX1 == IN7 (even tried AUX2)
This is my show output:
Radio:
CH1: 900 | 1520
CH2: 1200 | 2100
CH3: 900 | 1916
CH4: 1096 | 1902
CH5: 1000 | 2000
CH6: 1000 | 2000
CH7: 1000 | 2000
CH8: 1000 | 2000
when i tried setting up the mode, the 'pos' value did not change when i flipped the 3 way switch. (APM detected the inputs on my Aile channel in order to scroll through the available modes , but i couldnt change the switch position.
Help.
Replies
Serproxy - (C)1999 Stefano Busti, (C)2005 David A. Mellis - Waiting for clients
Server thread launched
server(1) - thread started
server(1) - EOF from sio
server(1) exiting
Here is my config file for serproxy :
# Config file for serproxy
# See serproxy's README file for documentation
# Transform newlines coming from the serial port into nils
# true (e.g. if using Flash) or false
newlines_to_nils=false
# Comm ports used
comm_ports=1
# Default settings
comm_baud=38400
comm_databits=8
comm_stopbits=1
comm_parity=none
# Idle time out in seconds
timeout=300
# Port 1 settings (ttyS0)
net_port1=5331
serial_device1=/dev/tty.usbserial-A600dLQ1
is there an updated version for the perl script ?or am i missing something else?
void read_control_switch()
{
byte switchPosition = readSwitch();
if (oldSwitchPosition != switchPosition){
set_mode(flight_modes[switchPosition]);
oldSwitchPosition = switchPosition;
// reset navigation integrators
// -------------------------
reset_I();
}
}
byte readSwitch(void){
int pulsewidth = APM_RC.InputCh(flight_mode_channel);
int pulsewidth_a = APM_RC.InputCh(AUX2_CH);
if (pulsewidth_a < 1230 && pulsewidth < 1230) return 1;// AUTO
if (pulsewidth_a < 1230 && pulsewidth >= 1690) return 2;// RTL
if (pulsewidth_a > 1690 && pulsewidth <= 1230) return 3; //Software Manual FBW A
if (pulsewidth_a >= 1690 && pulsewidth >= 1690) return 4; // Hardware Manual
//if (pulsewidth >= 1750)
return 0;
}
void reset_control_switch()
{
oldSwitchPosition = 0;
read_control_switch();
Serial.print("MSG: reset_control_switch");
Serial.println(oldSwitchPosition , DEC);
}
void update_servo_switches()
{
// up is reverse
// up is elevon
mix_mode = (PINL & 128) ? 1 : 0;
if (mix_mode == 0) {
reverse_roll = (PINE & 128) ? 1 : -1;
reverse_pitch = (PINE & 64) ? 1 : -1;
reverse_rudder = (PINL & 64) ? 1 : -1;
} else {
reverse_elevons = (PINE & 128) ? 1 : -1;
reverse_ch1_elevon = (PINE & 64) ? 1 : -1;
reverse_ch2_elevon = (PINL & 64) ? 1 : -1;
}
}
adding
#define AUX2_CH 6
to the APM_Config.h file
I am getting the same problem except I do not get the C flashing and locking.
1. Fast flashing - cablibrating gyros.
2. BC go solid for 2-3 seconds - pause.
3. A and BC flash alternating - rotation flashing.
4. ABC flash slowly - waiting for GPS lock.
5. B Solid. No A and C.
Also, on the Mtk, the LED flashes blue for 30mins and doesn't lock.
I have tried all my 4 AMP boards (2 of which I just purchased) and 3 Mtk GPS and have the same problem. The 2 new AMP has updated firmware and does not have any servo twitching problem the first 2 boards have.
I updated the firmware of Mtk GPS successfully.
The GPS is connected to the Red board that say "GPS port".
The MUX LED turns on when I switch away from MANUAL.
In the code, I defined the MTK GPS
#define GPS_PROTOCOL GPS_PROTOCOL_MTK
I did not change any other part of the ArduPilotMega Beta 1.0 code that is uploaded yesterday.
I think I am missing something really simple, but I have been going through the manual for weeks and still cant solve this problem.
Really appreciate your help. Thanks
Joshua