-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
mysterious code #4705
Comments
I'm not the owner of the ps16dz dimmer driver but he may think you're right ;-) Regarding xsns_05_ds18x20 I was wondering too until you start to search for somethin like
which happen to be present at line 278. The break at 266 will stop the loop. |
Yes could be, but is from my point of view a not good style. But anyhow, I removed the module from the software because I only need a basic version for my sockets and there was only the wireless code bug important to me which you have already fixed now. |
Good catch! |
Sorry if I'm back again, but I asked for 3 code mysteries which one is solved now. The other are still open from my point of view:
if (ps16dz_byte_counter || (!ps16dz_byte_counter && serial_in_byte == 'A')); <------
ps16dz_rx_buffer[ps16dz_byte_counter++] = serial_in_byte;
The semicolon after the id statement lead to the situation that the if statement will never used means the next line will always executed. If this is true I would propose to comment out the if statement to have clean code!
for (ds18x20_sensors = 0; ds18x20_sensors < DS18X20_MAX_SENSORS; ds18x20_sensors) {
^----------
Loop counter are never changed which can led to a endless loop!
The text was updated successfully, but these errors were encountered: