Skip to content

Commit

Permalink
-ground course added into MSP_RAW_GPS
Browse files Browse the repository at this point in the history
-variometer added into MSP_ALTITUDE

git-svn-id: http://multiwii.googlecode.com/svn/trunk/MultiWii_shared@1172 02679b44-d973-9852-f2fa-63770883b36c
  • Loading branch information
romek_b@o2.pl committed Oct 7, 2012
1 parent 41b801d commit 94ef089
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions IMU.ino
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ void getEstimatedAltitude(){
//D
float vel_tmp = vel;
applyDeadband(vel_tmp, 5);
vario = vel_tmp;
BaroPID -= constrain(conf.D8[PIDALT] * vel_tmp / 20, -150, 150);
debug[3] = BaroPID;

Expand Down
1 change: 1 addition & 0 deletions MultiWii.ino
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ static int32_t EstAlt; // in cm
static int16_t BaroPID = 0;
static int32_t AltHold;
static int16_t errorAltitudeI = 0;
static int16_t vario = 0; // variometer in cm/s
#if defined(BUZZER)
static uint8_t toggleBeep = 0;
#endif
Expand Down
12 changes: 7 additions & 5 deletions Serial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ static uint8_t inBuf[INBUF_SIZE][UART_NUMBER];
#define MSP_VERSION 0

#define MSP_IDENT 100 //out message multitype + multiwii version + protocol version + capability variable
#define MSP_STATUS 101 //out message cycletime & errors_count & sensor present & box activation
#define MSP_STATUS 101 //out message cycletime & errors_count & sensor present & box activation & current setting number
#define MSP_RAW_IMU 102 //out message 9 DOF
#define MSP_SERVO 103 //out message 8 servos
#define MSP_MOTOR 104 //out message 8 motors
#define MSP_RC 105 //out message 8 rc chan
#define MSP_RAW_GPS 106 //out message fix, numsat, lat, lon, alt, speed
#define MSP_RAW_GPS 106 //out message fix, numsat, lat, lon, alt, speed, ground course
#define MSP_COMP_GPS 107 //out message distance home, direction home
#define MSP_ATTITUDE 108 //out message 2 angles 1 heading
#define MSP_ALTITUDE 109 //out message 1 altitude
#define MSP_ALTITUDE 109 //out message altitude, variometer
#define MSP_BAT 110 //out message vbat, powermetersum
#define MSP_RC_TUNING 111 //out message rc rate, rc expo, rollpitch rate, yaw rate, dyn throttle PID
#define MSP_PID 112 //out message up to 16 P I D (8 are used)
Expand Down Expand Up @@ -321,13 +321,14 @@ void evaluateCommand() {
break;
#if GPS
case MSP_RAW_GPS:
headSerialReply(14);
headSerialReply(16);
serialize8(f.GPS_FIX);
serialize8(GPS_numSat);
serialize32(GPS_coord[LAT]);
serialize32(GPS_coord[LON]);
serialize16(GPS_altitude);
serialize16(GPS_speed);
serialize16(GPS_ground_course); // added since r1172
break;
case MSP_COMP_GPS:
headSerialReply(5);
Expand All @@ -343,8 +344,9 @@ void evaluateCommand() {
serialize16(headFreeModeHold);
break;
case MSP_ALTITUDE:
headSerialReply(4);
headSerialReply(6);
serialize32(EstAlt);
serialize16(vario); // added since r1172
break;
case MSP_BAT:
headSerialReply(3);
Expand Down

0 comments on commit 94ef089

Please sign in to comment.