Skip to content

Commit

Permalink
AP_MSP: prepare for version 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yaapu committed Jun 25, 2020
1 parent 30bcf4d commit 76011b6
Show file tree
Hide file tree
Showing 45 changed files with 3,339 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,6 @@ segv_*out
/ArduSub/scripts/
persistent.dat
dumpstack_*out
nbproject/
libraries/AP_Scripting/generator/gen-bindings

1 change: 1 addition & 0 deletions ArduCopter/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def build(bld):
'AP_OSD',
'AC_AutoTune',
'AP_KDECAN',
'AP_MSP',
],
)

Expand Down
1 change: 1 addition & 0 deletions ArduPlane/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def build(bld):
'AP_OSD',
'AC_AutoTune',
'AP_KDECAN',
'AP_MSP',
],
)

Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_BLHeli/AP_BLHeli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ void AP_BLHeli::msp_process_command(void)
break;
}

case MSP_SET_4WAY_IF: {
debug("MSP_SET_4WAY_IF");
case MSP_SET_PASSTHROUGH: {
debug("MSP_SET_PASSTHROUGH");
if (msp.dataSize == 0) {
msp.escMode = PROTOCOL_4WAY;
} else if (msp.dataSize == 2) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_BLHeli/AP_BLHeli.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include <AP_Param/AP_Param.h>
#include <Filter/LowPassFilter.h>
#include "msp_protocol.h"
#include <AP_MSP/msp_protocol.h>
#include "blheli_4way_protocol.h"

#define AP_BLHELI_MAX_ESCS 8
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_Common/AP_Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
bool. Bitnumber starts at 0 for the first bit
*/
#define BIT_IS_SET(value, bitnumber) (((value) & (1U<<(bitnumber))) != 0)
#define BIT_SET(value, bitnumber) ((value) |= (1U << (bitnumber)))
#define BIT_CLEAR(value, bitnumber) ((value) &= ~(1U << (bitnumber)))
#define BIT_TOGGLE(value, bitnumber) ((value) ^= (1U << (bitnumber)))

// get high or low bytes from 2 byte integer
#define LOWBYTE(i) ((uint8_t)(i))
Expand Down
Loading

0 comments on commit 76011b6

Please sign in to comment.