Possible idea to fix slow Break time on serial-based controllers degrading refresh rate
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- embedded-iot
調査の方向性
まず SerialController._transmit() メソッドを読み、現在の send_break シーケンスを、提案されているボーレートおよびヌルバイトのシーケンスと比較します。生のシリアルテストを再現し、その後、利用可能なプラットフォーム全体でコントローラーの動作を検証します。説明されているフラッシュまたは再構成の問題なしに DMX のリフレッシュが改善されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi.
Having the same problem on another platform (Linux, PC), I found another solution : instead of explicitely sending a Break, if we send a null byte at a slow enough baudrate, it will be interpreted as a Break followed by the Mark-After-Break on the fixtures' side.
(I thought about this trick first for microcontrollers with rudimentary UARTs which can't explicitely send Break states).
Therefore, in the _transmit() method from the SerialController class, instead of :
# Write
self.__device.send_break(100e-6)
sleep(10e-6)
self.__device.write(data)
I would do something like :
#self.__device.flush()
self.__device.baudrate = 80000
self.__device.write(bytearray(0))
self.__device.flush()
self.__device.baudrate = 250000
self.__device.write(data)
#self.__device.flush()
Because the serial device stays opened, we need to flush the write operations before changing the baudrate (it is not done in the Serial class, despite the reconfiguration), especially just after writing the null byte at a slower baudrate.
However, whereas a flush after writing the DMX data is required in a raw test of this code snippet, it seems to break things when done inside the SerialController class, for an unknown reason.
So the fix can unfortunately not be validated yet, not counting that I can't test it on several platforms.
By the way, the raw test shows a refresh rate of 34Hz or a bit more (VS the theoretical maximum of 44Hz) for a 512-channel frame : it seems not so bad, given the processor time consumed by the Python interpreter and all software layers down to the kernel.
What do you think about it ?
- 主要言語
- Python
- スター
- 143
- フォーク
- 23
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MattIPv4/PyDMXControl のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
MattIPv4/PyDMXControl#58 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MattIPv4/PyDMXControl#56 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
MattIPv4/PyDMXControl#55 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
MattIPv4/PyDMXControl#52 · コメント 5 件 ·
-
Custom Channels オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
MattIPv4/PyDMXControl#51 · コメント 3 件 ·
MattIPv4/PyDMXControl の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100