-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Code Checks and syncronizing PTC with DxCore #1179
Conversation
I think you removed a bit too much. I'm not sure however if you want to remove any Dx-Related stuff from the Wire library or just the TWI1. Also some lingering changes in the PTC library propetries
Was trying to fix the invalid inequalities cited here: #1169 |
Namely this construction:
This is the same as
which is
Since 1 is never equal to 0 or 0x10, that test is always false. |
I think it should be fine to leave TWI1 out of twi_pins.c here. Maybe it would be even worth for readability to have seperate twi_pins.c for Dx and mTC? |
Why do you keep mentioning TWI1? I think we are talking past eachother. I accidentally removed more than I intended (and put it back when you pointed this out), but the problem never had a thing to do with TWI1 other than that a mistake in the configuration of my text editor left the whole thing looking commented out so I thought it was not being compiled. But that's unrelated to the actual problem which I was investigating, which was caused by
which can never be true. |
I'm confiused. I've written my last comment here 4 days ago and haven't posted anything since. And the first time you mention the problem with the editor was 2 days ago in another issue thread... Anyway, what should I do with this PR now? |
Okay I am totally confused too... I don't even know what would happen if I merged this and what it would break. I swear we were talkingh about this weeks ago. But fuck, man I swear about all kinds of shit so that don't mean shit... I any event, due to this issue, there is now a BAN on the following constructions:
and
Until or unlesss I am given a very convincing explanation of how that does anything except promote buggy, confusing to read code, the following protocols regarding this construction are in effect. Seriously, I was RIPSHIT when I discovered how that anti-pattern behaved in C. Honestly precidence of the that it had made it into the repo. It caused my skin to break out in a rash, the skies rained red with the blood of the innocent, and worst of all, it made my cat hawk up a hairball in the middle of the bedroom floor. This is, imo, among the ten worst C syntaxes Three protocols are being implemented as countermeasures:
|
You know, it's kinda ironic. the reason why I did In any case, based on the "Files Changed" tab, there are no changes in twi_pins.c at this point, except for a new line at the end of the file for the code checking as far as I remember, so it should be fine to merge. I'll rename it though, so it's more clear that this PR changes anything but Wire. |
Thanks!! I was so revolted by how that construction was interpreted by C (like everyone else, I assumed it worked the way any sane reader would expect without pondering C type promotion rules), and by the the severe nature of the bugs introduced, I decided something had to be done. My initial search of the codebase turned up no other blasphemies of this type, but I haven't checked the other cores. I'm only referring to |
Well, the DxCore does have it, but only because it's the same file, so it's inside an #ifedef. A little offtopic, I would really appreciate if you could upgrade to avrdude 8.0 because with that it would be possbile to add the PICkit5, the PICkit4 in PIC mode and SNAP to the list of programmers, the first two even with support for the HV Pulse, |
I think you removed a bit too much. I'm not sure however if you want to remove any Dx-Related stuff from the Wire library or just the TWI1. Also some lingering changes in the PTC library propetries