move global connected_once into function static (#19999)

pull/20004/head
Dean Lee 4 years ago committed by GitHub
parent 91504176e4
commit 13ea8b5fc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/boardd/boardd.cc

@ -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);

Loading…
Cancel
Save