Skip to content

Commit

Permalink
Set gps time of IMCU gps
Browse files Browse the repository at this point in the history
  • Loading branch information
fvantienen committed Sep 20, 2016
1 parent b96156f commit ecfdf89
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sw/airborne/subsystems/intermcu/intermcu_ap.c
Expand Up @@ -188,6 +188,16 @@ static inline void intermcu_parse_msg(void (*rc_frame_handler)(void))
gps_imcu.sacc = DL_IMCU_REMOTE_GPS_sacc(imcu_msg_buf);
gps_imcu.num_sv = DL_IMCU_REMOTE_GPS_numsv(imcu_msg_buf);
gps_imcu.fix = DL_IMCU_REMOTE_GPS_fix(imcu_msg_buf);

// set gps msg time
gps_imcu.last_msg_ticks = sys_time.nb_sec_rem;
gps_imcu.last_msg_time = sys_time.nb_sec;

if (gps_imcu.fix >= GPS_FIX_3D) {
gps_imcu.last_3dfix_ticks = sys_time.nb_sec_rem;
gps_imcu.last_3dfix_time = sys_time.nb_sec;
}

AbiSendMsgGPS(GPS_IMCU_ID, now_ts, &gps_imcu);
break;
}
Expand Down

0 comments on commit ecfdf89

Please sign in to comment.