Skip to content

Commit 01baab8

Browse files
Lint fixes
1 parent 3e90292 commit 01baab8

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/DayTime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const char *DayTime::ToString() const
238238
*p++ = '0' + (secs / 10);
239239
}
240240

241-
*p++ = '0' + (secs % 10);
241+
*p++ = '0' + (secs % 10);
242242
size_t used = p - achBuf;
243243
snprintf(p, sizeof(achBuf) - used, " (%.5f)", this->getTotalHours());
244244
return achBuf;

src/Declination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const char *Declination::ToString() const
8484
{
8585
ToDisplayString('*', ':');
8686

87-
size_t used = strlen(achBufDeg);
87+
size_t used = strlen(achBufDeg);
8888
float displayVal = inNorthernHemisphere ? 90 - fabsf(getTotalHours()) : -90 + fabsf(getTotalHours());
8989
snprintf(achBufDeg + used, sizeof(achBufDeg) - used, " (%.4f, %.4f)", displayVal, getTotalHours());
9090

src/Mount.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,8 @@ void Mount::startSlewing(int direction)
25902590
setStatusFlag(STATUS_SLEWING);
25912591
}
25922592

2593-
const float trackedHours = (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F) : 0.0F; // steps / steps/s / 3600 = hours
2593+
const float trackedHours = (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F)
2594+
: 0.0F; // steps / steps/s / 3600 = hours
25942595
if (direction & EAST)
25952596
{
25962597
// We need to subtract the distance tracked from the physical RA home coordinate
@@ -3589,7 +3590,8 @@ void Mount::calculateRAandDECSteppers(long &targetRASteps, long &targetDECSteps,
35893590
LOG(DEBUG_COORD_CALC, "[MOUNT]: CalcSteppersIn: moveRA (target) is %f", moveRA);
35903591

35913592
// Total hours of tracking-to-date
3592-
float trackedHours = (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F) : 0.0F; // steps / steps/s / 3600 = hours
3593+
float trackedHours
3594+
= (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F) : 0.0F; // steps / steps/s / 3600 = hours
35933595
LOG(DEBUG_COORD_CALC, "[MOUNT]: CalcSteppersIn: Tracked time is %l steps (%f h).", _stepperTRK->currentPosition(), trackedHours);
35943596

35953597
// The current RA of the home position, taking tracking-to-date into account
@@ -4284,9 +4286,10 @@ void Mount::testUART_vactual(TMC2209Stepper *driver, int _speed, int _duration)
42844286
/////////////////////////////////
42854287
float Mount::checkRALimit()
42864288
{
4287-
const float trackedHours = (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F) : 0.0F; // steps / steps/s / 3600 = hours
4288-
const float homeRA = _zeroPosRA.getTotalHours() + trackedHours;
4289-
const float RALimit = RA_TRACKING_LIMIT;
4289+
const float trackedHours
4290+
= (_trackingSpeed > 0) ? ((_stepperTRK->currentPosition() / _trackingSpeed) / 3600.0F) : 0.0F; // steps / steps/s / 3600 = hours
4291+
const float homeRA = _zeroPosRA.getTotalHours() + trackedHours;
4292+
const float RALimit = RA_TRACKING_LIMIT;
42904293
LOG(DEBUG_MOUNT_VERBOSE,
42914294
"[MOUNT]: checkRALimit: homeRA: %f (ZeroPos: %f + TrkHrs: %f)",
42924295
homeRA,

0 commit comments

Comments
 (0)