Skip to content

Commit

Permalink
Increase Sensor.ReadingRangeMax to float64 (#362)
Browse files Browse the repository at this point in the history
This property has been found to require the larger type with some
implementations. This may require some consumers to update their
expected return type, but prevents an JSON unmarshalling error when
reading the values from the system.

Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis authored Sep 26, 2024
1 parent 934e39a commit c4e76fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion redfish/sensor.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ type Sensor struct {
// The basis for the reading of this sensor.
ReadingBasis ReadingBasisType
// The maximum possible value for this sensor.
ReadingRangeMax float32
ReadingRangeMax float64
// The minimum possible value for this sensor.
ReadingRangeMin float32
// The date and time that the reading was acquired from the sensor.
Expand Down
2 changes: 1 addition & 1 deletion redfish/sensor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var sensorBody = strings.NewReader(
"Reading": 31.6,
"ReadingUnits": "C",
"ReadingRangeMin": 0,
"ReadingRangeMax": 70,
"ReadingRangeMax": 1.7976931348623157e+308,
"Accuracy": 0.25,
"Precision": 1,
"SensingInterval": "PT3S",
Expand Down

0 comments on commit c4e76fb

Please sign in to comment.