eDosStationFull/TestEPD3Dll/Program.cs
2026-08-18 12:15:26 +02:00

83 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestEPD3Dll
{
class Program
{
static void Main(string[] args)
{
DateTime jan1970 = new DateTime(1970, 1, 1);
var snow = (DateTime.Now - jan1970).TotalSeconds;
DateTime dt2 = DateTime.Now.AddSeconds(-254246887);
//254245176
#pragma warning disable CS0168 // The variable 'rv' is declared but never used
int rv;
#pragma warning restore CS0168 // The variable 'rv' is declared but never used
MK3.Epd2 x = new MK3.Epd2(3);
rv = x.Connect(false);
if (rv != 0)
{
if (rv == -9) System.Diagnostics.Debug.Write("r_OperationTimeout ");
else System.Diagnostics.Debug.Write($"error {rv} ");
}
else
{
x.ECIn = System.Security.Cryptography.SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes("Administrator"));
System.Diagnostics.Debug.Write("byte EC[] {");
for (int i = 0; i < 32; i++)
System.Diagnostics.Debug.Write($" ,0x{x.ECIn[i]:X2}");
System.Diagnostics.Debug.WriteLine(" };");
//rv= x.SetChirp(5);
//x.SetSettings();
x.ReadDisplay(); // ToDo list
//x.Connect(false);
////var rv = x.SetTime();
//rv = x.GetStatus();
////x.ReadAlarmTresholds();
////rv = x.GetDoses();
//rv = x.SetDeIssued();
//x.Connect(false);
////x.WriteCalibration();
//x.Hp07THDose = 1;
//x.Hp10THDose1 = 2;
//x.Hp10THDose2 = 3;
//x.Hp07RateOn = 4;
//x.Hp07RateOff = 5;
//x.Hp10Rate1On = 6;
//x.Hp10Rate1Off = 7;
//x.Hp10Rate2On = 8;
//x.Hp10Rate2Off = 9;
////x.AlarmDoseHP07N = 11;
////x.AlarmDoseHP101G = 12;
////x.AlarmDoseHP102G = 13;
////x.AlarmRateHP07N = 14;
////x.AlarmRateHP101G = 15;
////x.AlarmRateHP102G = 16;
//x.K3 = 4; x.K4 = 3;
//x.WearerName = "12345678";
//x.WearerID = "12";
//x.SetIssued();
}
}
}
}