You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
670 B
37 lines
670 B
13 years ago
|
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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|