public MainV2() { instance = this; comPort = new MAVLinkInterface(); comPort.BaseStream = new Comms.UdpSerial(); Comports.Add(comPort); }
static bool ValidatePassword(string pw) { byte[] ans = Password.GenerateSaltedHash(UTF8Encoding.UTF8.GetBytes(pw), new byte[] { (byte)'M', (byte)'P' }); if (Password.CompareByteArrays(ans, Convert.FromBase64String(MainV2.getConfig("password")))) { return(true); } return(false); }
static MainV2() { instance = new MainV2(); }