You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix bug in GridFrequency quantity conversion (#807)
This is a follow-up to #804.
The sample value can also be `None`, in which case we can't access to
`sample.value.base_value`. In that case we just cast the existing sample
as it doesn't matter which type the value has when it is `None`,
avoiding the extra copying.
I discovered this bug while implementing a solution for #806. Which kind
of proves it is a worthy pursue...
Also fixes#831.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,13 @@
57
57
## Bug Fixes
58
58
59
59
-0W power requests are now not adjusted to exclusion bounds by the `PowerManager`and`PowerDistributor`, and are sent over to the microgrid API directly.
60
-
- Fixed that `microgrid.frequency()` was sending `Quantity` objects instead of `Frequency`.
60
+
61
+
-`microgrid.frequency()`/`GridFrequency`:
62
+
63
+
* Fix sent samples to use `Frequency` objects instead of raw `Quantity`.
64
+
* Handle `None` values in the received samples properly.
65
+
* Convert `nan` values in the received samples to `None`.
66
+
61
67
- The resampler now properly handles sending zero values.
62
68
63
69
A bug made the resampler interpret zero values as`None` when generating new samples, so if the result of the resampling is zero, the resampler would just produce `None` values.
0 commit comments