Loading...
Gets the current firmware version of the logger.
out ushort MajorVersion, out byte MinVersion, out byte BranchVersion, out byte FwType
[DllImport("RGUSBdrv.dll", CallingConvention = CallingConvention.Cdecl)] public static extern byte GetFirmwareVersion(out ushort MajorVersion, out byte MinVersion, out byte BranchVersion, out byte FwType);
public static string GetFirmware() { string[] FirmwareReleaseType = new string[4] { "", "A", "B", "RC" }; byte MinVersion, Res, BranchVersion, fwType; ushort MajorVersion; Res = GetFirmwareVersion(out MajorVersion, out MinVersion, out BranchVersion, out fwType); return $"{MajorVersion}.{MinVersion}.{BranchVersion} {FirmwareReleaseType[fwType]}"; } private void btnGetFirmware_Click(object sender, EventArgs e) { if (USBDllComm.Connected) lblGetFirmware.Text = GetFirmware(); }