mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 20:10:18 +03:00
implemented using one of RC inputs as ADC channel for power meter.
added MSP_ACC_TRIM stuff for android GUI. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@231 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
parent
e59f639951
commit
23acf529d7
14 changed files with 3007 additions and 2936 deletions
13
src/serial.c
13
src/serial.c
|
@ -41,6 +41,9 @@
|
|||
#define MSP_DEBUGMSG 253 //out message debug string buffer
|
||||
#define MSP_DEBUG 254 //out message debug1,debug2,debug3,debug4
|
||||
|
||||
#define MSP_ACC_TRIM 240 //out message get acc angle trim values
|
||||
#define MSP_SET_ACC_TRIM 239 //in message set acc angle trim values
|
||||
|
||||
#define INBUF_SIZE 64
|
||||
|
||||
static const char boxnames[] =
|
||||
|
@ -179,6 +182,11 @@ static void evaluateCommand(void)
|
|||
rcData[i] = read16();
|
||||
headSerialReply(0);
|
||||
break;
|
||||
case MSP_SET_ACC_TRIM:
|
||||
cfg.angleTrim[PITCH] = read16();
|
||||
cfg.angleTrim[ROLL] = read16();
|
||||
headSerialReply(0);
|
||||
break;
|
||||
case MSP_SET_RAW_GPS:
|
||||
f.GPS_FIX = read8();
|
||||
GPS_numSat = read8();
|
||||
|
@ -360,6 +368,11 @@ static void evaluateCommand(void)
|
|||
writeParams(0);
|
||||
headSerialReply(0);
|
||||
break;
|
||||
case MSP_ACC_TRIM:
|
||||
headSerialReply(4);
|
||||
serialize16(cfg.angleTrim[PITCH]);
|
||||
serialize16(cfg.angleTrim[ROLL]);
|
||||
break;
|
||||
case MSP_DEBUG:
|
||||
headSerialReply(8);
|
||||
for (i = 0; i < 4; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue