Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.csl.cs108ademoapp"
minSdkVersion 19
targetSdkVersion 26
versionCode 18
versionName "1.13.0"
versionCode 19
versionName "1.14.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":18,"versionName":"1.13.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":19,"versionName":"1.14.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
12 changes: 9 additions & 3 deletions app/src/main/java/com/csl/cs108ademoapp/AccessTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import java.util.ArrayList;

public class AccessTask extends AsyncTask<Void, String, String> {
final boolean DEBUG = false;
final boolean DEBUG = true;
final boolean skipSelect = false;
public enum TaskCancelRReason {
NULL, INVALD_REQUEST, DESTORY, STOP, BUTTON_RELEASE, TIMEOUT
}
Expand All @@ -37,6 +38,7 @@ public enum TaskCancelRReason {
private String endingMessaage;
int qValue;
boolean repeat, nextNew;
boolean gotInventory;
int batteryCountInventory_old;

public AccessTask(Button button, TextView textViewWriteCount, boolean invalidRequest,
Expand All @@ -53,7 +55,7 @@ public AccessTask(Button button, TextView textViewWriteCount, boolean invalidReq
this.registerYield = registerYieldView;
this.registerTotal = registerTotalView;

this.invalidRequest = invalidRequest;
this.invalidRequest = invalidRequest; MainActivity.mCs108Library4a.appendToLog("invalidRequest = " + invalidRequest);
this.selectMask = selectMask;
this.selectBank = selectBank;
this.selectOffset = selectOffset;
Expand Down Expand Up @@ -115,14 +117,17 @@ else if (hostCommand == Cs108Connector.HostCommands.CMD_18K6CKILL) {
int matchRep = 0;
if (repeat == false || nextNew) matchRep = 1;
if (powerLevel < 0 || powerLevel > 330) invalidRequest = true;
else if (skipSelect) { }
else if (MainActivity.mCs108Library4a.setSelectedTag(null, selectMask, selectBank, selectOffset, powerLevel, qValue, matchRep) == false) {
invalidRequest = true; MainActivity.mCs108Library4a.appendToLog("setSelectedTag is failed with selectMask = " + selectMask + ", selectBank = " + selectBank + ", selectOffset = " + selectOffset + ", powerLevel = " + powerLevel);
}
}
gotInventory = false;
taskCancelReason = TaskCancelRReason.NULL;
if (invalidRequest) {
cancel(true);
taskCancelReason = TaskCancelRReason.INVALD_REQUEST;
MainActivity.mCs108Library4a.appendToLog("invalidRequest A= " + invalidRequest);
} else {
if (MainActivity.mCs108Library4a.checkHostProcessorVersion(MainActivity.mCs108Library4a.getMacVer(), 2, 6, 8)) {
MainActivity.mCs108Library4a.setInvModeCompact(false);
Expand Down Expand Up @@ -192,6 +197,7 @@ protected void onProgressUpdate(String... output) {
if (output[0] != null) {
if (output[0].length() == 2) {
if (output[0].contains("TT")) {
gotInventory = true;
if (registerTagGot != null) registerTagGot.setText(output[1]);
boolean matched = false;
for (int i = 0; i < tagList.size(); i++) {
Expand Down Expand Up @@ -260,7 +266,7 @@ void DeviceConnectTask4RegisterEnding() {
strErrorMessage = "";
switch (taskCancelReason) {
case NULL:
if (accessResult == null || (resultError != null && resultError.length() != 0) || (endingMessaage != null && endingMessaage.length() != 0)) strErrorMessage += "Finish as COMMAND END is received";
if (accessResult == null || (resultError != null && resultError.length() != 0) || (endingMessaage != null && endingMessaage.length() != 0)) strErrorMessage += ("Finish as COMMAND END is received " + (gotInventory ? "WITH" : "WITHOUT") + " tag response");
else Toast.makeText(MainActivity.mContext, R.string.toast_abort_by_SUCCESS, Toast.LENGTH_SHORT).show();
break;
case STOP:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static DrawerPositions toDrawerPosition(int x) {
addItem(new DrawerItem("8", "Security", R.drawable.dl_access));
addItem(new DrawerItem("9", "Register Tag", R.drawable.dl_rr));
addItem(new DrawerItem("10", "Cold Chain CS8300", R.drawable.dl_loc));
addItem(new DrawerItem("11", "RFMicron Temperature", R.drawable.dl_loc));
addItem(new DrawerItem("11", "RFMicron", R.drawable.dl_loc));
addItem(new DrawerItem("12", "UCODE DNA", R.drawable.dl_loc));
addItem(new DrawerItem("13", "Wedge", R.drawable.dl_rr));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ else if (output[0].contains("WW")) {
String strEpc = MainActivity.mCs108Library4a.byteArrayToString(rx000pkgData.decodedEpc);
String strExtra2 = null; if (rx000pkgData.decodedData2 != null) strExtra2 = MainActivity.mCs108Library4a.byteArrayToString(rx000pkgData.decodedData2);
String strExtra1 = null; if (rx000pkgData.decodedData1 != null) strExtra1 = MainActivity.mCs108Library4a.byteArrayToString(rx000pkgData.decodedData1);
String strAddresss = strEpc; // strEpc, strEpc + strExtra1 + strExtra2
String strCrc16 = null; if (rx000pkgData.decodedCrc != null) strCrc16 = MainActivity.mCs108Library4a.byteArrayToString(rx000pkgData.decodedCrc);
if (strExtra1 != null && strExtra1Filter != null) {
MainActivity.mCs108Library4a.appendToLog("strEpc = " + strEpc + ", strExtra1 = " + strExtra1 + ", strExtra1Filter = " + strExtra1Filter + ", strExtra2 = " + strExtra2 );
Expand Down Expand Up @@ -300,7 +301,7 @@ else if (output[0].contains("WW")) {
// MainActivity.mCs108Library4a.appendToLog("Matching Epc = " + strEpc);
iMatchItem = -1;
if (true) {
int index = Collections.binarySearch(MainActivity.sharedObjects.tagsIndexList, new SharedObjects.TagsIndex(strEpc+strExtra1+strExtra2, 0));
int index = Collections.binarySearch(MainActivity.sharedObjects.tagsIndexList, new SharedObjects.TagsIndex(strAddresss, 0));
if (index >= 0) {
iMatchItem = MainActivity.sharedObjects.tagsIndexList.size() - 1 - MainActivity.sharedObjects.tagsIndexList.get(index).getPosition();
// MainActivity.mCs108Library4a.appendToLog("Binary matched index = " + index + ", iMatchItem = " + iMatchItem + ", Epc = " + tagsList.get(iMatchItem).getAddress());
Expand All @@ -322,6 +323,8 @@ else if (output[0].contains("WW")) {
readerDevice.setRssi(rssi);
readerDevice.setPhase(phase);
readerDevice.setChannel(chidx);
readerDevice.setExtra1(strExtra1, extra1Bank, data1_offset);
MainActivity.mCs108Library4a.appendToLog("setExtra1 with strExtra1 = " + strExtra1);
tagsList.set(iMatchItem, readerDevice);
match = true;
updated = true;
Expand All @@ -342,7 +345,7 @@ else if (output[0].contains("WW")) {
1, rssi, phase, chidx);
if (bAdd2End) tagsList.add(readerDevice);
else tagsList.add(0, readerDevice);
SharedObjects.TagsIndex tagsIndex = new SharedObjects.TagsIndex(strEpc+strExtra1+strExtra2, tagsList.size()-1); MainActivity.sharedObjects.tagsIndexList.add(tagsIndex); Collections.sort(MainActivity.sharedObjects.tagsIndexList);
SharedObjects.TagsIndex tagsIndex = new SharedObjects.TagsIndex(strAddresss, tagsList.size()-1); MainActivity.sharedObjects.tagsIndexList.add(tagsIndex); Collections.sort(MainActivity.sharedObjects.tagsIndexList);
if (serverConnectValid && ALLOW_RTSAVE && true) {
try {
// saveExternalTask = new SaveList2ExternalTask();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ public class MicronAdapter extends FragmentStatePagerAdapter {
public Fragment getItem(int index) {
Fragment fragment = null;
switch (index) {
case 0:
case 1:
fragment = new AccessMicronFragment();
fragment0 = fragment;
break;
case 1:
fragment = InventoryRfidiMultiFragment.newInstance(true,"E28240", false);
case 0:
String mDid = "E282403"; //"E28240", "E282403"
fragment = InventoryRfidiMultiFragment.newInstance(true, mDid, false);
fragment1 = fragment;
break;
default:
Expand Down
Loading