Change EmonLibCM to make it easier to switch between emonTx and emonPi

Hi @TrystanLea,

In Aug22, I made a pull request to EmonLibCM to make it easier to switch between emonTx and emonPi (different pin used for W1, which if accidentally flashed to emonPi causes spurious resets) and added DS2438 support. Sadly your new versions don’t include this pull request.

They still appear to merge without errors, however the EmonLibCM repo appears to have changed the source code formatting making the diff horrendous. A causal look confirms they are still the same, with a minor change to #define the W1_PIN and add DS2438 support (which I believe made it into the normal emonpi firmware an age ago).

Can you take a look and see if it’s something you’d want to merge ?

The main benefit is supporting the iButtonLink temp sensors here:

(and any temp sensor based on DS2438 )

Thanks,
Alan

[edit - mod]
Split as unrelated to parent topic.

I suggest you redo the PR from a new base so the diff is clear.

Thanks @alandpearson apologies for not getting back to you on this. If you could redo the PR from a new base that would be much appreciated. In principle it sounds like a good thing to include. Im away this week so wont get a change to test or look at this in detail so no rush on my part.

Thanks Trystan and Brian.
I’ll try to get it done in the next week or so, and thanks for being willing to merge.

better late than never