fix thread safety issue in camera focusing (#19576)

This commit is contained in:
Dean Lee
2021-01-04 17:18:10 +08:00
committed by GitHub
parent 37826c0032
commit 06e3b1e445
+1 -1
View File
@@ -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;