tbnobody / OpenDTU

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters
GNU General Public License v2.0
1.69k stars 471 forks source link

NFC: Includes list: Remove unneeded PinMapping.h #2022

Closed StefanOberhumer closed 3 weeks ago

StefanOberhumer commented 1 month ago

Also: Sort include directives by name.

tbnobody commented 1 month ago

The Pinmapping.h can be removed, thats true. But the ordering is correct. The first include in the cpp file is always the corresponding header file (with the same name of the cpp file).

StefanOberhumer commented 1 month ago

... But the ordering is correct. The first ....

Ah - OK! I usually include all of the "standards" (#include < xx >) first! Then the project related includes. (#include " xx ") Sorted all by names. But thinking about ... Your approach makes more sense ! :+1:

Will adapt ...

tbnobody commented 1 month ago

I've set the auto formatter style to WebKit. It sorts the corresponding header file at the first position followed by project specific headers and at least the global headers. Thats the style for all the header files.

StefanOberhumer commented 1 month ago

The now diff says: I just removed the unneeded '#include PinMapping.h', changed a comment and added an empty line!

Based on your explanation: That result should match the project requirements.

Btw: THX having comprehensible/explicable project settings/requirements :+1:

tbnobody commented 1 month ago

Thank you and sorry for the nagging. I will include the PR in the next release.