Skip to content

Commit

Permalink
add miss msg, but need fix msg todo #28
Browse files Browse the repository at this point in the history
  • Loading branch information
zt-luo committed Apr 16, 2019
1 parent 8913e3a commit 13b27ae
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions api/src/ardusub_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_COMMAND_ACK:
{
// g_print("MAVLINK_MSG_ID_COMMAND_ACK\n");
Expand All @@ -224,6 +225,7 @@ void as_handle_message_id(mavlink_message_t message,
// current_messages->command_ack.result);
break;
}

case MAVLINK_MSG_ID_NAMED_VALUE_FLOAT:
{
// g_print("MAVLINK_MSG_ID_NAMED_VALUE_FLOA\n");
Expand All @@ -234,6 +236,7 @@ void as_handle_message_id(mavlink_message_t message,
named_val_float_queue_push(target_system, current_messages);
break;
}

case MAVLINK_MSG_ID_VFR_HUD:
{
// g_print("MAVLINK_MSG_ID_VFR_HUD\n");
Expand All @@ -242,6 +245,7 @@ void as_handle_message_id(mavlink_message_t message,
// g_print("heading:%d\n", current_messages->vfr_hud.heading);
break;
}

case MAVLINK_MSG_ID_POWER_STATUS:
{
// g_print("MAVLINK_MSG_ID_POWER_STATUS\n");
Expand All @@ -254,6 +258,7 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_SYSTEM_TIME:
{
// g_print("MAVLINK_MSG_ID_SYSTEM_TIME\n");
Expand All @@ -263,27 +268,31 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_MISSION_CURRENT:
{
// g_print("MAVLINK_MSG_ID_MISSION_CURRENT\n");
mavlink_msg_mission_current_decode(&message, &(current_messages->mission_current));
current_messages->time_stamps.mission_current = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_GPS_RAW_INT:
{
// g_print("MAVLINK_MSG_ID_GPS_RAW_INT\n");
mavlink_msg_gps_raw_int_decode(&message, &(current_messages->gps_raw_int));
current_messages->time_stamps.gps_raw_int = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT:
{
// g_print("MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT\n");
mavlink_msg_nav_controller_output_decode(&message, &(current_messages->nav_controller_output));
current_messages->time_stamps.nav_controller_output = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_RC_CHANNELS:
{
// g_print("MAVLINK_MSG_ID_RC_CHANNELS\n");
Expand All @@ -293,13 +302,15 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_VIBRATION:
{
// g_print("MAVLINK_MSG_ID_VIBRATION\n");
mavlink_msg_vibration_decode(&message, &(current_messages->vibration));
current_messages->time_stamps.vibration = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_RAW_IMU:
{
// g_print("MAVLINK_MSG_ID_RAW_IMU\n");
Expand All @@ -309,6 +320,7 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_SCALED_PRESSURE:
{
// g_print("MAVLINK_MSG_ID_SCALED_PRESSURE\n");
Expand All @@ -318,13 +330,15 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_SCALED_IMU2:
{
// g_print("MAVLINK_MSG_ID_SCALED_IMU2\n");
mavlink_msg_scaled_imu2_decode(&message, &(current_messages->scaled_imu2));
current_messages->time_stamps.scaled_imu2 = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_SCALED_PRESSURE2:
{
// g_print("MAVLINK_MSG_ID_SCALED_PRESSURE2\n");
Expand All @@ -334,13 +348,15 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
{
// g_print("MAVLINK_MSG_ID_RC_CHANNELS_RAW\n");
mavlink_msg_rc_channels_raw_decode(&message, &(current_messages->rc_channels_raw));
current_messages->time_stamps.rc_channels_raw = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_STATUSTEXT:
{
// g_print("MAVLINK_MSG_ID_STATUSTEXT\n");
Expand All @@ -352,6 +368,7 @@ void as_handle_message_id(mavlink_message_t message,
// g_print("\n");
break;
}

case MAVLINK_MSG_ID_PARAM_VALUE:
{
// g_print("MAVLINK_MSG_ID_PARAM_VALUE\n");
Expand Down Expand Up @@ -390,13 +407,63 @@ void as_handle_message_id(mavlink_message_t message,

break;
}

case MAVLINK_MSG_ID_TIMESYNC:
{
// g_print("MAVLINK_MSG_ID_TIMESYNC\n");
mavlink_msg_timesync_decode(&message, &(current_messages->timesync));
current_messages->time_stamps.timesync = g_get_monotonic_time();
break;
}

case MAVLINK_MSG_ID_MOUNT_STATUS:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_MEMINFO:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_SENSOR_OFFSETS:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_AHRS:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_HWSTATUS:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_AHRS2:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_AHRS3:
{
// todo: deal with this
break;
}

case MAVLINK_MSG_ID_EKF_STATUS_REPORT:
{
// todo: deal with this
break;
}

default:
{
g_warning("Warning, did not handle message id %i.", message.msgid);
Expand Down

0 comments on commit 13b27ae

Please sign in to comment.