File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/network_systems/projects/local_transceiver/src Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,22 @@ class LocalTransceiverIntf : public NetNode
4242 if (mode == SYSTEM_MODE::PROD) {
4343 // TODO(Jng468) placeholder
4444 } else if (mode == SYSTEM_MODE::DEV) {
45- default_port = LOCAL_TRANSCEIVER_TEST_PORT;
45+ default_port = LOCAL_TRANSCEIVER_TEST_PORT;
46+ std::string run_iridium_cmd = " $ROS_WORKSPACE/scripts/run_virtual_iridium.sh" ;
47+ int result = std::system (run_iridium_cmd.c_str ()); // NOLINT(concurrency-mt-unsafe)
48+ if (result != 0 ) {
49+ std::string msg = " Error: could not start virtual iridium" ;
50+ std::cerr << msg << std::endl;
51+ throw std::exception ();
52+ }
53+ std::string set_baud_cmd = " stty 19200 < $LOCAL_TRANSCEIVER_TEST_PORT" ;
54+ result = std::system (set_baud_cmd.c_str ()); // NOLINT(concurrency-mt-unsafe)
55+ if (result != 0 ) {
56+ std::string msg = " Error: could not set baud rate for virtual iridium" ;
57+ std::cerr << msg << std::endl;
58+ throw std::exception ();
59+ }
60+
4661 } else {
4762 std::string msg = " Error, invalid system mode" + mode;
4863 throw std::runtime_error (msg);
You can’t perform that action at this time.
0 commit comments