mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-12 02:48:28 -04:00
37 lines
670 B
C#
37 lines
670 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
|
|||
|
namespace ArdupilotMega
|
|||
|
{
|
|||
|
public class Script
|
|||
|
{
|
|||
|
DateTime timeout = DateTime.Now;
|
|||
|
|
|||
|
public enum Conditional
|
|||
|
{
|
|||
|
LT = 0,
|
|||
|
LTEQ,
|
|||
|
EQ,
|
|||
|
GT,
|
|||
|
GTEQ
|
|||
|
}
|
|||
|
|
|||
|
public bool WaitFor(string item, Conditional cond,double value ,int timeoutms)
|
|||
|
{
|
|||
|
timeout = DateTime.Now;
|
|||
|
while (DateTime.Now < timeout.AddMilliseconds(timeoutms))
|
|||
|
{
|
|||
|
//if (item)
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|