Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef PokemonAutomation_Controllers_SerialPABotBase_SelectorWidget_H
#define PokemonAutomation_Controllers_SerialPABotBase_SelectorWidget_H

#include <QFileInfo>
#include <QSerialPortInfo>
#include "Common/Qt/NoWheelComboBox.h"
#include "Controllers/ControllerDescriptor.h"
Expand Down Expand Up @@ -44,6 +45,17 @@ inline bool filter_serial_port(const QSerialPortInfo& port){
}
#endif

#if defined(__linux__)
const QString path = port.systemLocation();

QFileInfo file(path);
// Exclude devices that don't have Read/Write access
if (!(file.isReadable() && file.isWritable()))
{
return false;
}
#endif

return true;
}

Expand Down
Loading