Changeset 847
- Timestamp:
- 08/25/08 13:58:20 (5 months ago)
- Location:
- mchelper/branches/v25
- Files:
-
- 3 modified
-
mchelper.pro (modified) (4 diffs)
-
src/MainWindow.cpp (modified) (7 diffs)
-
src/UsbMonitor.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mchelper/branches/v25/mchelper.pro
r844 r847 10 10 11 11 HEADERS = include/MainWindow.h \ 12 # src/bonjour/BonjourRecord.h \13 # src/bonjour/BonjourServiceBrowser.h \14 # src/bonjour/BonjourServiceRegister.h \15 # src/bonjour/BonjourServiceResolver.h \16 12 include/OscXmlServer.h \ 17 13 include/Osc.h \ … … 31 27 SOURCES = src/main.cpp \ 32 28 src/MainWindow.cpp \ 33 # src/bonjour/BonjourServiceBrowser.cpp \34 # src/bonjour/BonjourServiceRegister.cpp \35 # src/bonjour/BonjourServiceResolver.cpp \36 29 src/OscXmlServer.cpp \ 37 30 src/Osc.cpp \ … … 64 57 } 65 58 66 # OS X links Bonjour all by itself67 # !mac:LIBS += -ldns_sd68 69 59 # ******************************************* 70 60 # qextserialport … … 83 73 unix:DEFINES += _TTY_POSIX_ 84 74 macx: LIBS += -framework IOKit # use IOKit on OS X 85 unix{ !macx: LIBS += -lusb } # use libusb on other unices 75 unix{ 76 !macx{ 77 CONFIG += link_pkgconfig 78 PKGCONFIG += dbus-1 hal 79 } 80 } 86 81 87 82 win32:HEADERS += src/qextserialport/win_qextserialport.h -
mchelper/branches/v25/src/MainWindow.cpp
r831 r847 174 174 board->setIcon(QIcon(":icons/network_icon.gif")); 175 175 board->setToolTip("Ethernet Device: " + pi->key()); 176 176 177 if(noUi()) 177 178 { … … 179 180 out << "network device discovered: " + pi->key() << endl; 180 181 } 181 deviceList->addItem(board);182 182 183 boardInit(board); 183 184 boardList.append(board); … … 206 207 board->setToolTip("USB Serial Device: " + key); 207 208 noUiString = "usb device discovered: " + key; 209 actionUpload->setEnabled(false); 208 210 } 209 211 else if(type == BoardType::UsbSamba) … … 214 216 board->setToolTip("Unprogrammed device"); 215 217 noUiString = "sam-ba device discovered: " + key; 218 actionUpload->setEnabled(true); 216 219 } 217 220 … … 221 224 out << noUiString << endl; 222 225 } 223 deviceList->addItem(board);226 224 227 boardInit(board); 225 228 boardList.append(board); … … 238 241 if( placeholderRow >= 0 ) 239 242 deviceList->takeItem( placeholderRow ); 243 deviceList->addItem(board); 244 // if no other boards are selected, select this new one 245 if( !getCurrentBoard() ) 246 deviceList->setCurrentRow (deviceList->count()-1); 247 board->sendMessage("/system/info-internal"); // get the board's info 240 248 } 241 249 … … 356 364 } 357 365 366 /* 367 Return the currently selected board in the UI list of boards, 368 or NULL if none are selected. 369 */ 358 370 Board* MainWindow::getCurrentBoard( ) 359 371 { -
mchelper/branches/v25/src/UsbMonitor.cpp
r588 r847 19 19 #include "PacketUsbSerial.h" 20 20 #include "qextserialenumerator.h" 21 22 #define MAKE_CONTROLLER_VID 0xEB03 23 #define MAKE_CONTROLLER_PID 0x0920 24 #define SAM_BA_VID 0xEB03 25 #define SAM_BA_PID 0x6124 21 26 22 27 /* … … 50 55 foreach(QextPortInfo port, ports) 51 56 { 52 if(!usbSerialList.contains(port.portName) && port.friendName.startsWith("Make Controller Ki")) 57 // the portname needs to be tweeked 58 if( !usbSerialList.contains(port.portName) ) 53 59 { 54 usbSerialList.append(port.portName); // keep our internal list, the portName is the unique key 55 newSerialPorts.append(port.portName); // on the list to be posted to the UI 60 if( port.friendName.startsWith("Make Controller Ki") || 61 (port.vendorID == MAKE_CONTROLLER_VID && port.productID == MAKE_CONTROLLER_PID)) 62 { 63 usbSerialList.append(port.portName); // keep our internal list, the portName is the unique key 64 newSerialPorts.append(port.portName); // on the list to be posted to the UI 65 } 66 } 67 68 if( !usbSambaList.contains(port.portName) ) 69 { 70 if( port.vendorID == SAM_BA_VID && port.productID == SAM_BA_PID ) 71 { 72 usbSambaList.append(port.portName); // keep our internal list, the portName is the unique key 73 newSambaPorts.append(port.portName); // on the list to be posted to the UI 74 } 56 75 } 57 76 // check for samba boards... 58 77 portNames << port.portName; 59 78 } 79 60 80 if(newSerialPorts.count()) 61 81 emit newBoards(newSerialPorts, BoardType::UsbSerial); … … 73 93 } 74 94 75 // then checkthe samba boards95 // same thing for the samba boards 76 96 foreach(QString key, usbSambaList) 77 97 {
