mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 10:03:34 +08:00
uavcan_dynamic_node_id_server will not run if stdout is not a tty
This commit is contained in:
@@ -618,6 +618,12 @@ int main(int argc, const char** argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (isatty(STDOUT_FILENO) != 1)
|
||||
{
|
||||
std::cerr << "This application cannot run if stdout is not associated with a terminal" << std::endl;
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
auto options = parseOptions(argc, argv);
|
||||
|
||||
std::cout << "Self node ID: " << int(options.node_id.get()) << "\n"
|
||||
|
||||
Reference in New Issue
Block a user