Custom Widget to Send Keyboard Input From Cockpit

Hello BlueRobotics Community:

I made a custom widget that mapped the keyboard input (WAD) and send over to the FC as a RC_CHANNELS_OVERRIDE packet. It’s missing a S because my boat can’t go backward (sadly). You can modify it easily.

I got the idea from monitoring the packets send from my Radiomaster to the FC, and I decided to ‘hijacked’ the packet and managed to somewhat hacked it. My set up is: Laptop with cockpit desktop installed, companion chip is Rock 5T and FC is 7-nano. I am running BlueOS docker on the Rock 5T.

To use the code, you can just import it in Cockpit’s custom widget and you might want to change the ROCK5T_IP to the ip address of your own companion chip. The channels’ values are tuned to my own Radiomaster’s and you might want to calibrate them too. (I used MissionPlanner to calibrate it)

advanced-control-widget.json (5.6 KB)

Tried here! Super cool!

Can I make two suggestions?

  1. Make it so the container adapts to the size of the widget instance, centering the main container (red border) and have a transparent background (so that grey area does not appear).
  2. Since there are some parts to be configured, it would be cool if it had a configuration menu for the user to change the IP address and mappings.

Thanks for your reply and feedback! Will work on this after I finish other work at hands HAHAHA :folded_hands: :star_struck:

check this out !

advanced-control-widget.json (5.6 KB)

Alex, I believe you uploaded the same file! This one is identical to the first.

Yo Rafael check this out!

diy-widget-config1.0.json (12.7 KB)

The widget itself is much better now! Nice work!

On the other hand, a black rectangle appeared in the top-left corner of my screen. It appears to be the configuration menu of the widget. There seems to be no way of closing it now :sweat_smile:

@alexgosleep a tip: if you just remove the top and left CSS attributes from the config-modal element, it will work:

Yoo rafael, thanks for the tip!!