Permalink
Browse files

Update SetDeviceStartAcquisition

Fixed a bug related to the automatic change of the sampling frequency for the ADS_BP acquisition system,
  • Loading branch information...
1 parent c77552e commit 11643a6bdccd85cc004e73f7913f54a7c7a6314b @EnzoMastinu EnzoMastinu committed on GitHub Nov 10, 2016
Showing with 5 additions and 4 deletions.
  1. +5 −4 Comm/AFE/SetDeviceStartAcquisition.m
@@ -1,14 +1,14 @@
% ---------------------------- Copyright Notice ---------------------------
-% This file is part of BioPatRec © which is open and free software under
+% This file is part of BioPatRec © which is open and free software under
% the GNU Lesser General Public License (LGPL). See the file "LICENSE" for
% the full license governing this code and copyrights.
%
% BioPatRec was initially developed by Max J. Ortiz C. at Integrum AB and
-% Chalmers University of Technology. All authors’ contributions must be kept
+% Chalmers University of Technology. All authors’ contributions must be kept
% acknowledged below in the section "Updates % Contributors".
%
% Would you like to contribute to science and sum efforts to improve
-% amputees’ quality of life? Join this project! or, send your comments to:
+% amputees’ quality of life? Join this project! or, send your comments to:
% maxo@chalmers.se.
%
% The entire copyright notice must be kept in this or any source file
@@ -112,8 +112,9 @@ function SetDeviceStartAcquisition(handles, obj)
errordlg('The selected sampling frequency is not valid for the ADS_BP. Errors may occur!','Erroneous sampling frequency');
end
fwrite(obj,'T','char');
+ pause(0.5);
% Read available data and discard it
- if obj.BytesAvailable > 1
+ if obj.BytesAvailable > 0
fread(obj,obj.BytesAvailable,'uint8');
end
fwrite(obj,'r','char');

0 comments on commit 11643a6

Please sign in to comment.