For DPS310 pressure sensor, to convert pressure unit from pascal to hectopascal, the pressure value has to be divided by 10^2. For example, from driver side, if we send 932.34 hPa (after conversion), the application retrieves it as 93234 hPa (without decimal). If we send the pressure in Pa value divided by 10^5, only then the application retrieves it as 932.34 hPa (as expected). Can someone reach out to this?
you clearly have some kind of data type or unit conversion problem. careful review of all declarations and interface contracts is how to find a problem like this. Code snips without the declarations and links to large documents don’t help much. But on thing to consider is an expression like this
I spend most of my time reviewing code written by others and this is the sort of thing that I routinely insist is rewritten. Not because it produces the wrong result necessarily, but because it requires a detailed analysis of the operator associativity and precedence of each part to determine exactly what it means. And an equivalent sequence that is unambiguous will produce the same machine code.
please feel free to ignore my ranting on this point