mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
fix(wx): remove disconnects handling during dfu transition
when the text "device has entered dfu" appeared, theres a 3 second window where it waits until it transitions to the exploit screen, and during that moment device disconnect handling was being incorrectly handled when it shouldnt of been
This commit is contained in:
2 files changed
+7
-1
No files matched your search
+6
-1
@@ -160,6 +160,7 @@ void DfuPanel::SetDeviceState(const DeviceState& state)
|
||||
m_index = m_sequence.steps.size();
|
||||
m_stepRemaining = -1;
|
||||
m_actionExecutedIndex = -1;
|
||||
m_waitingForDfuTransition = true;
|
||||
|
||||
const wxColour inactive =
|
||||
wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
||||
@@ -191,8 +192,11 @@ void DfuPanel::SetDeviceState(const DeviceState& state)
|
||||
GetMainFrame()->ShowMain();
|
||||
}
|
||||
|
||||
if (!m_isEnteringDfu && !state.connected)
|
||||
if (!state.connected)
|
||||
{
|
||||
if (m_isEnteringDfu || m_waitingForDfuTransition)
|
||||
return;
|
||||
|
||||
m_isEnteringDfu = false;
|
||||
m_backButton->Enable();
|
||||
m_startButton->Enable();
|
||||
@@ -362,6 +366,7 @@ void DfuPanel::StartSequence(const DfuSequence& seq)
|
||||
m_index = 0;
|
||||
m_stepRemaining = -1;
|
||||
m_actionExecutedIndex = -1;
|
||||
m_waitingForDfuTransition = false;
|
||||
|
||||
RunStep();
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@ private:
|
||||
wxTimer m_timer;
|
||||
wxTimer m_stagnentTimer;
|
||||
bool m_isEnteringDfu = false;
|
||||
bool m_waitingForDfuTransition = false;
|
||||
|
||||
wxPanel* m_devicePanel = nullptr;
|
||||
wxStaticBitmap* m_deviceImage = nullptr;
|
||||
|
||||
Reference in new issue
Block a user