fix
This commit is contained in:
+38
-2
@@ -53,7 +53,7 @@ namespace SafeBagDE70
|
||||
CDMStatus = 0,
|
||||
PrinterStatus = 0,
|
||||
SensorStatus = 0,
|
||||
Notes = 0,
|
||||
Notes = "",
|
||||
OtherError = 0,
|
||||
};
|
||||
}
|
||||
@@ -121,6 +121,36 @@ namespace SafeBagDE70
|
||||
}
|
||||
|
||||
}
|
||||
public static byte[] GetCassetteData()
|
||||
{
|
||||
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_READ_CASSETTE);
|
||||
var data = cCmdRsp.recv_dat.dat;
|
||||
|
||||
StringBuilder str = new StringBuilder();
|
||||
var recv_dat = cCmdRsp.recv_dat;
|
||||
|
||||
AppData.DeviceStatus.Notes = GetNotesString(recv_dat.dat);
|
||||
str.Append("DATA:");
|
||||
for (int i = 0; i < recv_dat.leng - 1; i++)
|
||||
{
|
||||
var dat = string.Format("{0:X2} ", recv_dat.dat[i]);
|
||||
str.Append(dat);
|
||||
}
|
||||
Log.Information("[CASSETTE]" + str.ToString());
|
||||
return (byte[])data.Clone();
|
||||
}
|
||||
public static string GetNotesString(byte[] cassetData)
|
||||
{
|
||||
int notes = 0;
|
||||
int offset = 14;
|
||||
string str = "";
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
notes = cassetData[2 * i + offset] * 256 + cassetData[2 * i + 1 + offset];
|
||||
str += notes + ",";
|
||||
}
|
||||
return str.Trim(',');
|
||||
}
|
||||
|
||||
}
|
||||
public class CustomerAccount
|
||||
@@ -215,6 +245,12 @@ namespace SafeBagDE70
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
public enum COUNTINGSTATE
|
||||
{
|
||||
NORMAL=0,
|
||||
AUTOEND=1,
|
||||
FULLIFSTORE=2
|
||||
}
|
||||
public class CDMSTATE : INotifyPropertyChanged
|
||||
{
|
||||
public int IsCassetteFull = 0;
|
||||
@@ -336,7 +372,7 @@ namespace SafeBagDE70
|
||||
public int PrinterStatus { get; set; }
|
||||
public int SensorStatus { get; set; }
|
||||
public int OtherError { get; set; }
|
||||
public int? Notes { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
public enum DeviceStatusCode {
|
||||
|
||||
Reference in New Issue
Block a user