Changeset 768
- Timestamp:
- 08/31/09 16:10:30 (4 years ago)
- Location:
- trunk/mfiles
- Files:
-
- 5 modified
-
COM_CloseNXT.m (modified) (2 diffs)
-
COM_CollectPacket.m (modified) (2 diffs)
-
COM_OpenNXTEx.m (modified) (3 diffs)
-
COM_SendPacket.m (modified) (2 diffs)
-
private/checkHandleStruct.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/mfiles/COM_CloseNXT.m
r670 r768 64 64 % Signature 65 65 % Author: Linus Atorf (see AUTHORS) 66 % Date: 200 8/07/0966 % Date: 2009/08/31 67 67 % Copyright: 2007-2009, RWTH Aachen University 68 68 % … … 137 137 if h.ConnectionTypeValue == 1 % USB 138 138 textOut(sprintf('Closing handle (USB) with MAC = %s (handle was %.1f minutes old)\n', h.NXTMAC, etime(clock, h.CreationTime) / 60)); 139 if h.OSValue == 1 % win139 if (h.OSValue == 1) || (h.OSValue == 3) % Windows and Mac 140 140 USB_CloseHandle_Windows(h); 141 141 else % linux -
trunk/mfiles/COM_CollectPacket.m
r670 r768 58 58 % Signature 59 59 % Author: Linus Atorf (see AUTHORS) 60 % Date: 200 7/10/1460 % Date: 2009/08/31 61 61 % Copyright: 2007-2009, RWTH Aachen University 62 62 % … … 93 93 94 94 if handle.ConnectionTypeValue == 1 % USB 95 if handle.OSValue == 1 % Windows95 if (handle.OSValue == 1) || (handle.OSValue == 3) % Windows and Mac 96 96 [type cmd statusbyte content] = USB_CollectPacket_Windows(handle); 97 97 else % Linux -
trunk/mfiles/COM_OpenNXTEx.m
r758 r768 100 100 % Signature 101 101 % Author: Linus Atorf (see AUTHORS) 102 % Date: 2009/0 7/10102 % Date: 2009/08/31 103 103 % Copyright: 2007-2009, RWTH Aachen University 104 104 % … … 254 254 h.OSName = 'Windows'; 255 255 h.OSValue = 1; 256 else % no support for Mac yet... 257 h.OSName = 'Linux'; 258 h.OSValue = 2; 256 else % mac or linux 257 if ismac 258 h.OSName = 'Mac'; 259 h.OSValue = 3; 260 else 261 h.OSName = 'Linux'; 262 h.OSValue = 2; 263 end%if 259 264 end%if 260 265 … … 487 492 textOut(sprintf('Opening USB connection...\n')); 488 493 489 if hIn.OSValue == 1494 if (hIn.OSValue == 1) || (hIn.OSValue == 3) % Windows and Mac 490 495 hOut = USB_OpenHandle_Windows(hIn, SuppressErrors); 491 elseif hIn.OSValue == 2 496 elseif hIn.OSValue == 2 % Linux 492 497 hOut = USB_OpenHandle_Linux(hIn, SuppressErrors); 493 498 end%if -
trunk/mfiles/COM_SendPacket.m
r670 r768 34 34 % Signature 35 35 % Author: Linus Atorf (see AUTHORS) 36 % Date: 200 8/07/0936 % Date: 2009/08/31 37 37 % Copyright: 2007-2009, RWTH Aachen University 38 38 % … … 72 72 end%if 73 73 74 if handle.OSValue == 1 % Windows74 if (handle.OSValue == 1) || (handle.OSValue == 3) % Windows and Mac 75 75 USB_SendAndCollectPacket_Windows(Packet(3:end), handle); 76 76 else % Linux -
trunk/mfiles/private/checkHandleStruct.m
r670 r768 17 17 % Author: Linus Atorf (see AUTHORS) 18 18 % Date: 2008/07/01 19 % Copyright: 2007-2009, RWTH Aachen University 20 ; 19 % Copyright: 2007-2008, RWTH Aachen University 21 20 % 22 21 % *********************************************************************************************** … … 63 62 end%if 64 63 end%if 65 else % Linux64 elseif h.OSValue == 2 % Linux 66 65 if h.ConnectionTypeValue == 1 % USB 67 66 if ~isnumeric(h.Handle) % also possible: isa('libpointer') ? … … 69 68 end%if 70 69 else % BT 70 if isfloat(h.Handle) 71 valid = true; 72 end%if 73 end%if 74 else % Mac 75 if h.ConnectionTypeValue == 1 % USB, Windows part for USB 76 if isfloat(h.Handle) 77 valid = true; 78 end%if 79 else % BT, Linux part for BT 71 80 if isfloat(h.Handle) 72 81 valid = true;
