Skip to content

Commit

Permalink
Add contingency for "device not available" feedback (camera error)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeongGino authored Jun 25, 2024
1 parent 6e1a79e commit 86c45e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions guiwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ bool guiWindow::SerialInit(int portNum)
tinyUSBtable_orig.tinyUSBname = tinyUSBtable.tinyUSBname;
SerialLoad();
return true;
} else if(buffer[0].contains("Device not available")) {
PopupWindow("Camera not available!", "Device was detected, but data received indicates that the camera is in a bad state.\nThis can happen if the camera wires are crossed (data wire to clock pin, clock wire to data pin).\n\nThe camera must be removed or resoldered to resolve this.", "Device Error!", 3);
return false;
} else {
qDebug() << "Port did not respond with expected response! Seong fucked this up again.";
return false;
Expand Down

0 comments on commit 86c45e6

Please sign in to comment.