board support add px4_i2c_bus_external/px4_spi_bus_external

This commit is contained in:
Daniel Agar
2017-11-16 02:42:32 -05:00
committed by Lorenz Meier
parent 2aeb4aa55f
commit 53595bac0e
54 changed files with 232 additions and 312 deletions
+4 -4
View File
@@ -701,7 +701,7 @@ MK::mk_check_for_blctrl(unsigned int count, bool showOutput, bool initI2C)
result[1] = 0;
result[2] = 0;
set_address(BLCTRL_BASE_ADDR + i);
set_device_address(BLCTRL_BASE_ADDR + i);
if (OK == transfer(&msg, 1, &result[0], 3)) {
Motor[i].Current = result[0];
@@ -765,7 +765,7 @@ MK::mk_servo_set(unsigned int chan, short val)
}
//if(Motor[chan].State & MOTOR_STATE_PRESENT_MASK) {
set_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
set_device_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
if (Motor[chan].Version == BLCTRL_OLD) {
/*
@@ -902,7 +902,7 @@ MK::mk_servo_test(unsigned int chan)
msg[1] = Motor[chan].SetPointLowerBits;
}
set_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
set_device_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
if (Motor[chan].Version == BLCTRL_OLD) {
ret = transfer(&msg[0], 1, nullptr, 0);
@@ -928,7 +928,7 @@ MK::mk_servo_locate()
if (hrt_absolute_time() - last_timestamp > MOTOR_LOCATE_DELAY) {
last_timestamp = hrt_absolute_time();
set_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
set_device_address(BLCTRL_BASE_ADDR + (chan + addrTranslator[chan]));
chan++;
if (chan <= _num_outputs) {