Skip to content

Commit

Permalink
Windows will now default to COM4, linux to /dev/ttyUSB0, and OSX to /…
Browse files Browse the repository at this point in the history
…dev/cu.usbmodem on FIRST start ever.
  • Loading branch information
Michael Carpenter authored and Michael Carpenter committed Nov 20, 2013
1 parent dd0e72a commit 375526b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QLOG_INFO() << "Local settings file is:" << m_settingsFile;
QSettings settings(m_settingsFile,QSettings::IniFormat);
settings.beginGroup("comms");
#if defined(Q_OS_WIN)
m_comPort = settings.value("port","COM4").toString();
#elif defined(Q_OS_LINUX)
m_comPort = settings.value("port","/dev/ttyUSB0").toString();
#else
m_comPort = settings.value("port","/dev/cu.usbmodem").toString();
#endif
m_comBaud = settings.value("baud",115200).toInt();
m_comInterByte = settings.value("interbytedelay",0).toInt();
m_saveLogs = settings.value("savelogs",true).toBool();
Expand Down

0 comments on commit 375526b

Please sign in to comment.