From 86c45e63b198fd7bd9ddcbfdf33fa5d0a4d2b96f Mon Sep 17 00:00:00 2001 From: That One Seong Date: Tue, 25 Jun 2024 15:44:29 -0400 Subject: [PATCH] Add contingency for "device not available" feedback (camera error) --- guiwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guiwindow.cpp b/guiwindow.cpp index ca25660..831266a 100644 --- a/guiwindow.cpp +++ b/guiwindow.cpp @@ -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;