Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule

This commit is contained in:
Bob-F
2018-08-06 13:32:36 +02:00
committed by Beat Küng
parent e989c80205
commit 2ece14bad1
30 changed files with 1184 additions and 15 deletions
+4 -2
View File
@@ -42,7 +42,8 @@ int RcInput::init()
/**
* initialize the data of each channel
*/
for (i = 0; i < input_rc_s::RC_INPUT_MAX_CHANNELS; ++i) {
for (i = 0; i < input_rc_s::RC_INPUT_MAX_CHANNELS && i<16; ++i) {
//_data.values defined as int[16] and RC_INPUT_MAX_CHANNELS (=18) > 16
_data.values[i] = UINT16_MAX;
}
@@ -104,7 +105,7 @@ int RcInput::start(char *device, int channels)
{
int result = 0;
strcpy(_device, device);
PX4_WARN("Device %s , channels: %d \n", device, channels);
PX4_INFO("Device %s , channels: %d \n", device, channels);
_channels = channels;
result = init();
@@ -231,6 +232,7 @@ void RcInput::_measure(void)
_data.rc_failsafe = (_sbusData[23] & (1 << 3)) ? true : false;
_data.rc_lost = (_sbusData[23] & (1 << 2)) ? true : false;
_data.input_source = input_rc_s::RC_INPUT_SOURCE_PX4IO_SBUS;
orb_publish(ORB_ID(input_rc), _rcinput_pub, &_data);
}
//---------------------------------------------------------------------------------------------------------//