Disable mge-xml.c::convert_deci() that was needed a decade ago #394
Disable mge-xml.c::convert_deci() that was needed a decade ago #394aquette merged 10 commits intonetworkupstools:masterfrom
Conversation
|
I am not too familiar with the XML-capable devices to know how common this problem is, but I don't know if people will think to turn the debug log up to 5 to debug this. What about a one-time log message at Also, we have the GitHub issue URL set in configure.ac, so you could add that to the log message with the |
|
Thanks for the suggestion, trying it out now.... |
aquette
left a comment
There was a problem hiding this comment.
seems good to me.
Few comments for the records:
- the split was in 2007
- 3ph units from MGE went back to Schneider ; as discussed and reported by jim, not sure if the recent units (such as Galaxy Vx) still use XML/PDC... I've asked a friend to see. I've found no DDL for XML, so jim's approach is good.
- 1ph went with Eaton, were we still have XML/PDC, though soon to be set as legacy.
|
As a final round at this "one-line deprecation grown too big", I've made a friendly gesture towards legacy users by offering a configuration toggle to enable the decimation conversion routine at run-time without rebuilding, and tested that it works like advertised (errr, documented) :) |
zykh
left a comment
There was a problem hiding this comment.
Hey, @jimklimov, what just happened (6268006)?
Apart from that, just one observation: why not a simpler VAR_FLAG for do_convert_deci? Then there would be no need to check and store the value, a simple testvar("do_convert_deci") in mge-xml.c's convert_deci() would be enough.
Everything else looks good to me (well, before 6268006).
|
@jimklimov : seconding @zykh in the 2 last comments:
|
|
Yuikes, seems the github web interface fracked something up :\ ETOOMANYREPOS UPDATE: It seems that the web-based conflict resolution (after posting a PR to our project fork) rebased the whole original branch (in github's copy of my repo) over that target branch. Regarding VAR_FLAG : do I understand correctly that it has different semantics from the toggle I've added? Meaning, present in config/CLI with (or without) any value means TRUE always? |
|
Force-flushed back the branch to my latest state from yesterday. |
|
Implemented the suggestion from @zykh so now |
Left the old code in place, commented away. If devices with old NetXML pop up (those which served in XML 10x the measured value), fixes can be applied based on voltage and amps and power (order of magnitude comparison), or perhaps model names and/or firmware versions or release dates, if we get those.
…th debug level 5) so we get reports if deprecation bites anyone in reality
…it once visibly with details like issue tracker URL, and in regular debug messages refer to that line
…) behavior at run-time, with a configuration toggle (documented)
|
(if this PR gets merged before #390, we have to remember to adjust subdriver version number) |
|
Of course, I'd take care of that. Also, github will complain about a merge conflct ;) |
Made a debug level 5 notice for end-users, and bumped subdriver version for clarity.
Note: version bump from 0.26 to 0.28 accounts for another recent PR against this file that bumps it to 0.27.