new pattern cmd format; send CRC format on console cmds
This commit is contained in:
@@ -141,7 +141,7 @@ public class MainActivity extends Activity implements RadioGroup.OnCheckedChange
|
||||
try {
|
||||
//send data to service
|
||||
value = message.getBytes("UTF-8");
|
||||
mService.writeRXCharacteristic(value);
|
||||
mService.sendDataWithCRC(value);
|
||||
//Update the log with time stamp
|
||||
String currentDateTimeString = DateFormat.getTimeInstance().format(new Date());
|
||||
listAdapter.add("["+currentDateTimeString+"] TX: "+ message);
|
||||
@@ -161,11 +161,11 @@ public class MainActivity extends Activity implements RadioGroup.OnCheckedChange
|
||||
byte[] value;
|
||||
try {
|
||||
//send data to service
|
||||
value = "!PR".getBytes("UTF-8");
|
||||
value = "pr".getBytes("UTF-8");
|
||||
mService.sendDataWithCRC(value);
|
||||
//Update the log with time stamp
|
||||
String currentDateTimeString = DateFormat.getTimeInstance().format(new Date());
|
||||
listAdapter.add("["+currentDateTimeString+"] TX: "+ "!PR");
|
||||
listAdapter.add("["+currentDateTimeString+"] TX: "+ "pr");
|
||||
messageListView.smoothScrollToPosition(listAdapter.getCount() - 1);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
||||
Reference in New Issue
Block a user