mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add a simple warning if you're using OSX with a GreaseWeazle and select a
/dev/tty file rather than a /dev/cu one (the /dev/tty files usually don't work).
This commit is contained in:
@@ -45,5 +45,4 @@ private:
|
|||||||
std::stringstream _stream;
|
std::stringstream _stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -108,6 +108,11 @@
|
|||||||
typedef int FileHandle;
|
typedef int FileHandle;
|
||||||
static FileHandle open_serial_port(const std::string& name)
|
static FileHandle open_serial_port(const std::string& name)
|
||||||
{
|
{
|
||||||
|
#ifdef __APPLE__
|
||||||
|
if (name.find("/dev/tty.") != std::string::npos)
|
||||||
|
std::cerr << "Warning: you probably want to be using a /dev/cu.* device\n";
|
||||||
|
#endif
|
||||||
|
|
||||||
int fd = open(name.c_str(), O_RDWR);
|
int fd = open(name.c_str(), O_RDWR);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
Error() << fmt::format("cannot open GreaseWeazle serial port '{}': {}",
|
Error() << fmt::format("cannot open GreaseWeazle serial port '{}': {}",
|
||||||
|
|||||||
Reference in New Issue
Block a user