Skip to content

Conversation

@realteck-ky
Copy link

KONDOのICSパケットサポートを追加しました。
KONDOのパケットは送信と受信がセットのため、sendのみではなくreceiveまで待って値等を取得するようにしています。

コンストラクタの引数ですが、以下を拡張で追加しています。

  • version: ICSのバージョンを明示的に指定するように追加
  • loopback: DualUSBアダプタは送信コマンドを受信するため、受信バイト数調整のために追加
  • slave: KONDOサーボのスレーブモードは値を返却しないため追加

またTODOコメントを入れて処理を実装していない関数がいくつかあるのですが、これらはプロトコル上対応可能だけど私の時間が取れなかったため実装できていないものです。
動作チェックは角度の取得、指示に関してはできていますが他は確認していません。
塩漬けになりそうだったので、一旦プルリクエストさせてください。

Copy link
Collaborator

@s-takatsuki s-takatsuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大変遅くなりました。一先ずサンプルを動作させてみた結果、3点気になる所があったので確認お願いします。

send_command.append(sc)
send_command.append(sc)

print("send_command:", send_command)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出力を削除するか、logger.debugを使用したほうが良いかもしれません。

raise InvalidResponseDataException("送信コマンドを正しくループバックできていません。")
recv_command = recv_byte_list[offset:]

print("recv_command:", recv_command)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出力を削除するか、logger.debugを使用したほうが良いかもしれません。

self.set_target_position(pos, sid=sid)
else:
# Free状態を送信
self._send_recv(sid, self.CMD_POSITION, data=[0x00, 0x00])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data -> send_data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants