First message from ANT sensor ?

Dear Members,

Can we do this to capture the first message from ANT transmitter ?

void ant_bsc_disp_evt_handler(ant_evt_t * p_ant_evt, void * p_context)
{
    ant_bsc_profile_t * p_profile = (ant_bsc_profile_t *)p_context;
    NRF_LOG_INFO("ant_bsc_disp_evt_handler\r\n"); 
    if (p_ant_evt->channel == p_profile->channel_number)
    {
        switch (p_ant_evt->event)
        {
            case EVENT_RX:
                if (p_ant_evt->message.ANT_MESSAGE_ucMesgID == SEQUENCE_FIRST_MESSAGE)
								 {
								   1st message;
								 }

Kind regards,

Rixtronix LAB

Parents
  • Can we do this to capture the first message from ANT transmitter ?

    Yes, this will be the first burst message.

  • Hi Sigurd,

    Thanks for the reply,

    How can we use these define :

    // ////////////////////////////////////////////
    /** @name Rx Burst Message Sequencing Defines
     *  @{ */
    // ////////////////////////////////////////////
    #define CHANNEL_NUMBER_MASK                        ((uint8_t)0x1F) ///< Valid bitfields for channel number
    #define SEQUENCE_NUMBER_MASK                       ((uint8_t)0xE0) ///< Valid bitfields for burst sequence
    #define SEQUENCE_NUMBER_ROLLOVER                   ((uint8_t)0x60) ///< Sequence rollover
    #define SEQUENCE_FIRST_MESSAGE                     ((uint8_t)0x00) ///< Sequence indicating first burst message
    #define SEQUENCE_LAST_MESSAGE                      ((uint8_t)0x80) ///< Sequence indicating last burst message
    #define SEQUENCE_NUMBER_INC                        ((uint8_t)0x20) ///< Incremental sequence value
    /** @} */

    Line 250

    E:\nRF5_SDK_17.0.2_d674dde\components\softdevice\SoftDevice\headers\include\ant_parameters.h

    Kind regards,

    Rixtronix LAB

Reply
  • Hi Sigurd,

    Thanks for the reply,

    How can we use these define :

    // ////////////////////////////////////////////
    /** @name Rx Burst Message Sequencing Defines
     *  @{ */
    // ////////////////////////////////////////////
    #define CHANNEL_NUMBER_MASK                        ((uint8_t)0x1F) ///< Valid bitfields for channel number
    #define SEQUENCE_NUMBER_MASK                       ((uint8_t)0xE0) ///< Valid bitfields for burst sequence
    #define SEQUENCE_NUMBER_ROLLOVER                   ((uint8_t)0x60) ///< Sequence rollover
    #define SEQUENCE_FIRST_MESSAGE                     ((uint8_t)0x00) ///< Sequence indicating first burst message
    #define SEQUENCE_LAST_MESSAGE                      ((uint8_t)0x80) ///< Sequence indicating last burst message
    #define SEQUENCE_NUMBER_INC                        ((uint8_t)0x20) ///< Incremental sequence value
    /** @} */

    Line 250

    E:\nRF5_SDK_17.0.2_d674dde\components\softdevice\SoftDevice\headers\include\ant_parameters.h

    Kind regards,

    Rixtronix LAB

Children
No Data
Related