Skip to content
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

Misposition of temperature display between 99.5° and 99.9° #521

Open
ThorLie opened this issue Nov 27, 2024 · 2 comments
Open

Misposition of temperature display between 99.5° and 99.9° #521

ThorLie opened this issue Nov 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ThorLie
Copy link

ThorLie commented Nov 27, 2024

Really minor issue but i noted it several times and is an easy fix.

When heating up to steam temp or cooling down with a flush the temp gets displayed using the function below. 99.999 is used to decide for an offset for temps below 100°. However, the temp gets rounded. I guess 99.5. Therefore, i think the separation should be done at 99.499.

/**
 * @brief Draw the temperature in big font at given position
 */
void displayTemperature(int x, int y) {
    u8g2.setFont(u8g2_font_fub30_tf);

    if (temperature < 99.999) {
        u8g2.setCursor(x + 20, y);
        u8g2.print(temperature, 0);
    }
    else {
        u8g2.setCursor(x, y);
        u8g2.print(temperature, 0);
    }

    u8g2.drawCircle(x + 72, y + 4, 3);
}
@LoQue90 LoQue90 self-assigned this Dec 4, 2024
@LoQue90 LoQue90 added the bug Something isn't working label Dec 4, 2024
@LoQue90
Copy link
Member

LoQue90 commented Dec 4, 2024

thanks for your bug report!
would you mind opening a PR to fix this?

@ThorLie
Copy link
Author

ThorLie commented Dec 7, 2024

i will. just wrote this issue to keep it in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants