Skip to content

Commit

Permalink
feat: add functionality to set DTR/RTS line status on serial port open (
Browse files Browse the repository at this point in the history
#813)

* feat: allow setting DTR or RTS line status upon opening a serial connection

* feat: update translations
  • Loading branch information
cheton committed Mar 31, 2023
1 parent 95317da commit cb26c1c
Show file tree
Hide file tree
Showing 25 changed files with 441 additions and 81 deletions.
8 changes: 6 additions & 2 deletions src/app/i18n/cs/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Obnovit",
"Baud rate": "Rychlost",
"Choose a baud rate": "Zvolte rychlost",
"Enable hardware flow control": "",
"Connect automatically": "Automaticky připojit",
"Open": "Otevřít",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Nastavit stav řádky DTR při otevírání",
"SET": "NASTAVIT",
"CLR": "VYMAZAT",
"Set RTS line status upon opening": "Nastavit stav řádky RTS při otevírání",
"Use RTS/CTS flow control": "Použijte řízení toku RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/de/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Aktualisieren",
"Baud rate": "Baudrate",
"Choose a baud rate": "Baudrate wählen",
"Enable hardware flow control": "",
"Connect automatically": "Automatisch verbinden",
"Open": "Öffnen",
"Error opening serial port '{{- port}}'": "Fehler beim Öffnen des seriellen Ports '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Setze den DTR-Leitungsstatus beim Öffnen",
"SET": "SETZEN",
"CLR": "LÖSCHEN",
"Set RTS line status upon opening": "Setze den RTS-Leitungsstatus beim Öffnen",
"Use RTS/CTS flow control": "Verwende RTS/CTS-Flusskontrolle"
}
8 changes: 6 additions & 2 deletions src/app/i18n/en/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Refresh",
"Baud rate": "Baud rate",
"Choose a baud rate": "Choose a baud rate",
"Enable hardware flow control": "Enable hardware flow control",
"Connect automatically": "Connect automatically",
"Open": "Open",
"Error opening serial port '{{- port}}'": "Error opening serial port '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "Show Cutting Tool",
"Ready to start": "Ready to start",
"Connect to an IP camera": "Connect to an IP camera",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4)."
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).",
"Set DTR line status upon opening": "Set DTR line status upon opening",
"SET": "SET",
"CLR": "CLR",
"Set RTS line status upon opening": "Set RTS line status upon opening",
"Use RTS/CTS flow control": "Use RTS/CTS flow control"
}
8 changes: 6 additions & 2 deletions src/app/i18n/es/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Actualizar",
"Baud rate": "Baud rate",
"Choose a baud rate": "Elija",
"Enable hardware flow control": "",
"Connect automatically": "Conectar automaticamente",
"Open": "Abrir",
"Error opening serial port '{{- port}}'": "Error al abrir el puerto serie '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Establecer el estado de la línea DTR al abrir",
"SET": "ESTABLECER",
"CLR": "BORRAR",
"Set RTS line status upon opening": "Establecer el estado de la línea RTS al abrir",
"Use RTS/CTS flow control": "Utilice control de flujo RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/fr/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Actualiser",
"Baud rate": "Vitesse de transmission",
"Choose a baud rate": "Selectionner le 'Baudrate'",
"Enable hardware flow control": "",
"Connect automatically": "Connecter automatiquement",
"Open": "Ouvrir",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Définir l'état de la ligne DTR à l'ouverture",
"SET": "ÉTABLIR",
"CLR": "CLR",
"Set RTS line status upon opening": "Définir l'état de la ligne RTS à l'ouverture",
"Use RTS/CTS flow control": "Utilisez le contrôle de flux RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/hu/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Frissítés",
"Baud rate": "Átviteli sebesség",
"Choose a baud rate": "Átviteli sebesség választás",
"Enable hardware flow control": "",
"Connect automatically": "Automatikus csatlakozás",
"Open": "Csatlakozás",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "DTR vonal állapotának beállítása az nyitáskor",
"SET": "BEÁLLÍT",
"CLR": "TÖRLÉS",
"Set RTS line status upon opening": "RTS vonal állapotának beállítása az nyitáskor",
"Use RTS/CTS flow control": "Használjon RTS/CTS áramvezérlést"
}
8 changes: 6 additions & 2 deletions src/app/i18n/it/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Aggiorna",
"Baud rate": "",
"Choose a baud rate": "",
"Enable hardware flow control": "",
"Connect automatically": "Connetti automaticamente",
"Open": "Apri",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Imposta lo stato della linea DTR all'apertura",
"SET": "IMPOSTA",
"CLR": "CANCELLA",
"Set RTS line status upon opening": "Imposta lo stato della linea RTS all'apertura",
"Use RTS/CTS flow control": "Utilizzare il controllo di flusso RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/ja/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "表示更新",
"Baud rate": "ボーレート",
"Choose a baud rate": "ボーレートを選択",
"Enable hardware flow control": "ハードウェアフローコントロールを有効",
"Connect automatically": "自動的に接続",
"Open": "開く",
"Error opening serial port '{{- port}}'": "シリアルポート '{{- port}}' を開くのに失敗しました",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "工具を表示する",
"Ready to start": "スタートの準備ができました",
"Connect to an IP camera": "IPカメラと接続",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "開くときにDTRラインの状態を設定する",
"SET": "設定",
"CLR": "クリア",
"Set RTS line status upon opening": "開くときにRTSラインの状態を設定する",
"Use RTS/CTS flow control": "RTS/CTSフロー制御を使用する"
}
8 changes: 6 additions & 2 deletions src/app/i18n/nb/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Oppfrisk",
"Baud rate": "Baud-hastighet",
"Choose a baud rate": "Velg baud-hastighet",
"Enable hardware flow control": "Enable hardware flow control",
"Connect automatically": "Koble til automatisk",
"Open": "Åpne",
"Error opening serial port '{{- port}}'": "Feil i åpning av seriellport '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "Vis skjæreverktøy",
"Ready to start": "Klar til å starte",
"Connect to an IP camera": "Koble til et IP-kamera",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Sett DTR-linjestatus ved åpning",
"SET": "SETT",
"CLR": "SLETT",
"Set RTS line status upon opening": "Sett RTS-linjestatus ved åpning",
"Use RTS/CTS flow control": "Bruk RTS/CTS strømstyring"
}
8 changes: 6 additions & 2 deletions src/app/i18n/nl/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Ververs",
"Baud rate": "Verbindingssnelheid",
"Choose a baud rate": "Kies een verbindingssnelheid",
"Enable hardware flow control": "Schakel hardware flow control in",
"Connect automatically": "Verbind automatisch",
"Open": "Open",
"Error opening serial port '{{- port}}'": "Fout bij openen seriële poort",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "Laat gereedschap zien",
"Ready to start": "Klaar om te starten",
"Connect to an IP camera": "Verbind met een IP camera",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Stel DTR-lijnstatus in bij opening",
"SET": "INSTELLEN",
"CLR": "WISSEN",
"Set RTS line status upon opening": "Stel RTS-lijnstatus in bij opening",
"Use RTS/CTS flow control": "Gebruik RTS/CTS-stroomregeling"
}
8 changes: 6 additions & 2 deletions src/app/i18n/pt-br/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Atualizar",
"Baud rate": "Taxa de transmissão",
"Choose a baud rate": "Escolha uma taxa de transmissão (baud rate)",
"Enable hardware flow control": "Ativar controle de fluxo de hardware",
"Connect automatically": "Conectar automaticamente",
"Open": "Abrir",
"Error opening serial port '{{- port}}'": "Erro abrindo porta serial '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Definir status da linha DTR na abertura",
"SET": "DEFINIR",
"CLR": "LIMPAR",
"Set RTS line status upon opening": "Definir status da linha RTS na abertura",
"Use RTS/CTS flow control": "Use o controle de fluxo RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/pt-pt/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Atualizar",
"Baud rate": "Taxa de transmissão",
"Choose a baud rate": "Escolha uma taxa de transmissão (baud rate)",
"Enable hardware flow control": "Ativar controle de fluxo de hardware",
"Connect automatically": "Conectar automaticamente",
"Open": "Abrir",
"Error opening serial port '{{- port}}'": "Erro ao abrir porta série '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "Mostrar Ferramenta",
"Ready to start": "",
"Connect to an IP camera": "Conectar a câmera IP",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Definir estado da linha DTR na abertura",
"SET": "DEFINIR",
"CLR": "LIMPAR",
"Set RTS line status upon opening": "Definir estado da linha RTS na abertura",
"Use RTS/CTS flow control": "Use o controlo de fluxo RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/ru/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Обновить",
"Baud rate": "Скорость передачи (baud rate)",
"Choose a baud rate": "Выберите скорость (baud rate)",
"Enable hardware flow control": "",
"Connect automatically": "Подключать автоматически",
"Open": "Открыть",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Установить статус линии DTR при открытии",
"SET": "УСТАНОВИТЬ",
"CLR": "ОЧИСТИТЬ",
"Set RTS line status upon opening": "Установить статус линии RTS при открытии",
"Use RTS/CTS flow control": "Используйте контроль потока RTS/CTS"
}
8 changes: 6 additions & 2 deletions src/app/i18n/tr/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "Yenile",
"Baud rate": "Band hızı",
"Choose a baud rate": "Bir band hızı seçin",
"Enable hardware flow control": "Donanım akış denetimini etkinleştir",
"Connect automatically": "Otomatik bağlan",
"Open": "",
"Error opening serial port '{{- port}}'": "Seri bağlantı noktası açılırken hata oluştu '{{- port}}'",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "Açılışta DTR hat durumunu ayarla",
"SET": "AYARLA",
"CLR": "TEMİZLE",
"Set RTS line status upon opening": "Açılışta RTS hat durumunu ayarla",
"Use RTS/CTS flow control": "RTS/CTS akış kontrolü kullanın"
}
8 changes: 6 additions & 2 deletions src/app/i18n/zh-cn/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "刷新",
"Baud rate": "波特率",
"Choose a baud rate": "选择波特率",
"Enable hardware flow control": "开启硬件流控制",
"Connect automatically": "自动连接",
"Open": "打开",
"Error opening serial port '{{- port}}'": "打开端口'{{- port}}'失败",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "打开时设置DTR线路状态",
"SET": "设置",
"CLR": "清除",
"Set RTS line status upon opening": "打开时设置RTS线路状态",
"Use RTS/CTS flow control": "使用RTS/CTS流控制"
}
8 changes: 6 additions & 2 deletions src/app/i18n/zh-tw/resource.json
Expand Up @@ -325,7 +325,6 @@
"Refresh": "重新整理",
"Baud rate": "鮑率",
"Choose a baud rate": "選擇鮑率",
"Enable hardware flow control": "",
"Connect automatically": "自動連線",
"Open": "開啟",
"Error opening serial port '{{- port}}'": "",
Expand Down Expand Up @@ -533,5 +532,10 @@
"Show Cutting Tool": "",
"Ready to start": "",
"Connect to an IP camera": "",
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": ""
"The URL should point to a stream in one of the following formats: Motion JPEG (mjpeg), RTSP, or H264 (MP4).": "",
"Set DTR line status upon opening": "開啟時設置DTR線路狀態",
"SET": "設置",
"CLR": "清除",
"Set RTS line status upon opening": "開啟時設置RTS線路狀態",
"Use RTS/CTS flow control": "使用RTS/CTS流量控制"
}
12 changes: 9 additions & 3 deletions src/app/store/defaultState.js
Expand Up @@ -65,9 +65,15 @@ const defaultState = {
connection: {
type: 'serial',
serial: {
// Hardware flow control (RTS/CTS)
rtscts: false
}
// RTS/CTS flow control
rtscts: false,
pin: {
// Set DTR line status (default to null)
dtr: null,
// Set RTS line status (default to null)
rts: null,
},
},
},
autoReconnect: true
},
Expand Down

0 comments on commit cb26c1c

Please sign in to comment.