enkele writeconfig
This commit is contained in:
parent
e499794db4
commit
5a453f748d
7 changed files with 38 additions and 32 deletions
|
|
@ -871,7 +871,7 @@ WORD Epd3Base::Epd3U::PrepareForIssue()
|
|||
{
|
||||
int rv = 0;
|
||||
if (port == 0) return 0;
|
||||
//rv = WriteConfig();
|
||||
rv = WriteConfig();
|
||||
|
||||
if (DetectorsOn) {
|
||||
token = BeginEpdOnOff(epdComsHandle, 0, nullptr);
|
||||
|
|
@ -1043,16 +1043,18 @@ WORD Epd3Base::Epd3U::WriteWearer() {
|
|||
/// </summary>
|
||||
/// <returns>0 Success</returns>
|
||||
|
||||
WORD Epd3Base::Epd3U::Issue()
|
||||
WORD Epd3Base::Epd3U::Issue(bool PrepareDone)
|
||||
{
|
||||
int r=0;
|
||||
int tries = 0;
|
||||
if (port == 0) return r;
|
||||
|
||||
r = 0;
|
||||
r = PrepareForIssue();
|
||||
if (r != 0)
|
||||
goto error;
|
||||
if (!PrepareDone) {
|
||||
r = PrepareForIssue();
|
||||
if (r != 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*if (isMK3) {
|
||||
token = BeginEnableProtectedSession_R3(epdComsHandle, 1, nullptr);
|
||||
|
|
@ -1218,7 +1220,7 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain,float ChirpRate)
|
|||
}
|
||||
SetChirp( ChirpRate);
|
||||
rv = PrepareForIssue();
|
||||
if (!rv) rv = Issue(); // data already loaded
|
||||
if (!rv) rv = Issue(true); // data already loaded
|
||||
return rv;
|
||||
error:
|
||||
return rv;
|
||||
|
|
@ -1253,15 +1255,15 @@ int Epd3Base::Epd3U::WriteConfig(void)
|
|||
//Unmanaged%20HtmlFiles/_display_ids.html
|
||||
numItems = 9;
|
||||
enables = new DisplayAttributeMap_t[9]{
|
||||
{ 0,0x7FFF,0xFFFF },
|
||||
{ 1,0x7FFF,0xFFE1 },
|
||||
{ 2,0x7FFF,0xFEFF },
|
||||
{ 3,0x7FFF,0xFEFF },
|
||||
{ 4,0x7FFF,0xFE01 },
|
||||
{ 5,0x7FFF,0xFF89 },
|
||||
{ 6,0x7FFF,0xFFFF },
|
||||
{ 7,0x7FFF,0xFFFB },
|
||||
{ 8,0x7FFF,0xFFFF },
|
||||
{ 0,0x8FFF,0xFFFF },
|
||||
{ 1,0x8FFF,0xFFE1 },
|
||||
{ 2,0x8FFF,0xFE3F },
|
||||
{ 3,0x8FFF,0xFE3F },
|
||||
{ 4,0x8FFF,0xFE01 },
|
||||
{ 5,0x8FFF,0xFF09 },
|
||||
{ 6,0x8FFF,0xFFFD },
|
||||
{ 7,0x8FFF,0xFFC1 },
|
||||
{ 8,0x8FFF,0xFFFF },
|
||||
};
|
||||
// 0x1 Operation Menu Back /0x2 On / Off 0x4 Clear Dose 0x8 Toggle Telemtry 0x10 Responder Trigger
|
||||
// 1 0 0 0 0
|
||||
|
|
|
|||
|
|
@ -271,17 +271,19 @@ namespace Epd3Base {
|
|||
WORD ReadDoses();
|
||||
int ClearDoses();
|
||||
int ClearAlarms();
|
||||
WORD PrepareForIssue();
|
||||
|
||||
WORD ReadAlarmConfig();
|
||||
int ConnectAndStatus(int tokenSourceTimeout);
|
||||
WORD ReadAlarmTresholds();
|
||||
WORD WriteAlarmTresholds();
|
||||
WORD DeIssue();
|
||||
WORD WriteWearer();
|
||||
WORD Issue();
|
||||
WORD Issue(bool Preparedone);
|
||||
WORD EPDReadExtraStatus();
|
||||
WORD WriteCal();
|
||||
|
||||
|
||||
WORD PrepareForIssue();
|
||||
private:
|
||||
int WriteConfig(void);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ int EpdBaseClr::Epd2::SetDeIssued()
|
|||
else rv = epd->DeIssue();
|
||||
return rv;
|
||||
}
|
||||
|
||||
int EpdBaseClr::Epd2::PrepareForIssue()
|
||||
{
|
||||
int rv = 0;
|
||||
|
|
@ -398,7 +399,7 @@ int EpdBaseClr::Epd2::SetIssued(Epd3Base::Epd3U* epd)
|
|||
{
|
||||
int rv = 0;
|
||||
rv = BeforeSetIssued(epd);
|
||||
rv = epd->Issue();
|
||||
rv = epd->Issue(false);
|
||||
if (rv != 0) SetIssuedError = epd->Error;
|
||||
return rv;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ namespace EpdBaseClr {
|
|||
int SetIssued(Epd3Base::Epd3U* epd);
|
||||
int BeforeSetIssued(EpdBase::Epd2U* epd);
|
||||
int SetIssued(EpdBase::Epd2U* epd);
|
||||
int PrepareForIssue();
|
||||
|
||||
int WriteCalibration();
|
||||
int WriteCalibration(EpdBase::Epd2U* epd);
|
||||
int WriteCalibration(Epd3Base::Epd3U* epd);
|
||||
|
|
@ -314,5 +314,7 @@ namespace EpdBaseClr {
|
|||
void InitData();
|
||||
|
||||
void WaitEpd();
|
||||
|
||||
int PrepareForIssue();
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1133,17 +1133,16 @@ WORD MK3::Epd2U::SetSettings()
|
|||
|
||||
numItems = 9;
|
||||
enables = new DisplayAttributeMap_t[9]{
|
||||
{ 0,0x7FFF,0xFFFF },
|
||||
{ 1,0x7FFF,0xFFE1 },
|
||||
{ 2,0x7FFF,0xFEFF },
|
||||
{ 3,0x7FFF,0xFEFF },
|
||||
{ 4,0x7FFF,0xFE01 },
|
||||
{ 5,0x7FFF,0xFF89 },
|
||||
{ 6,0x7FFF,0xFFFF },
|
||||
{ 7,0x7FFF,0xFFFB },
|
||||
{ 8,0x7FFF,0xFFFF }
|
||||
{ 0,0x8FFF,0xFFFF },
|
||||
{ 1,0x8FFF,0xFFE1 },
|
||||
{ 2,0x8FFF,0xFE3F },
|
||||
{ 3,0x8FFF,0xFE3F },
|
||||
{ 4,0x8FFF,0xFE01 },
|
||||
{ 5,0x8FFF,0xFF09 },
|
||||
{ 6,0x8FFF,0xFFFD },
|
||||
{ 7,0x8FFF,0xFFC1 },
|
||||
{ 8,0x8FFF,0xFFFF }
|
||||
};
|
||||
|
||||
ResetEvent(Ev1); c++;
|
||||
token = BeginWriteDisplayEnables_R3(epdComsHandle, enables, numItems, completion);
|
||||
r = Commit(epdComsHandle);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace TestEPD3Dll
|
|||
//rv= x.SetChirp(5);
|
||||
|
||||
|
||||
x.SetSettings();
|
||||
//x.SetSettings();
|
||||
|
||||
x.ReadDisplay(); // ToDo list
|
||||
|
||||
|
|
|
|||
|
|
@ -51,5 +51,5 @@ using System.Windows;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.13.2.0")]
|
||||
[assembly: AssemblyFileVersion("2.13.2.0")]
|
||||
[assembly: AssemblyVersion("2.13.3.0")]
|
||||
[assembly: AssemblyFileVersion("2.13.3.0")]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue