wpilibsuite / WPILibPi

WPILib Raspberry Pi images designed for FRC (formerly FRCVision)
Other
87 stars 40 forks source link

Vision Application Configuration - Application Set To Custom - Does Not Persist On Reboot #91

Open Sn3akyP3t3 opened 5 years ago

Sn3akyP3t3 commented 5 years ago

image After saving and rebooting I found I wasn't able to start my application from terminal because the camera was already in use. After a bit of troubleshooting I found another process was running and it was the last uploaded Python application via the Vision Application Configuration screen. The setting had been undesirably reverted after reboot.

I failed to allocate time to try to recreate this a 2nd time, but I'll be sure to do so tonight.

PeterJohnson commented 5 years ago

I think this may have been fixed in 2019.2.1. Please try that version if you haven’t yet.

Sn3akyP3t3 commented 5 years ago

That is the version I'm currently on. I'll try again soon to confirm the behavior.

PeterJohnson commented 5 years ago

Oh. I reproduced it. The problem is that you can't really "set" custom. Custom is if the runCamera script has been edited remotely to remove the "TYPE" line. I'm not sure how to better document this. The initial state of that display in the webdash is based on reading the file, and the whole point of "custom" is to not write the file, because it's user-edited. Maybe I could change it to edit if it's being changed from a standard one.

Sn3akyP3t3 commented 5 years ago

What would be the advised intermediate solution if someone did this and needs to recover?

I was thinking that upload an empty file and then make sure not to upload anything afterwards should nullify the problem until a fix can arrive.

I know my team will need this to persist. Our process has classes and multiple files so we can't use the uploader since it works only with single files. We will have to leverage cron to kick off the process on boot.

PeterJohnson commented 5 years ago

The webdash just shows what's in the TYPE comment of the runCamera script. If you edit the runCamera script, just remove the TYPE line, and the webdash will show that as "custom" and never edit the file (unless the type is changed on that screen from custom to something else)

Sn3akyP3t3 commented 5 years ago

K, that did the trick.