// Default technique to force a reset on algo parameters is simply to remove the keys from the Registry - a subsequent creation of the algo // class will then use default values for everything. If this is too brute-force for a particular algo, the function can be overridden. // For algos that use a min-move parameter, a smart value will be applied based on image scale void GuideAlgorithm::ResetParams() { wxString configPath = GetConfigPath(); pConfig->Profile.DeleteGroup(configPath); if (GetMinMove() >= 0) SetMinMove(SmartDefaultMinMove()); }
wxString GuideAlgorithmLowpass::GetSettingsSummary() { // return a loggable summary of current mount settings return wxString::Format("Slope weight = %.3f, Minimum move = %.3f\n", GetSlopeWeight(), GetMinMove() ); }
wxString GuideAlgorithmHysteresis::GetSettingsSummary() { // return a loggable summary of current mount settings return wxString::Format("Hysteresis = %.3f, Aggression = %.3f, Minimum move = %.3f\n", GetHysteresis(), GetAggression(), GetMinMove() ); }
bool GuideAlgorithmResistSwitch::GetParam(const wxString& name, double *val) { bool ok = true; if (name == "minMove") *val = GetMinMove(); else if (name == "fastSwitch") *val = GetFastSwitchEnabled() ? 1.0 : 0.0; else if (name == "aggression") *val = GetAggression(); else ok = false; return ok; }
wxString GuideAlgorithmResistSwitch::GetSettingsSummary() { // return a loggable summary of current mount settings return wxString::Format("Minimum move = %.3f Aggression = %.f%% FastSwitch = %s\n", GetMinMove(), GetAggression() * 100.0, GetFastSwitchEnabled() ? "enabled" : "disabled"); }