From a5452e884a1f1119d87e12e42d6ca9745617d054 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 5 May 2014 03:33:12 +1000 Subject: Cleaned up command line interface - Removed the "--delay " argument. - Improved Action usage info. --- heimdall/source/ClosePcScreenAction.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'heimdall/source/ClosePcScreenAction.cpp') 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 ]\n\ +Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\ [--usb-log-level ]\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 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(arguments.GetArgument("delay")); const StringArgument *usbLogLevelArgument = static_cast(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()) -- cgit v1.1 From 9f957a193701788cac66292daea2c89ed94a033f Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Tue, 6 May 2014 22:52:10 +1000 Subject: Updated copyright notices to 2014 --- heimdall/source/ClosePcScreenAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/ClosePcScreenAction.cpp') diff --git a/heimdall/source/ClosePcScreenAction.cpp b/heimdall/source/ClosePcScreenAction.cpp index a72eab6..1a3387c 100644 --- a/heimdall/source/ClosePcScreenAction.cpp +++ b/heimdall/source/ClosePcScreenAction.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna +/* Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -- cgit v1.1 From e6fdafd4829842d96eefa3163b6149265819fe95 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 11 May 2014 19:26:26 +1000 Subject: Fixed help output alignment. --- heimdall/source/ClosePcScreenAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/ClosePcScreenAction.cpp') diff --git a/heimdall/source/ClosePcScreenAction.cpp b/heimdall/source/ClosePcScreenAction.cpp index 1a3387c..edc7157 100644 --- a/heimdall/source/ClosePcScreenAction.cpp +++ b/heimdall/source/ClosePcScreenAction.cpp @@ -34,7 +34,7 @@ Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\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."; + download mode, then the following action must specify the --resume flag."; int ClosePcScreenAction::Execute(int argc, char **argv) { -- cgit v1.1 From abea6dbbe0456c374b7889d61902023178beb09b Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Thu, 15 May 2014 00:59:13 +1000 Subject: Added missing new lines to CLI help output. --- heimdall/source/ClosePcScreenAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/ClosePcScreenAction.cpp') diff --git a/heimdall/source/ClosePcScreenAction.cpp b/heimdall/source/ClosePcScreenAction.cpp index edc7157..16e30aa 100644 --- a/heimdall/source/ClosePcScreenAction.cpp +++ b/heimdall/source/ClosePcScreenAction.cpp @@ -34,7 +34,7 @@ Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\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."; + download mode, then the following action must specify the --resume flag.\n"; int ClosePcScreenAction::Execute(int argc, char **argv) { -- cgit v1.1