mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-10 14:02:04 +08:00
fix thread safety issue in camera focusing (#19576)
This commit is contained in:
@@ -98,7 +98,7 @@ typedef struct CameraState {
|
||||
int16_t focus[NUM_FOCUS];
|
||||
uint8_t confidence[NUM_FOCUS];
|
||||
|
||||
float focus_err;
|
||||
std::atomic<float> focus_err;
|
||||
|
||||
uint16_t cur_step_pos;
|
||||
uint16_t cur_lens_pos;
|
||||
|
||||
Reference in New Issue
Block a user