Add #derive[clone] to framebuffer struct#54
Add #derive[clone] to framebuffer struct#54UlmerMan wants to merge 4 commits intolit-robotics:mainfrom
Conversation
|
Adding clone on |
|
So i have typically had one thread to handle the libcamera interaction and then other threads for other things, this can work ok https://gitlab.com/pointswaves/e-camera/-/blob/willsalmon/pi/hmi-app/src/main.rs?ref_type=heads https://gitlab.com/gorse/pi-camera/-/tree/trying?ref_type=heads both use this and while there very messy they do work. Its not to say that its the only way to go tho. Clone is typically a bit of a issue because it allow you to have 2 versions of the same thing, and if libcamera has one pointer and we have two things doing different things to it then we can have issues. That said we might be able to send structs between threads, I think that is the functionally you really want. |
|
@fishrockz this is the thing I need but I am not a that good of a rust developer to implement that the best why so I just used clone |
I added derive(Clone) to some structs, as i need this for my current project. Because I need to have the raw data and not a reference, as i want to pass it on to a different thread.