WIP state on getting MAVLink as a class, much of the work done, but does not compile yet

This commit is contained in:
Lorenz Meier
2014-01-26 18:40:02 +01:00
parent 03c543aba6
commit ac77fe9c27
7 changed files with 400 additions and 243 deletions
-36
View File
@@ -85,42 +85,6 @@ mavlink_system_t mavlink_system = {
0
}; // System ID, 1-255, Component/Subsystem ID, 1-255
/*
* Internal function to send the bytes through the right serial port
*/
void
mavlink_send_uart_bytes(mavlink_channel_t channel, const uint8_t *ch, int length)
{
int uart = -1;
switch (channel) {
case MAVLINK_COMM_0:
uart = Mavlink::get_uart_fd(0);
break;
case MAVLINK_COMM_1:
uart = Mavlink::get_uart_fd(1);
break;
case MAVLINK_COMM_2:
uart = Mavlink::get_uart_fd(2);
break;
case MAVLINK_COMM_3:
uart = Mavlink::get_uart_fd(3);
break;
case MAVLINK_COMM_4:
uart = Mavlink::get_uart_fd(4);
break;
case MAVLINK_COMM_5:
uart = Mavlink::get_uart_fd(5);
break;
case MAVLINK_COMM_6:
uart = Mavlink::get_uart_fd(6);
break;
}
write(uart, ch, (size_t)(sizeof(uint8_t) * length));
}
/*
* Internal function to give access to the channel status for each channel
*/