Commit d48e6418 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

software/js-drone: reduce connection timeout to 5 seconds

parent acfb0f48
...@@ -30,7 +30,7 @@ md5sum = d12fbb134c587173ddff46ff1bc6ffe7 ...@@ -30,7 +30,7 @@ md5sum = d12fbb134c587173ddff46ff1bc6ffe7
[main] [main]
_update_hash_filename_ = drone-scripts/main.js.jinja2 _update_hash_filename_ = drone-scripts/main.js.jinja2
md5sum = dfc0ae336c45950846a6e0cf754093a6 md5sum = 4279a9e094dee9a530c27744aed0899d
[pubsub] [pubsub]
_update_hash_filename_ = drone-scripts/pubsub.js.jinja2 _update_hash_filename_ = drone-scripts/pubsub.js.jinja2
......
...@@ -25,6 +25,7 @@ import { err, exit, open, out } from "std"; ...@@ -25,6 +25,7 @@ import { err, exit, open, out } from "std";
var CONF_PATH = {{ json_module.dumps(configuration) }}, var CONF_PATH = {{ json_module.dumps(configuration) }},
conf_file = open(CONF_PATH, "r"), conf_file = open(CONF_PATH, "r"),
configuration = JSON.parse(conf_file.readAsString()), configuration = JSON.parse(conf_file.readAsString()),
AUTOPILOT_CONNECTION_TIMEOUT = 5,
MAVSDK_LOG_FILE_PATH = MAVSDK_LOG_FILE_PATH =
"{{ log_dir }}/mavsdk_" + new Date().toISOString() + ".log", "{{ log_dir }}/mavsdk_" + new Date().toISOString() + ".log",
LOG_FILE = LOG_FILE =
...@@ -85,7 +86,7 @@ import { err, exit, open, out } from "std"; ...@@ -85,7 +86,7 @@ import { err, exit, open, out } from "std";
configuration.autopilotIp, configuration.autopilotIp,
configuration.autopilotPort, configuration.autopilotPort,
MAVSDK_LOG_FILE_PATH, MAVSDK_LOG_FILE_PATH,
60 AUTOPILOT_CONNECTION_TIMEOUT
), ),
"Failed to connect to " + address "Failed to connect to " + address
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment