v 2.22
This commit is contained in:
parent
2f851269bc
commit
6a644e1704
4 changed files with 39 additions and 37 deletions
|
|
@ -1,8 +1,10 @@
|
|||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#pragma unmanaged
|
||||
#include "Epd3Base.h"
|
||||
#include "TimeFunctions.h"
|
||||
#pragma unmanaged
|
||||
#define noDeissueWithClear
|
||||
|
||||
//-102 = permission
|
||||
Epd3Base::Epd3U* current;
|
||||
|
|
@ -163,14 +165,13 @@ void Epd3Base::Epd3U::EndCom()
|
|||
if (CommsInitialized == 1) {
|
||||
if (epdComsHandle != nullptr) {
|
||||
DisCon(0);
|
||||
Dll3RV = CloseReader(epdComsHandle);
|
||||
if (Dll3RV) {
|
||||
rv = 1;
|
||||
}
|
||||
Sleep(1000);
|
||||
//Dll3RV = CloseReader(epdComsHandle); // not necessary if followed by DestroyReaderInterface
|
||||
//if (Dll3RV) {
|
||||
// rv = 1;
|
||||
//}
|
||||
Dll3RV = DestroyReaderInterface(epdComsHandle);
|
||||
if (Dll3RV) {
|
||||
rv = 1;
|
||||
}
|
||||
if (Dll3RV) rv = 1;
|
||||
}
|
||||
}
|
||||
Epd.Id = 0;
|
||||
|
|
@ -1112,32 +1113,35 @@ WORD Epd3Base::Epd3U::DeIssue()
|
|||
if (port == 0) return 0;
|
||||
if (CurrentDeviceID == 0) return 0;
|
||||
|
||||
if (EPDIssued) {
|
||||
|
||||
//ReOpenDev();
|
||||
ErrorStep = 1;
|
||||
r = ClearAlarms();
|
||||
|
||||
#if DeissueWithClear
|
||||
ErrorStep = 2;
|
||||
r = ClearDoses();
|
||||
|
||||
ErrorStep = 1;
|
||||
r = ClearAlarms();
|
||||
|
||||
|
||||
//needed after clear alarms
|
||||
Sleep(2000);
|
||||
#endif
|
||||
|
||||
ErrorStep = 3;
|
||||
if (EPDIssued) {
|
||||
token = BeginDeissueEPD(epdComsHandle, nullptr);
|
||||
r = Commit3(epdComsHandle);
|
||||
if (!r) r = EndDeissueEPD(epdComsHandle, token);
|
||||
if (r)
|
||||
r = 0; // goto error;
|
||||
token = BeginDeissueEPD(epdComsHandle, nullptr);
|
||||
r = Commit3(epdComsHandle);
|
||||
if (!r) r = EndDeissueEPD(epdComsHandle, token);
|
||||
if (r)
|
||||
r = 0;
|
||||
}
|
||||
Sleep(1000);
|
||||
|
||||
ErrorStep = 4;
|
||||
token = BeginEpdOnOff(epdComsHandle, 0, nullptr);
|
||||
r = Commit3(epdComsHandle);
|
||||
if (!r) r = EndEpdOnOff(epdComsHandle, token);
|
||||
if (r)
|
||||
goto error;
|
||||
|
||||
//if (r) goto error;
|
||||
Sleep(1000);
|
||||
ErrorStep = 5;
|
||||
EndCom();
|
||||
|
||||
|
|
@ -1201,6 +1205,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru
|
|||
int r = 0;
|
||||
int step = 0;
|
||||
int tries = 0;
|
||||
UINT16 Control = 0;
|
||||
if (port == 0) return r;
|
||||
|
||||
r = 0;
|
||||
|
|
@ -1209,16 +1214,19 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru
|
|||
if (r) goto error;
|
||||
}
|
||||
|
||||
|
||||
/*if (isMK3) {
|
||||
#if ProtectSession
|
||||
if (isMK3) {
|
||||
Control = EndSessionControl;
|
||||
token = BeginEnableProtectedSession_R3(epdComsHandle, 1, nullptr);
|
||||
r = Commit3(epdComsHandle);
|
||||
r = EndEnableProtectedSession_R3(epdComsHandle, token);
|
||||
if (r != 0)
|
||||
goto error;
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
|
||||
step = 1;
|
||||
r = ReOpenDev();
|
||||
if (!isConnected) r = ReOpenDev();
|
||||
if (r) goto error;
|
||||
|
||||
step = 2;
|
||||
|
|
@ -1261,17 +1269,10 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru
|
|||
if (r)
|
||||
goto error;
|
||||
|
||||
/*if (isMK3) {
|
||||
token = BeginEnableProtectedSession_R3(epdComsHandle, 0, nullptr);
|
||||
r = Commit3(epdComsHandle);
|
||||
r = EndEnableProtectedSession_R3(epdComsHandle, token);
|
||||
if (r)
|
||||
goto error;
|
||||
}*/
|
||||
|
||||
step = 6;
|
||||
if (isMK3) {
|
||||
r = DisCon(EndSessionControl); //stops protected session
|
||||
r = DisCon(Control); //stops protected session if control is EndSessionCOntrol
|
||||
if (r)
|
||||
goto error;
|
||||
}
|
||||
|
|
@ -1519,6 +1520,7 @@ int Epd3Base::Epd3U::WriteConfig(void)
|
|||
r = Commit3(epdComsHandle);
|
||||
r = EndWriteAlarmConfiguration_R3(epdComsHandle, token);
|
||||
}
|
||||
|
||||
//OffModeDisplay
|
||||
if (!r) {
|
||||
dutyCycle = (OffModeDutyCycle)0;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,6 @@ using System.Windows;
|
|||
//2.16 : version with reconnect MK3v2)
|
||||
//2.18 : more tested
|
||||
//2.20 Thermo : workflow bij issue ( en toevoegen time set)
|
||||
|
||||
[assembly: AssemblyVersion("2.21.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.21.0.0")]
|
||||
//2.22 No clear bij deissue.
|
||||
[assembly: AssemblyVersion("2.22.0.0")]
|
||||
[assembly: AssemblyFileVersion("2.22.0.0")]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Thu 08/29/2024 15:25:11.68
|
||||
Fri 08/30/2024 7:24:09.58
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Reference in a new issue