-
Notifications
You must be signed in to change notification settings - Fork 3
Hotfixes newcore #59
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
Hotfixes newcore #59
Conversation
Due to the ping() thread running every second and the forced delays between operations (500ms), the target was often timing-out before reaching the last step. Increasing to 5 seconds doesn't seem to harm any operation.
Give some time to the underlying layer to prepare the splash before trying to access it Better fix: use a semaphore TODO: there could be similar use cases when the resources that must be displayed are not yet ready. Reason: cores 2.7.x like to crash on lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br)
Memory usage change @ 452f497
Click for full report table
Click for full report CSV
|
@@ -409,6 +409,7 @@ void BraccioClass::lvgl_init() | |||
|
|||
void BraccioClass::display_thread_func() | |||
{ | |||
delay(200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which underlying ressources would not be ready? What would be lv_fs_read
be needed for? To my knowledge the LVGL filesystem is not used, the GIF for the splash screen is a binary array stored in flash. What's the callstack when lv_fs_read
fails?
@@ -49,7 +49,7 @@ static std::array<InitialServoPosition, 6> const INITIAL_SERVO_POSITION = | |||
|
|||
bool set_initial_servo_position(int const id, float const target_angle) | |||
{ | |||
auto isTimeout = [](unsigned long const start) -> bool { return ((millis() - start) > 2000); }; | |||
auto isTimeout = [](unsigned long const start) -> bool { return ((millis() - start) > 5000); }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't harm any operation, you just have to wait longer in case something does indeed time out 🤷 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Come to think of it, you are miss reading the code. The timeout function is only applied for 2 individual steps. This means that the timeout is not for the whole function but only for those two steps. Consequently the delay(500);
is not negatively effecting the timeout.
Can we please go back to assessing a root cause before throwing around random "hot fixes"?
@facchinm Which new core version? |
No description provided.