Open zhuxuda opened 6 years ago
Please provide a more detailed issue
the normal return data:[58,48,48,48,48] but the plugin return me data; [58] [48][48][48][48] it is divided.My data is returned by multiple times. Is it a problem of delay?
PLEASE PROVIDE A MORE DETAILED ISSUE (e.g. SOME CODE OF YOURS, android AND usb serial device)
AND SOME POLITENESS (LIKE HELLO, THANKS AND SO ON) WOULD BE THE BARE MINIMUM WHEN ASKING FOR HELP
sorry,my English is very bad.Thank you for your patience.
This is my dode
var opts = { baudRate: 115200 }; $scope.allData = []; serial.requestPermission(function success(res){ console.log(res); serial.open(opts, function success(res){ console.log(res); }, function error(err){ console.log(err); }); }, function error(err){ console.log(err); }); var view = []; serial.registerReadCallback(function success(res) { var lin = new Uint8Array(res); view = view.concat(Array.from(lin)); },function error(error) { console.log(error) }); //发送指令 $scope.sendOrder = function(){ serial.writeHex(myOrderString, function success(res){ console.log(res); }, function error(err){ console.log(err); }); }
Please check the example on the readme
true:[48,48,48] yours:[48][48]