Skip to content

Commit bb973b8

Browse files
committed
cleanup
1 parent 791e765 commit bb973b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/Device/Serial.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,14 +457,14 @@ namespace Device
457457
else if (option == "FLOWCONTROL")
458458
{
459459
Util::Convert::toUpper(arg);
460-
if (arg == "NONE" || arg == "0")
460+
if (arg == "NONE")
461461
flowcontrol = FlowControl::NONE;
462-
else if (arg == "HARDWARE" || arg == "HW" || arg == "RTSCTS" || arg == "1")
462+
else if (arg == "HARDWARE")
463463
flowcontrol = FlowControl::HARDWARE;
464-
else if (arg == "SOFTWARE" || arg == "SW" || arg == "XONXOFF" || arg == "2")
464+
else if (arg == "SOFTWARE")
465465
flowcontrol = FlowControl::SOFTWARE;
466466
else
467-
throw std::runtime_error("Serial: invalid flowcontrol option: " + arg + ". Valid options are NONE, HARDWARE, SOFTWARE.");
467+
throw std::runtime_error("Serial: invalid flowcontrol option: \"" + arg + "\". Valid options are NONE, HARDWARE, SOFTWARE.");
468468
}
469469
else
470470
Device::Set(option, arg);

0 commit comments

Comments
 (0)