You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "takumiando (via GitHub)" <gi...@apache.org> on 2023/05/15 08:56:11 UTC

[GitHub] [nuttx-apps] takumiando opened a new pull request, #1755: nshlib: Add support for disabling echoback

takumiando opened a new pull request, #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755

   ## Summary
   
   If ```CONFIG_NSH_DISABLE_ECHOBACK``` is selected, the NSH disables echoback prompt.
   I needed this changes to use ```nsh``` like a AT-command based modem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 merged pull request #1755: nshlib: Add support for disabling echoback

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1755: nshlib: Add support for disabling echoback

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#issuecomment-1550774421

   @takumiando could you fetch the latest master, rebase your change and push again? CI break is fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1755: nshlib: Add support for disabling echoback

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#discussion_r1193554530


##########
nshlib/nsh_session.c:
##########
@@ -169,6 +170,21 @@ int nsh_session(FAR struct console_stdio_s *pstate,
         }
     }
 
+#if CONFIG_NSH_DISABLE_ECHOBACK

Review Comment:
   should we move the change before line 104?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] takumiando commented on a diff in pull request #1755: nshlib: Add support for disabling echoback

Posted by "takumiando (via GitHub)" <gi...@apache.org>.
takumiando commented on code in PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#discussion_r1193576538


##########
nshlib/nsh_session.c:
##########
@@ -169,6 +170,21 @@ int nsh_session(FAR struct console_stdio_s *pstate,
         }
     }
 
+#if CONFIG_NSH_DISABLE_ECHOBACK

Review Comment:
   I don’t get it...
   Could you explain that please?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] takumiando commented on pull request #1755: nshlib: Add support for disabling echoback

Posted by "takumiando (via GitHub)" <gi...@apache.org>.
takumiando commented on PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#issuecomment-1552329147

   @xiaoxiang781216 @pkarashchenko 
   Thanks, I fixed them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on pull request #1755: nshlib: Add support for disabling echoback

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#issuecomment-1551732165

   @takumiando you has to fix this warning:
   ```
   nsh_session.c: In function 'nsh_session':
   Error: nsh_session.c:173:5: error: "CONFIG_NSH_DISABLE_ECHOBACK" is not defined, evaluates to 0 [-Werror=undef]
     173 | #if CONFIG_NSH_DISABLE_ECHOBACK
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1755: nshlib: Add support for disabling echoback

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#discussion_r1194096997


##########
nshlib/nsh_session.c:
##########
@@ -169,6 +170,21 @@ int nsh_session(FAR struct console_stdio_s *pstate,
         }
     }
 
+#if CONFIG_NSH_DISABLE_ECHOBACK

Review Comment:
   please ingore my suggestoin, look like the code before the change never reads from /dev/console



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx-apps] pkarashchenko commented on a diff in pull request #1755: nshlib: Add support for disabling echoback

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #1755:
URL: https://github.com/apache/nuttx-apps/pull/1755#discussion_r1196961489


##########
nshlib/nsh_session.c:
##########
@@ -169,6 +170,21 @@ int nsh_session(FAR struct console_stdio_s *pstate,
         }
     }
 
+#if CONFIG_NSH_DISABLE_ECHOBACK
+  /* Disable echoback */
+
+  struct termios cfg;
+
+  if (isatty(INFD(pstate)))
+    {
+      if (tcgetattr(INFD(pstate), &cfg) == 0)

Review Comment:
   ```suggestion
     if (isatty(INFD(pstate)))
       {
         struct termios cfg;
   
         if (tcgetattr(INFD(pstate), &cfg) == 0)
   ```



##########
nshlib/nsh_session.c:
##########
@@ -169,6 +170,21 @@ int nsh_session(FAR struct console_stdio_s *pstate,
         }
     }
 
+#if CONFIG_NSH_DISABLE_ECHOBACK

Review Comment:
   ```suggestion
   #ifdef CONFIG_NSH_DISABLE_ECHOBACK
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org