Also convert RegisterParser to return Err if any expected registers are missing.
This could be improved in future to just return the ones we can work out instead of bailing completely but it's a pretty special edge case so unlikely to be a problem.
The issue is if you pass in a non-standard set of Input registers. Standard would be 0-39, or 40-79 etc.
Non-standard would be 0-7. When this parser sees 7, it will try and calculate p_pv by summing 7 + 8 + 9, but since 8 and 9 aren't present, it can't, so will Err out.
Adding these artificial keys exposes this problem a little more but it was kind of already present with things like e_pv_all which are spread across two registers (40 and 41) anyway, so its not really much worse.
Also convert RegisterParser to return Err if any expected registers are missing.
This could be improved in future to just return the ones we can work out instead of bailing completely but it's a pretty special edge case so unlikely to be a problem.
The issue is if you pass in a non-standard set of Input registers. Standard would be 0-39, or 40-79 etc.
Non-standard would be 0-7. When this parser sees 7, it will try and calculate
p_pv
by summing 7 + 8 + 9, but since 8 and 9 aren't present, it can't, so will Err out.Adding these artificial keys exposes this problem a little more but it was kind of already present with things like
e_pv_all
which are spread across two registers (40 and 41) anyway, so its not really much worse.