Skip to content

Commit 8b6d61f

Browse files
Update src/Mount.cpp
Co-authored-by: Julianne Swinoga <julianneswinoga@gmail.com>
1 parent 2911e31 commit 8b6d61f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Mount.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,15 +3252,16 @@ void Mount::updateInfoDisplay()
32523252
// timeout, causing ASCOM errors.
32533253
// We will update at 30Hz when idle, 5Hz when slewing one axis and skip updates when slewing both.
32543254
int refreshRateHz = 30;
3255-
long now = millis();
3256-
if ((slewStatus() & (SLEWING_DEC | SLEWING_RA)) == (SLEWING_DEC | SLEWING_RA))
3255+
const bool isSlewingRAandDEC = (slewStatus() & (SLEWING_DEC | SLEWING_RA)) == (SLEWING_DEC | SLEWING_RA);
3256+
if (isSlewingRAandDEC)
32573257
{
3258-
return;
3258+
return; // Do not update the display
32593259
}
32603260
else if (isSlewingRAorDEC())
32613261
{
3262-
refreshRateHz = 5;
3262+
refreshRateHz = 5; // Update the display slower
32633263
}
3264+
const long now = millis();
32643265

32653266
if (now - _lastInfoUpdate > (1000 / refreshRateHz))
32663267
{

0 commit comments

Comments
 (0)