private static TLIMIT_STATUS Limits_Detect() { TLIMIT_STATUS result = new TLIMIT_STATUS(); object oLangDll = null; object[] EQ_Beep = null; object HC = null; double Alt = 0; bool LimitDetected = false; result.LimitDetected = false; result.Horizon = false; result.RA = false; // Routine to handle RA LIMIT processing if ((EQMath.gRA_Limit_East != 0) && (EQMath.gEmulRA < EQMath.gRAEncoder_Zero_pos)) { if (EQMath.gEmulRA < EQMath.gRA_Limit_East) { if (gAutoFlipEnabled) { switch (AutoFlipState) { case 0: //we've hit the RA limit so initiate autoflip! Goto.gTargetRA = EQMath.gRA; Goto.gTargetDec = EQMath.gDec; //UPGRADE_TODO: (1067) Member GetLangString is not defined in type Variant. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1067 //UPGRADE_TODO: (1067) Member Add_Message is not defined in type Variant. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1067 HC.Add_Message("CoordSlew: " + Convert.ToString(oLangDll.GetLangString(105)) + "[ " + EQMath.FmtSexa(Goto.gTargetRA, false) + " ] " + Convert.ToString(oLangDll.GetLangString(106)) + "[ " + EQMath.FmtSexa(Goto.gTargetDec, true) + " ]"); Goto.gSlewCount = Goto.gMaxSlewCount; //NUM_SLEW_RETRIES 'Set initial iterative slew count object tempAuxVar = EQ_Beep[2]; Goto.radecAsyncSlew(Goto.gGotoRate); AutoFlipState = 1; break; default: break; } } else { result.RA = true; } goto endsub; } else { AutoFlipState = 0; } } if ((EQMath.gRA_Limit_West != 0) && (EQMath.gEmulRA > EQMath.gRAEncoder_Zero_pos)) { if (EQMath.gEmulRA > EQMath.gRA_Limit_West) { if (gAutoFlipEnabled) { switch (AutoFlipState) { case 0: //we've hit the RA limit so initiate autoflip! Goto.gTargetRA = EQMath.gRA; Goto.gTargetDec = EQMath.gDec; //UPGRADE_TODO: (1067) Member GetLangString is not defined in type Variant. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1067 //UPGRADE_TODO: (1067) Member Add_Message is not defined in type Variant. More Information: https://www.mobilize.net/vbtonet/ewis/ewi1067 HC.Add_Message("CoordSlew: " + Convert.ToString(oLangDll.GetLangString(105)) + "[ " + EQMath.FmtSexa(Goto.gTargetRA, false) + " ] " + Convert.ToString(oLangDll.GetLangString(106)) + "[ " + EQMath.FmtSexa(Goto.gTargetDec, true) + " ]"); Goto.gSlewCount = Goto.gMaxSlewCount; //NUM_SLEW_RETRIES 'Set initial iterative slew count object tempAuxVar2 = EQ_Beep[2]; Goto.radecAsyncSlew(Goto.gGotoRate); AutoFlipState = 1; break; default: break; } } else { result.RA = true; } goto endsub; } else { AutoFlipState = 0; } } endsub: // get altitude limit for current azimuth if (!gSupressHorizonLimits) { if (EQMath.gAlt <= LimitArray2[Convert.ToInt32(EQMath.gAz)].Alt) { result.Horizon = true; } } else { result.Horizon = false; } result.LimitDetected = result.Horizon || result.RA; return(result); }