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

Bugfix/maxou/fix timeout serial #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pinkymaxou
Copy link

@pinkymaxou pinkymaxou commented Mar 14, 2023

Bug fix, the delay doesn't work

There were a bug where the timeout is not respected, causing it to not work in some situation.
This line:
vTaskDelay(1 / portTICK_PERIOD_MS);
If FreeRTOS is set lower than 1000 HZ (1 ms per tick) it cause the calculation to return 0 so it doesn't have any meaningful delay.
Now it does with this fix.
If FreeRTOS is set a 100 HZ (10 ms per tick) with 1000 ms timeout, the loop will operate 100 times and create 100x10ms delay.

See: #4

Prescribed delay is not sufficient

I needed more than 8s to erase flash memory on my microcontroller so 5s is insufficient. Especially if the micro is not a new one.

Header too big to parse

Some modern browser have a tendency to produce ridiculously big HTTP GET header, I increased the webserver buffer size to repair this.

@pinkymaxou pinkymaxou mentioned this pull request Mar 14, 2023
@pinkymaxou
Copy link
Author

Can you please accept it so I can put this behind me :(

@@ -245,14 +245,21 @@ int waitForSerialData(int dataCount, int timeout)
{
int timer = 0;
int length = 0;
while (timer < timeout)

int ticks = pdMS_TO_TICKS(timeout);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laukik-hase is this method available in the IDF version we used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants