This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing SensorID and Type during runtime

Dear All,

I can read two different ANT sensors sucessfully with my target system, but initialization of sensors only works first time. When changing sensorIDs of simulator and target during runtime target will not show sensor values anymore.

This is successfully done some time after startup:

   void antChange (void) {
	sd_ant_channel_close(0);
	sd_ant_channel_close(1);
        
        hrm_rx_open(AntSensorConfig.Sensor1.SensorID);
	bicycle_power_init(AntSensorConfig.Sensor2.SensorID);
   }

Is there anything else that should be done prior to establishing a channel link with modified parameters during runtime?

Thanks very much in advance for your advice.

Kind regards, Andreas

Parents
  • Dear All,

    thanks very much for your help. Seems solved.

    Changes to power sensor settings worked fine while HRM did not.

    Comparing code, HRM init additionally was executing: sd_ant_network_address_set(ANTPLUS_NETWORK_NUMBER, m_network_key);

    Setting changes seem to work fine on both sensors after removing network address setting.

    Best regards, Andreas

Reply
  • Dear All,

    thanks very much for your help. Seems solved.

    Changes to power sensor settings worked fine while HRM did not.

    Comparing code, HRM init additionally was executing: sd_ant_network_address_set(ANTPLUS_NETWORK_NUMBER, m_network_key);

    Setting changes seem to work fine on both sensors after removing network address setting.

    Best regards, Andreas

Children
No Data
Related