Enhance handling sensor value property type change
From comments resulting in change
https://gerrit.openbmc-project.xyz/29187, simplified the check that both
the type configured and type of the sensor value property are the same
along with doing an assert when the type configured does not match the
supported types of the sensor value property.
A static_assert was not able to be performed within the visitor due to
the type supported by the variant parameter and that the fan
configuration also provides the data type for the properties. Since all
properties configured to be used are ran thru this function, a
static_assert would cause those to fail to compile. This is the best
solution found until the type is removed from being provided in the
configuration.
Tested:
Configured sensor value property to an unsupported type causing an
assert
No change to a sensor value being configured as an int with the dbus
interface being int or double
No change to a sensor value being configured as a double with the
dbus interface being a double
Change-Id: I37955fd60ed23c9d6d198cdce22008258cc00014
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
1 file changed