eDosStation/TestEPD3Dll/Program.cs

75 lines
2.2 KiB
C#
Raw Normal View History

2022-08-24 11:42:03 +02:00
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
2024-09-04 13:05:16 +02:00
#pragma warning disable CS0168 // The variable 'rv' is declared but never used
2022-08-24 11:42:03 +02:00
int rv;
2024-09-04 13:05:16 +02:00
#pragma warning restore CS0168 // The variable 'rv' is declared but never used
2024-09-05 16:10:29 +02:00
MK3.Epd2 x = new MK3.Epd2(3);
2022-08-24 11:42:03 +02:00
x.Connect(false);
x.ECIn = System.Security.Cryptography.SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes("Administrator"));
2022-09-06 13:08:23 +02:00
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(" };");
2022-08-30 09:10:33 +02:00
//rv= x.SetChirp(5);
2022-09-06 13:08:23 +02:00
2024-05-16 15:56:07 +02:00
2022-09-06 15:44:32 +02:00
//x.SetSettings();
2022-08-24 11:42:03 +02:00
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();
}
}
}