Skip to content

AP_Scheduler: fixed Example code not working by adding ins.update() #30154

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

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

Conversation

dinhthong
Copy link

The original AP_Scheduler example sketch doesn't work as expected
After debugging I found that: The AP_Scheduler library requires ins.update() else it would be stuck in the scheduler.loop();

@dinhthong
Copy link
Author

dinhthong commented May 25, 2025

@peterbarker I have tested the code. It's finished.
Original code: Nothing is printed out.
My pull request: It prints out messages from scheduler tasks as expected.

I don't know how to resolve failing checks. Could you guide me please.

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

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

Hi @dinhthong,

Since PeterB's approval it looks like a Merge commit has been added. Could you rebase this on master to remove that commit?

@dinhthong
Copy link
Author

I have rebased my commits to master on my Fork.
Do I need to create a new Pull Request again?

@rmackay9
Copy link
Contributor

rmackay9 commented May 26, 2025

As discussed in Discord, maybe try these steps:

First update your "master" branch to match ardupilot's master branch:

  1. git remote add trunk https://github.com/ArduPilot/ardupilot.git
  2. git checkout master
  3. git fetch trunk
  4. git rebase trunk/master
  5. git push

Next rebase your Sche_Test branch off of "master":

  1. git checkout Sche_Test
  2. git rebase origin/master
  3. git push -f

@dinhthong
Copy link
Author

@rmackay9 Thanks for the detailed guide.

In step 5 of "update your master branch to match ArduPilot's master branch" I had to use git push --force instead of git push as it was rejected without --force.

@dinhthong
Copy link
Author

dinhthong commented May 27, 2025

@peterbarker I have made the necessary update. Could you review my change?

peterbarker and others added 23 commits May 30, 2025 09:34
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
these often make their way in when moving from some other printf-style debugging...
returns get_velocity_NED.z if available otherwise falls back to get_vert_pos_rate_D
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
the specs were preventing cacheing
@peterbarker
Copy link
Contributor

@peterbarker I have made the necessary update. Could you review my change?

The example seems to be failing again in here somehow - could you check, please?

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

Successfully merging this pull request may close these issues.