Display manufacturer name from the PID files to make life easier during RDM testing#1237
Conversation
…complete correctly
|
This probably wants a more traditional review please @nomis52 . Any thoughts on the questions at the top welcome too, i.e. manufacturer_pids.proto or a separate manufacturer_names.proto? The current JS changes are designed to be backwards compatible, but we could just replace the old drop down data, at the risk of breaking if someone ends up running a new UI pointing at an old RDM test server, or vice versa. |
|
|
||
| echo "Fetching PID data from $datahost" | ||
|
|
||
| curl -o pids.proto -f http://$datahost/download?pids=esta |
There was a problem hiding this comment.
This change is because curl doesn't overwrite the file if the get fails for some reason.
| response.SetStatus(HTTPResponse.OK) | ||
| return { | ||
| 'uids': [str(u) for u in uids], | ||
| 'nameduids': dict( |
There was a problem hiding this comment.
This is to keep compatibility with mismatched JS and Python ends.
| $.each(uids, function(item) { | ||
| devices_list.append($('<option />').val(uids[item]).text(uids[item])); | ||
| }); | ||
| if (data['nameduids'] != undefined) { |
There was a problem hiding this comment.
This is to keep compatibility with mismatched JS and Python ends.
…ently access the names in C++
|
This is probably a good point for a review and merge @nomis52 . It should load (and ignore) the manufacturer names in C++ currently, but they work as intended in Python and the RDM test stuff. The other stuff can follow in a future PR. |
|
Thanks @nomis52 . I'll get this in and address the outstanding tasks in a future PR. |
Still need to:
Decide if we store all the manufacturer names in the existing manufacturer_pids.proto or in a separate manufacturer_names.proto (same structure, no PIDs)Gone for separate file for potential different update frequencies and to avoid loading when not required