Skip to contentSkip to conversation

Sensor value is not accurate which is generated by phosphor-hwmon

DISCUSSION Duke Du (杜祥嘉) 2 participants 4 messages Jul 7, 2020 – Jul 9, 2020

lore
Share & tools
lore
#0 lore raw

Hi All,
I found sensor value type is changed to double in
xyz/openbmc_project/Sensor/Value.interface.yaml, after this change, the sensor value on the interface xyz.openbmc_project.Sensor.Value which is generated by phosphor-hwmon is not accurate, for example, 0.99 volts would be record 0 volts on the interface. Do I miss some configuration for phosphor-hwmon ?

Sensor value type is changed to double, which commit is :
4ec6587fa908fe9df41cc0962ab6ff6446fbd54f
https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa908fe9df41cc0962ab6ff6446fbd54f

Thanks.
Duke Du

#1 lore raw
Quoted 9 lines · Duke Du (杜祥嘉)

Hi All,

  I found sensor value type is changed to double in

xyz/openbmc_project/Sensor/Value.interface.yaml,

after this change, the sensor value on the interface

Quoted 8 lines

xyz.openbmc_project.Sensor.Value which is generated by

phosphor-hwmon is not accurate, for example, 0.99 volts

would be record 0 volts on the interface. Do I miss some

configuration for phosphor-hwmon ?

Looks like that is indeed a problem.  I haven't looked closely yet, but I wonder if how the code is attempting to support Sensor.Value as both an int64 and a double at the same time has an issue.

Maybe now would be a good time to just support the double version. I can take a look.

Quoted 9 lines

Sensor value type is changed to double, which commit is :

4ec6587fa908fe9df41cc0962ab6ff6446fbd54f
https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa908fe9df41cc0962ab6ff6446fbd54f

Thanks.

Duke Du

#2 lore raw
Quoted 21 lines · Matt Spinler
Quoted 9 lines · Duke Du (杜祥嘉)

Hi All,

  I found sensor value type is changed to double in

xyz/openbmc_project/Sensor/Value.interface.yaml,

after this change, the sensor value on the interface

Quoted 8 lines

xyz.openbmc_project.Sensor.Value which is generated by

phosphor-hwmon is not accurate, for example, 0.99 volts

would be record 0 volts on the interface. Do I miss some

configuration for phosphor-hwmon ?

Quoted 6 lines

Looks like that is indeed a problem.  I haven't looked closely yet, but I wonder if how the code is attempting to support Sensor.Value as both an int64 and a double at the same time has an issue.

Maybe now would be a good time to just support the double version. I can take a look.

https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/34481

Quoted 12 lines
Quoted 11 lines

Sensor value type is changed to double, which commit is :

4ec6587fa908fe9df41cc0962ab6ff6446fbd54f
https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa908fe9df41cc0962ab6ff6446fbd54f

Thanks.

Duke Du

#3 lore raw

Hi Matt,

Sorry for late, I will try this commit in our project, it looks good to me, thanks for your help.

thanks
Duke

Quoted 57 lines

-----Original Message-----
From: Matt Spinler <[email protected]>
Sent: Thursday, July 9, 2020 2:38 AM
To: Duke Du (杜祥嘉) <[email protected]>; [email protected]
Cc: Eddie Lu (陸宇岡) <[email protected]>; Fran Hsu (徐誌謙) <[email protected]>; George Hung (洪忠敬) <[email protected]>
Subject: Re: Sensor value is not accurate which is generated by phosphor-hwmon

Quoted 21 lines · Matt Spinler
Quoted 9 lines · Duke Du (杜祥嘉)

Hi All,

  I found sensor value type is changed to double in

xyz/openbmc_project/Sensor/Value.interface.yaml,

after this change, the sensor value on the interface

Quoted 8 lines

xyz.openbmc_project.Sensor.Value which is generated by

phosphor-hwmon is not accurate, for example, 0.99 volts

would be record 0 volts on the interface. Do I miss some

configuration for phosphor-hwmon ?

Quoted 6 lines

Looks like that is indeed a problem.  I haven't looked closely yet, but I wonder if how the code is attempting to support Sensor.Value as both an int64 and a double at the same time has an issue.

Maybe now would be a good time to just support the double version. I can take a look.

https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-hwmon/+/34481

Quoted 5 lines
Quoted 5 lines

Sensor value type is changed to double, which commit is :

4ec6587fa908fe9df41cc0962ab6ff6446fbd54f

https://github.com/openbmc/phosphor-dbus-interfaces/commit/4ec6587fa9

Quoted 8 lines
Quoted 7 lines

08fe9df41cc0962ab6ff6446fbd54f

Thanks.

Duke Du