Skip to content

Commit

Permalink
New message type to convey motor pin numbers to GUI.
Browse files Browse the repository at this point in the history
This allows GUI to show pin numbers and rotation on graphic. 

git-svn-id: http://multiwii.googlecode.com/svn/trunk/MultiWii_shared@791 02679b44-d973-9852-f2fa-63770883b36c
  • Loading branch information
danal.estes@gmail.com committed May 18, 2012
1 parent 1352c66 commit 16e9bd6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Serial.pde
Expand Up @@ -23,6 +23,7 @@
#define MSP_PID 112 //out message up to 16 P I D (8 are used)
#define MSP_BOX 113 //out message up to 16 checkbox (11 are used)
#define MSP_MISC 114 //out message powermeter trig + 8 free for future use
#define MSP_MOTOR_PINS 115 //out message which pins are in use for motors & servos, for GUI

#define MSP_SET_RAW_RC 200 //in message 8 rc chan
#define MSP_SET_RAW_GPS 201 //in message fix, numsat, lat, lon, alt, speed
Expand Down Expand Up @@ -209,6 +210,10 @@ void serialCom() {
headSerialReply(c,2);
serialize16(intPowerTrigger1);
tailSerialReply();break;
case MSP_MOTOR_PINS:
headSerialReply(c,8);
for(i=0;i<8;i++) {serialize8(PWM_PIN[i]);}
tailSerialReply();break;
case MSP_RESET_CONF:
checkNewConf++;checkFirstTime();break;
case MSP_ACC_CALIBRATION:
Expand Down Expand Up @@ -449,4 +454,4 @@ void SerialWrite(uint8_t port,uint8_t c){
case 3: while (!(UCSR3A & (1 << UDRE3))) ; UDR3 = c; break;
#endif
}
}
}

0 comments on commit 16e9bd6

Please sign in to comment.