]> granicus.if.org Git - esp-idf/commitdiff
tools: Accept CTRL-T + A for app-flash in idf_monitor
authorRoland Dobai <dobai.roland@gmail.com>
Thu, 27 Jun 2019 09:49:51 +0000 (11:49 +0200)
committerRoland Dobai <dobai.roland@gmail.com>
Thu, 27 Jun 2019 10:21:09 +0000 (12:21 +0200)
"CTRL-A" cannot be captured in Windows command line, so "A" can be used
instead.

docs/en/api-guides/tools/idf-monitor.rst
docs/zh_CN/api-guides/tools/idf-monitor.rst
tools/idf_monitor.py

index 2718a0adc5d244f1c11756cfed9b722bc24117b9..88e89d8f22729e423647c4e040100f7403c4e022 100644 (file)
@@ -34,13 +34,13 @@ For easy interaction with IDF Monitor, use the keyboard shortcuts given in the t
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |  - Ctrl+F         | Build and flash the project                            | Pauses idf_monitor to run the ``make flash`` (``idf.py flash``) target, then resumes idf_monitor. Any changed source files are recompiled and then re-flashed.   |
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|  - Ctrl+A         | Build and flash the app only                           | Pauses idf_monitor to run the ``app-flash`` target, then resumes idf_monitor. Similar to the ``flash`` target, but only the main app is built and re-flashed.    |
+|  - Ctrl+A (or A)  | Build and flash the app only                           | Pauses idf_monitor to run the ``app-flash`` target, then resumes idf_monitor. Similar to the ``flash`` target, but only the main app is built and re-flashed.    |
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |  - Ctrl+Y         | Stop/resume log output printing on screen              | Discards all incoming serial data while activated. Allows to quickly pause and examine log output without quitting the monitor.                                  |
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 |  - Ctrl+L         | Stop/resume log output saved to file                   | Creates a file in the project directory and the output is written to that file until this is disabled with the same keyboard shortcut (or IDF Monitor exits).    |
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-|  - Ctrl+H         | Display all keyboard shortcuts                         |                                                                                                                                                                  |
+|  - Ctrl+H (or H)  | Display all keyboard shortcuts                         |                                                                                                                                                                  |
 +-------------------+--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 
 Any keys pressed, other than ``Ctrl-]`` and ``Ctrl-T``, will be sent through the serial port.
index c47a071708500cbd56cf7f38124b39d96c3e3fdd..d756422da410eea7eb917fdd2f30a57a5b129eaf 100644 (file)
@@ -27,10 +27,10 @@ Ctrl+T              菜单退出键
 - Ctrl+P            重置目标设备,进入 Bootloader,通过 RTS 线暂停应用程序                         重置目标设备,通过 RTS 线(如已连接)进入 Bootloader,此时开发板不运行任何程序。等待其他设备启动时可以使用此操作。
 - Ctrl+R            通过 RTS 线重置目标设备                                                     重置设备,并通过 RTS 线(如已连接)重新启动应用程序。
 - Ctrl+F            编译并烧录此项目                                                            暂停 idf_monitor,运行 ``make flash`` (``idf.py flash``) 目标,然后恢复 idf_monitor。任何改动的源文件都会被重新编译,然后重新烧录。
-- Ctrl+A            仅编译及烧录应用程序                                                        暂停 idf_monitor,运行 ``app-flash`` 目标,然后恢复 idf_monitor。 这与 ``flash`` 类似,但只有主应用程序被编译并被重新烧录。
+- Ctrl+A (A)        仅编译及烧录应用程序                                                        暂停 idf_monitor,运行 ``app-flash`` 目标,然后恢复 idf_monitor。 这与 ``flash`` 类似,但只有主应用程序被编译并被重新烧录。
 - Ctrl+Y            停止/恢复日志输出在屏幕上打印                                                激活时,会丢弃所有传入的串行数据。允许在不退出监视器的情况下快速暂停和检查日志输出。
 - Ctrl+L            停止/恢复向文件写入日志输出                                                  在工程目录下创建一个文件,用于写入日志输出。可使用快捷键停止/恢复该功能(退出 IDF 监视器也会终止该功能)
-- Ctrl+H            显示所有快捷键
+- Ctrl+H (H)        显示所有快捷键
 =================== ======================================================================== =======================================================================================================================================================================================
 
 除了 ``Ctrl-]`` 和 ``Ctrl-T``,其他快捷键信号会通过串口发送到目标设备。
index f5c5918c46c9369a004564a082e8a8968267ecd7..4700980b0ba99d0a523f859cbdb1d681cc3b826e 100755 (executable)
@@ -477,7 +477,9 @@ class Monitor(object):
             self.output_enable(True)
         elif c == CTRL_F:  # Recompile & upload
             self.run_make("flash")
-        elif c == CTRL_A:  # Recompile & upload app only
+        elif c in [CTRL_A, 'a', 'A']:  # Recompile & upload app only
+            # "CTRL-A" cannot be captured with the default settings of the Windows command line, therefore, "A" can be used
+            # instead
             self.run_make("app-flash")
         elif c == CTRL_Y:  # Toggle output display
             self.output_toggle()
@@ -504,20 +506,20 @@ class Monitor(object):
 --- {exit:8} Exit program
 --- {menu:8} Menu escape key, followed by:
 --- Menu keys:
----    {menu:7} Send the menu character itself to remote
----    {exit:7} Send the exit character itself to remote
----    {reset:7} Reset target board via RTS line
----    {makecmd:7} Build & flash project
----    {appmake:7} Build & flash app only
----    {output:7} Toggle output display
----    {log:7} Toggle saving output into file
----    {pause:7} Reset target into bootloader to pause app via RTS line
+---    {menu:14} Send the menu character itself to remote
+---    {exit:14} Send the exit character itself to remote
+---    {reset:14} Reset target board via RTS line
+---    {makecmd:14} Build & flash project
+---    {appmake:14} Build & flash app only
+---    {output:14} Toggle output display
+---    {log:14} Toggle saving output into file
+---    {pause:14} Reset target into bootloader to pause app via RTS line
 """.format(version=__version__,
            exit=key_description(self.exit_key),
            menu=key_description(self.menu_key),
            reset=key_description(CTRL_R),
            makecmd=key_description(CTRL_F),
-           appmake=key_description(CTRL_A),
+           appmake=key_description(CTRL_A) + ' (or A)',
            output=key_description(CTRL_Y),
            log=key_description(CTRL_L),
            pause=key_description(CTRL_P))