예제 #1
0
/**@brief Function for tracing common data.
 *
 * @param[in]  p_common_data      Pointer to the common data.
 */
static void page_16_data_log(ant_sdm_common_data_t const * p_common_data)
{
#ifdef TRACE_SDM_PAGE_16_ENABLE
    uint64_t distance = ANT_SDM_DISTANCE_RESCALE(p_common_data->distance);
#endif // TRACE_SDM_PAGE_16_ENABLE

    LOG_PAGE16("Distance                         %u.%01u m\n\r",
               (unsigned int)(distance / ANT_SDM_DISTANCE_DISP_PRECISION),
               (unsigned int)(distance % ANT_SDM_DISTANCE_DISP_PRECISION));
    LOG_PAGE16("Strides                          %u\n\r", (unsigned int)p_common_data->strides);
}
예제 #2
0
/**@brief Function for tracing page 1 and common data.
 *
 * @param[in]  p_common_data    Pointer to the common data.
 * @param[in]  p_page_data      Pointer to the page 1 data.
 */
static void page_1_data_log(ant_sdm_page1_data_t const  * p_page_data,
                            ant_sdm_common_data_t const * p_common_data)
{
    uint32_t strides        = p_common_data->strides;
    uint64_t distance       = ANT_SDM_DISTANCE_RESCALE(p_common_data->distance);
    uint16_t update_latency = ANT_SDM_UPDATE_LATENCY_RESCALE(p_page_data->update_latency);
    uint32_t time           = ANT_SDM_TIME_RESCALE(p_page_data->time);

    NRF_LOG_INFO("Update latency                        %u.%03u s",
              update_latency / ANT_SDM_UPDATE_LATENCY_DISP_PRECISION,
              update_latency % ANT_SDM_UPDATE_LATENCY_DISP_PRECISION);
    NRF_LOG_INFO("Time                                  %u.%03u s",
              (unsigned int)(time / ANT_SDM_TIME_DISP_PRECISION),
              (unsigned int)(time % ANT_SDM_TIME_DISP_PRECISION));
    NRF_LOG_INFO("Distance                              %u.%01um ",
              (unsigned int)(distance / ANT_SDM_DISTANCE_DISP_PRECISION),
              (unsigned int)(distance % ANT_SDM_DISTANCE_DISP_PRECISION));
    NRF_LOG_INFO("Strides                               %u", (unsigned int)strides);
}
예제 #3
0
/**@brief Function for tracing page 1 and common data.
 *
 * @param[in]  p_common_data    Pointer to the common data.
 * @param[in]  p_page_data      Pointer to the page 1 data.
 */
static void page_1_data_log(ant_sdm_page1_data_t const  * p_page_data,
                            ant_sdm_common_data_t const * p_common_data)
{
#if (defined TRACE_SDM_PAGE_1_ENABLE) && (defined ENABLE_DEBUG_LOG_SUPPORT)
    uint32_t strides        = p_common_data->strides;
    uint64_t distance       = ANT_SDM_DISTANCE_RESCALE(p_common_data->distance);
    uint16_t update_latency = ANT_SDM_UPDATE_LATENCY_RESCALE(p_page_data->update_latency);
    uint32_t time           = ANT_SDM_TIME_RESCALE(p_page_data->time);
#endif // (defined TRACE_SDM_PAGE_1_ENABLE) && (defined ENABLE_DEBUG_LOG_SUPPORT)

    LOG_PAGE1("Update latency                    %u.%03u s\n\r",
              update_latency / ANT_SDM_UPDATE_LATENCY_DISP_PRECISION,
              update_latency % ANT_SDM_UPDATE_LATENCY_DISP_PRECISION);
    LOG_PAGE1("Time                              %u.%03u s\n\r", 
              (unsigned int)(time / ANT_SDM_TIME_DISP_PRECISION),
              (unsigned int)(time % ANT_SDM_TIME_DISP_PRECISION));
    LOG_PAGE1("Distance                          %u.%01um \n\r",
              (unsigned int)(distance / ANT_SDM_DISTANCE_DISP_PRECISION),
              (unsigned int)(distance % ANT_SDM_DISTANCE_DISP_PRECISION));
    LOG_PAGE1("Strides                           %u\n\r", (unsigned int)strides);
}