mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-30 19:12:07 +08:00
move global connected_once into function static (#19999)
old-commit-hash: 13ea8b5fc9e7742eea4b1b2e0e036b12e0cdce6a
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
Panda * panda = NULL;
|
||||
std::atomic<bool> safety_setter_thread_running(false);
|
||||
std::atomic<bool> ignition(false);
|
||||
bool connected_once = false;
|
||||
|
||||
ExitHandler do_exit;
|
||||
struct tm get_time(){
|
||||
@@ -118,6 +117,8 @@ void safety_setter_thread() {
|
||||
|
||||
|
||||
bool usb_connect() {
|
||||
static bool connected_once = false;
|
||||
|
||||
std::unique_ptr<Panda> tmp_panda;
|
||||
try {
|
||||
assert(panda == NULL);
|
||||
|
||||
Reference in New Issue
Block a user