Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do you return a set of data separately #96

Open
zhuxuda opened this issue Mar 20, 2018 · 6 comments
Open

Why do you return a set of data separately #96

zhuxuda opened this issue Mar 20, 2018 · 6 comments

Comments

@zhuxuda
Copy link

zhuxuda commented Mar 20, 2018

true:[48,48,48]
yours:[48][48]

@xseignard
Copy link
Owner

Please provide a more detailed issue

@zhuxuda
Copy link
Author

zhuxuda commented Mar 20, 2018

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?

@xseignard
Copy link
Owner

PLEASE PROVIDE A MORE DETAILED ISSUE (e.g. SOME CODE OF YOURS, android AND usb serial device)

@xseignard
Copy link
Owner

xseignard commented Mar 20, 2018

AND SOME POLITENESS (LIKE HELLO, THANKS AND SO ON) WOULD BE THE BARE MINIMUM WHEN ASKING FOR HELP

@zhuxuda
Copy link
Author

zhuxuda commented Mar 20, 2018

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); }); }

@xseignard
Copy link
Owner

Please check the example on the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants