Permalink
Browse files

Added automatic serial enumeration under linux

  • Loading branch information...
1 parent 7348fee commit eaf0b8c5cbf43af4d746af163d35abc5e40de797 @bmcdorman bmcdorman committed Jan 31, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 plugins/interfaces/kovan_serial/kovan_serial_interface.cpp
@@ -36,7 +36,9 @@ void PortSampler::run()
#elif defined(Q_OS_WIN)
for(int i = 0; i < 15; ++i) paths << QString("COM%1").arg(i);
#else
- qWarning() << "Serial port enumeration NYI for your platform";
+ QDir dir("/dev/");
+ QFileInfoList list = dir.entryInfoList(QStringList() << "ttyACM*", QDir::System);
+ foreach(const QFileInfo &info, list) paths << info.filePath();
#endif
foreach(const QString &path, paths) {
UsbSerial usb(path.toAscii());

0 comments on commit eaf0b8c

Please sign in to comment.