extract_n_values_array used Enum.take(count) on a reversed list before reversing it, which included padding values from byte alignment and dropped actual values. When group count * bits wasn't a multiple of 8, the extra padding bits produced a phantom value that shifted the entire array by one position. This caused cascading errors in spatial differencing — values started correct but diverged exponentially (DPT decoded as 38 billion K instead of 275 K). Fix: reverse the list first, then take count, so padding values at the end are discarded instead of actual values at the start. |
||
|---|---|---|
| .. | ||
| microwaveprop | ||
| microwaveprop_web | ||
| microwaveprop.ex | ||
| microwaveprop_web.ex | ||