AP_UAVCAN: rename macros to avoid conflicts

This commit is contained in:
Andrew Tridgell 2017-05-06 09:43:02 +10:00
parent db64da7856
commit 3018728f50
1 changed files with 2 additions and 2 deletions

View File

@ -78,8 +78,8 @@ static void gnss_fix_cb(const uavcan::ReceivedDataStructure<uavcan::equipment::g
uint64_t epoch_ms = uavcan::UtcTime(msg.gnss_timestamp).toUSec();
epoch_ms /= 1000;
uint64_t gps_ms = epoch_ms - UNIX_OFFSET_MSEC;
state->time_week = (uint16_t)(gps_ms / MSEC_PER_WEEK);
state->time_week_ms = (uint32_t)(gps_ms - (state->time_week) * MSEC_PER_WEEK);
state->time_week = (uint16_t)(gps_ms / AP_MSEC_PER_WEEK);
state->time_week_ms = (uint32_t)(gps_ms - (state->time_week) * AP_MSEC_PER_WEEK);
}
}