Skip to content

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

Closed
wants to merge 2 commits into from
Closed

Hotfixes newcore #59

wants to merge 2 commits into from

Conversation

clodpheasant
Copy link
Collaborator

No description provided.

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)
@github-actions
Copy link

Memory usage change @ 452f497

Board flash % RAM for global variables %
arduino:mbed_nano:nanorp2040connect ❔ -2 - +6 -0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Braccio_Basic
flash
% examples/Braccio_Basic
RAM for global variables
% examples/Braccio_LearnByDoing
flash
% examples/Braccio_LearnByDoing
RAM for global variables
% examples/LCD_Custom_Menu
flash
% examples/LCD_Custom_Menu
RAM for global variables
% examples/LCD_Menu_Joystick
flash
% examples/LCD_Menu_Joystick
RAM for global variables
% examples/LCD_Motors
flash
% examples/LCD_Motors
RAM for global variables
% examples/Tools/Factory_Set_ID_Interactive
flash
% examples/Tools/Factory_Set_ID_Interactive
RAM for global variables
% examples/Tools/Factory_Set_Initial_Servo_Position
flash
% examples/Tools/Factory_Set_Initial_Servo_Position
RAM for global variables
% examples/Tools/Test_Inputs
flash
% examples/Tools/Test_Inputs
RAM for global variables
% examples/Tools/Test_Motor_Angular_Control
flash
% examples/Tools/Test_Motor_Angular_Control
RAM for global variables
% examples/Tools/Test_Motor_Communication
flash
% examples/Tools/Test_Motor_Communication
RAM for global variables
% examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button
flash
% examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button
RAM for global variables
% examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button
flash
% examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button
RAM for global variables
% examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu
flash
% examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu
RAM for global variables
% examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out
flash
% examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out
RAM for global variables
% examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge
flash
% examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge
RAM for global variables
% examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick
flash
% examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick
RAM for global variables
% examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu
flash
% examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu
RAM for global variables
% examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I
flash
% examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I
RAM for global variables
% examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II
flash
% examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II
RAM for global variables
% examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors
flash
% examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors
RAM for global variables
% examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button
flash
% examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button
RAM for global variables
% examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick
flash
% examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick
RAM for global variables
% examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge
flash
% examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge
RAM for global variables
% examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge
flash
% examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge
RAM for global variables
% examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu
flash
% examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu
RAM for global variables
% examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I
flash
% examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I
RAM for global variables
% examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II
flash
% examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II
RAM for global variables
% examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio
flash
% examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio
RAM for global variables
% examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio
flash
% examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio
RAM for global variables
% examples/tutorials/projects/p01-moving-braccio/03_moving_challenge
flash
% examples/tutorials/projects/p01-moving-braccio/03_moving_challenge
RAM for global variables
% examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio
flash
% examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio
RAM for global variables
% examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge
flash
% examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge
RAM for global variables
% examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode
flash
% examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode
RAM for global variables
% examples/tutorials/projects/p03-learning-mode/02_learning_challenge
flash
% examples/tutorials/projects/p03-learning-mode/02_learning_challenge
RAM for global variables
%
arduino:mbed_nano:nanorp2040connect 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 -2 -0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0 6 0.0 0 0.0
Click for full report CSV
Board,examples/Braccio_Basic<br>flash,%,examples/Braccio_Basic<br>RAM for global variables,%,examples/Braccio_LearnByDoing<br>flash,%,examples/Braccio_LearnByDoing<br>RAM for global variables,%,examples/LCD_Custom_Menu<br>flash,%,examples/LCD_Custom_Menu<br>RAM for global variables,%,examples/LCD_Menu_Joystick<br>flash,%,examples/LCD_Menu_Joystick<br>RAM for global variables,%,examples/LCD_Motors<br>flash,%,examples/LCD_Motors<br>RAM for global variables,%,examples/Tools/Factory_Set_ID_Interactive<br>flash,%,examples/Tools/Factory_Set_ID_Interactive<br>RAM for global variables,%,examples/Tools/Factory_Set_Initial_Servo_Position<br>flash,%,examples/Tools/Factory_Set_Initial_Servo_Position<br>RAM for global variables,%,examples/Tools/Test_Inputs<br>flash,%,examples/Tools/Test_Inputs<br>RAM for global variables,%,examples/Tools/Test_Motor_Angular_Control<br>flash,%,examples/Tools/Test_Motor_Angular_Control<br>RAM for global variables,%,examples/Tools/Test_Motor_Communication<br>flash,%,examples/Tools/Test_Motor_Communication<br>RAM for global variables,%,examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button<br>flash,%,examples/tutorials/lessons/01-programming-the-braccio-display/01_creating_a_button<br>RAM for global variables,%,examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button<br>flash,%,examples/tutorials/lessons/01-programming-the-braccio-display/02_designing_the_button<br>RAM for global variables,%,examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu<br>flash,%,examples/tutorials/lessons/01-programming-the-braccio-display/03_creating_a_menu<br>RAM for global variables,%,examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out<br>flash,%,examples/tutorials/lessons/01-programming-the-braccio-display/04_testing_it_out<br>RAM for global variables,%,examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge<br>flash,%,examples/tutorials/lessons/01-programming-the-braccio-display/05_display_challenge<br>RAM for global variables,%,examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick<br>flash,%,examples/tutorials/lessons/02-navigatting-the-display-menu/01_playing_with_the_Joystick<br>RAM for global variables,%,examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu<br>flash,%,examples/tutorials/lessons/02-navigatting-the-display-menu/02_handling_events_in_the_menu<br>RAM for global variables,%,examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I<br>flash,%,examples/tutorials/lessons/02-navigatting-the-display-menu/03_navigate_challenge_I<br>RAM for global variables,%,examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II<br>flash,%,examples/tutorials/lessons/02-navigatting-the-display-menu/04_navigate_challenge_II<br>RAM for global variables,%,examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors<br>flash,%,examples/tutorials/lessons/03-playing-with-the-motors/01_playing_with_the_motors<br>RAM for global variables,%,examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button<br>flash,%,examples/tutorials/lessons/03-playing-with-the-motors/02_selecting_the_motor_with_the_enter_button<br>RAM for global variables,%,examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick<br>flash,%,examples/tutorials/lessons/03-playing-with-the-motors/03_moving_the_motors_with_the_joystick<br>RAM for global variables,%,examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge<br>flash,%,examples/tutorials/lessons/03-playing-with-the-motors/04_servo_motors_challenge<br>RAM for global variables,%,examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge<br>flash,%,examples/tutorials/lessons/04-integration-of-previous-learnings/01_playing_with_a_joint_angle_gauge<br>RAM for global variables,%,examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu<br>flash,%,examples/tutorials/lessons/04-integration-of-previous-learnings/02_selecting_the_motor_in_the_LCD_menu<br>RAM for global variables,%,examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I<br>flash,%,examples/tutorials/lessons/04-integration-of-previous-learnings/03_learnings_challenge_I<br>RAM for global variables,%,examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II<br>flash,%,examples/tutorials/lessons/04-integration-of-previous-learnings/04_learnings_challenge_II<br>RAM for global variables,%,examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio<br>flash,%,examples/tutorials/projects/p01-moving-braccio/01_aligning_braccio<br>RAM for global variables,%,examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio<br>flash,%,examples/tutorials/projects/p01-moving-braccio/02_waving_with_Braccio<br>RAM for global variables,%,examples/tutorials/projects/p01-moving-braccio/03_moving_challenge<br>flash,%,examples/tutorials/projects/p01-moving-braccio/03_moving_challenge<br>RAM for global variables,%,examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio<br>flash,%,examples/tutorials/projects/p02-controlling-braccio-manually/01_controlling_manually_Braccio<br>RAM for global variables,%,examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge<br>flash,%,examples/tutorials/projects/p02-controlling-braccio-manually/02_manual_control_challenge<br>RAM for global variables,%,examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode<br>flash,%,examples/tutorials/projects/p03-learning-mode/01_Braccio_learning_mode<br>RAM for global variables,%,examples/tutorials/projects/p03-learning-mode/02_learning_challenge<br>flash,%,examples/tutorials/projects/p03-learning-mode/02_learning_challenge<br>RAM for global variables,%
arduino:mbed_nano:nanorp2040connect,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,-2,-0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0,6,0.0,0,0.0

@@ -409,6 +409,7 @@ void BraccioClass::lvgl_init()

void BraccioClass::display_thread_func()
{
delay(200);
Copy link
Contributor

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); };
Copy link
Contributor

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 🤷 .

Copy link
Contributor

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"?

@aentinger
Copy link
Contributor

aentinger commented Feb 16, 2022

@facchinm Which new core version? arduino:mbed_nano at 2.9.9 works fine. Please specify in PR title.

@aentinger
Copy link
Contributor

Problems fixed in #59 and #60.

@aentinger aentinger closed this Feb 22, 2022
@per1234 per1234 added conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Feb 22, 2022
@aentinger aentinger deleted the hotfixes_newcore branch February 22, 2022 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants