espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.71k stars 7.3k forks source link

I don't believe this line is correct in the RGB LCD driver (IDFGH-12882) #13844

Open kdschlosser opened 5 months ago

kdschlosser commented 5 months ago

Answers checklist.

General issue report

assert((x_start < x_end) && (y_start < y_end) && "start position must be smaller than end position");

It's the only assert in the source file for the RGB LCD panel driver.

I believe it should be

    ESP_RETURN_ON_FALSE((x_start < x_end) && (y_start < y_end), ESP_ERR_INVALID_ARG, TAG, "start position must be smaller than end position");

I checked 5.0.x and also 5.2.x and the assert is there in both of them. While this isn't necessarily a bug it doesn't fall into the realm of the code working the way someone thought it should.

suda-morris commented 5 months ago

Hi @kdschlosser yes, return an error code is better. The "fix" was merged in this commit: https://github.com/espressif/esp-idf/commit/4b67df323d8f3291a9a52f270c10c4b19b19e18d

kdschlosser commented 5 months ago

Thanks