LCAS / CallARobot

A simple web interface to call a robot
MIT License
3 stars 10 forks source link

Adding row selection #21

Closed marc-hanheide closed 6 months ago

marc-hanheide commented 6 months ago

What type of PR is this? (check all applicable)

Description

Starting work on adding drop down option to select a picker's row.

Related Tickets & Documents

For the attention of @Iranaphor and @amieo-ra

marc-hanheide commented 6 months ago

This is only a start, with the GUI element added.

Iranaphor commented 6 months ago

We need to include a callback function onto the dropdown box change. (similar to: https://github.com/LCAS/CallARobot/blob/da0be7a690383626971f37bfbacd576c11418cb0/call_a_robot/www/orders.html#L249C82-L253C74).

This should trigger a function similar to: https://github.com/LCAS/CallARobot/blob/da0be7a690383626971f37bfbacd576c11418cb0/call_a_robot/callarobot.py#L131

For the data to be processed through. I dont think the orders page actually sends gps information through the system so this may also need to copied over from callarobot.html too.

marc-hanheide commented 6 months ago

I'd probably just set a cookie with that information and send it through with every GPS update

marc-hanheide commented 6 months ago

I'd probably just set a cookie with that information and send it through with every GPS update

that was non-sense... won't work with a cookie, will have to be stored on the server.

marc-hanheide commented 6 months ago

OK, I have completed my work here. It appears to be working. The only thing that's not quite working yet is that when the orders page reloads it doesn't show the previous selection. As before, it uses the environment variable CAR_ROWS, so e.g. CAR_ROWS='A1 A2' python call_a_robot/callarobot.py offers 2 rows to select from.

With every position (GPS) update from a client, the row is published with it, so that @nikolauswagner should be able to get it from the regular message sent out along with the latitude and longitude.

The devcontainer should allow to use as indicated above. with ports 8127 and 8128 needed for testing (http and websocket).

marc-hanheide commented 6 months ago

I have merged, if there are any issues with it, please open a new ticket.