Skip to content

Commit

Permalink
Fix AddTrackMode as it was reseting vector to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed Aug 30, 2024
1 parent 06f05d5 commit af62056
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions libs/indibase/inditelescope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1689,14 +1689,9 @@ bool Telescope::SetTrackEnabled(bool enabled)

int Telescope::AddTrackMode(const char *name, const char *label, bool isDefault)
{
TrackModeSP.resize(0);
INDI::WidgetSwitch node;
node.fill(name, label, isDefault ? ISS_ON : ISS_OFF);
TrackModeSP.push(std::move(node));

TrackModeSP.shrink_to_fit();
TrackModeSP.fill(getDeviceName(), name, label, MAIN_CONTROL_TAB, IP_RW, ISR_ATMOST1, 60, IPS_IDLE);

return (TrackModeSP.count() - 1);
}

Expand Down

0 comments on commit af62056

Please sign in to comment.