summaryrefslogtreecommitdiffstats
path: root/heimdall/source/ClosePcScreenAction.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-04 19:33:12 +0200
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-06 13:39:07 +0200
commita5452e884a1f1119d87e12e42d6ca9745617d054 (patch)
tree747607f94cfc92456a5aa6e86d5cba42290118c5 /heimdall/source/ClosePcScreenAction.cpp
parentautogen'd for 1.4.1 (diff)
downloadHeimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.gz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.bz2
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.lz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.xz
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.zst
Heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.zip
Diffstat (limited to 'heimdall/source/ClosePcScreenAction.cpp')
-rw-r--r--heimdall/source/ClosePcScreenAction.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/heimdall/source/ClosePcScreenAction.cpp b/heimdall/source/ClosePcScreenAction.cpp
index 2bc1b61..a72eab6 100644
--- a/heimdall/source/ClosePcScreenAction.cpp
+++ b/heimdall/source/ClosePcScreenAction.cpp
@@ -29,9 +29,12 @@ using namespace std;
using namespace Heimdall;
const char *ClosePcScreenAction::usage = "Action: close-pc-screen\n\
-Arguments: [--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
+Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\
[--usb-log-level <none/error/warning/debug>]\n\
-Description: Attempts to get rid off the \"connect phone to PC\" screen.\n";
+Description: Attempts to get rid off the \"connect phone to PC\" screen.\n\
+Note: --no-reboot causes the device to remain in download mode after the action\n\
+ is completed. If you wish to perform another action whilst remaining in\n\
+ download mode, then the following action must specify the --resume flag.";
int ClosePcScreenAction::Execute(int argc, char **argv)
{
@@ -40,7 +43,6 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
map<string, ArgumentType> argumentTypes;
argumentTypes["no-reboot"] = kArgumentTypeFlag;
argumentTypes["resume"] = kArgumentTypeFlag;
- argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
@@ -53,9 +55,7 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
return (0);
}
- const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
const StringArgument *usbLogLevelArgument = static_cast<const StringArgument *>(arguments.GetArgument("usb-log-level"));
-
BridgeManager::UsbLogLevel usbLogLevel = BridgeManager::UsbLogLevel::Default;
if (usbLogLevelArgument)
@@ -104,12 +104,7 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
// Download PIT file from device.
- int communicationDelay = BridgeManager::kCommunicationDelayDefault;
-
- if (communicationDelayArgument)
- communicationDelay = communicationDelayArgument->GetValue();
-
- BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay);
+ BridgeManager *bridgeManager = new BridgeManager(verbose);
bridgeManager->SetUsbLogLevel(usbLogLevel);
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())