I had tried to advertise in TLM format (in temp variable) of eddystone value coming from sensor ssts751 integrated with my devkit but not getting correct. Please suggest me way to rectify it.
I had used i2c communication to get values from temperature sensor.
below is code for updating temperature in advertising mode
static void update_temp(void)
{
float temp; // variable to hold temp reading
temp = *temperature;
NRF_LOG_INFO("\r\n temp : %x ",(temp*256));
int16_t temp_new = (int16_t) (temp*256); // temp convert from int32_t to int16_t
m_tlm.temp[0] = (uint8_t)((temp_new >> 2) & 0xFFUL); // Right-shift by two to remove decimal part
m_tlm.temp[1] = (uint8_t)((temp_new << 6) & 0xFFUL); // Left-shift 6 to get fractional part with 0.25 degrees C resolution
}
value of temperature is getting from main file