From 2ccfce7cf062d2ef83d111e343bff4fbd67c1598 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 17 Jul 2017 05:32:29 -0700 Subject: QML UI: add serial interfaces to connection list Signed-off-by: Dirk Hohndel --- subsurface-mobile-helper.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'subsurface-mobile-helper.cpp') diff --git a/subsurface-mobile-helper.cpp b/subsurface-mobile-helper.cpp index e84fd82d1..68dd228ba 100644 --- a/subsurface-mobile-helper.cpp +++ b/subsurface-mobile-helper.cpp @@ -75,6 +75,14 @@ void run_ui() ctxt->setContextProperty("diveModel", sortModel); ctxt->setContextProperty("gpsModel", gpsSortModel); ctxt->setContextProperty("vendorList", vendorList); +#if defined(Q_OS_ANDROID) + connectionListModel.addAddress("FTDI"); +#elif defined(Q_OS_LINUX) // since this is in the else, it does NOT include Android + connectionListModel.addAddress("/dev/ttyS0"); + connectionListModel.addAddress("/dev/ttyS1"); + connectionListModel.addAddress("/dev/ttyS2"); + connectionListModel.addAddress("/dev/ttyS3"); +#endif ctxt->setContextProperty("connectionListModel", &connectionListModel); ctxt->setContextProperty("logModel", MessageHandlerModel::self()); -- cgit v1.2.3-70-g09d2