Skip to content

Conversation

ClutchplateDude
Copy link
Member

  • Limited refresh rate of InfoDisplay to:
    • 30fps when not slewing RA or DEC.
    • 5fps when slewing either RA or DEC axis.
    • off when slewing both RA and DEC axes.
  • Ignore DEC Guide pulses when at DEC limits.

Serial handling was blocking until timeout (1s), which made sub 1s guiding near impossible (!).
# Conflicts:
#	src/Mount.cpp
#	src/f_serial.hpp
- Improved Serial command handling (made it less 'blocking'), which should improve general performance
- Guiding now updates RA/DEC coordinates
- Guide pulses are ignored when tracking is disabled (for example, when at the limits)
- Limit InfoDisplay refresh frequency, especially when slewing
- Ignore DEC Guide pulses when at limits
# Conflicts:
#	Changelog.md
#	Version.h
#	src/Mount.cpp
- Disabled Display update when slewing both axes.
@ClutchplateDude ClutchplateDude requested review from julianneswinoga and andre-stefanov and removed request for julianneswinoga April 20, 2025 05:21
@openastrotech-bot
Copy link
Contributor

Looks like your PR has code that needs to be changed in order to meet our coding standards!
Here are your options:

  1. Apply the patch that was generated by the job
    1. Click details under the failing clang-format check
    2. Click the Artifacts dropdown in the top right
    3. Download + unzip the clang-format-diff.patch file into the OpenAstroTracker-Firmware repo
    4. Run git apply clang-format-diff.patch to make the changes
    5. Commit and push up the formatted code
  2. Run clang-format locally
    1. Run the command bash -c 'shopt -s nullglob globstar;GLOBIGNORE=./src/libs/TimerInterrupt/*; for i in ./{.,src/**,unit_tests,boards/**}/*.{c,cpp,h,hpp}; do clang-format -i $i; done'
    2. Commit and push up the formatted code

Copy link
Member

@julianneswinoga julianneswinoga left a comment

Choose a reason for hiding this comment

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

Minor change request

Comment on lines +3254 to +3263
int refreshRateHz = 30;
long now = millis();
if ((slewStatus() & (SLEWING_DEC | SLEWING_RA)) == (SLEWING_DEC | SLEWING_RA))
{
return;
}
else if (isSlewingRAorDEC())
{
refreshRateHz = 5;
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
int refreshRateHz = 30;
long now = millis();
if ((slewStatus() & (SLEWING_DEC | SLEWING_RA)) == (SLEWING_DEC | SLEWING_RA))
{
return;
}
else if (isSlewingRAorDEC())
{
refreshRateHz = 5;
}
int refreshRateHz = 30;
const bool isSlewingRAandDEC = (slewStatus() & (SLEWING_DEC | SLEWING_RA)) == (SLEWING_DEC | SLEWING_RA);
if (isSlewingRAandDEC)
{
return; // Do not update the display
}
else if (isSlewingRAorDEC())
{
refreshRateHz = 5; // Update the display slower
}
const long now = millis();

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.

3 participants