Bläddra i källkod

[telnet_server]fix interrupt process (Ctrl+C)

balbekova 5 år sedan
förälder
incheckning
08bf632b4d
2 ändrade filer med 2 tillägg och 1 borttagningar
  1. 1 1
      modules/Telnet_Server/CLI_Commands.c
  2. 1 0
      modules/Telnet_Server/telnet_server.c

+ 1 - 1
modules/Telnet_Server/CLI_Commands.c

@@ -405,7 +405,7 @@ generates a table that shows how much run time each task has */
 static const CLI_Command_Definition_t prvSensorCommandDefinition =
 {
 	( const int8_t * const ) "sensor", /* The command string to type. */
-	( const int8_t * const ) "\tsensor info: вывод параметров системы\r\n"
+	( const int8_t * const ) "\tsensor info: вывод параметров системы (прерывание процесса Ctrl+C далее Enter)\r\n"
 #ifdef HARDWARE_BT6706
 								"\tsensor 	setup DI <num> <state>: установка нормального состояния сухого контакта:\r\n"
 								"\t\t\t\t0 - разомкнутое состояние\r\n"

+ 1 - 0
modules/Telnet_Server/telnet_server.c

@@ -343,6 +343,7 @@ static void getchar(telnetd_state_t *s)
 	}
   else if (s->buf[s->bufptr] == 0x03){
 	  xTimerStop(s->RepeatSensorInfoTimer, 0);
+	  s->flag_telnet_ip_option = true;
 	  if(s->telnetState != TELNET_CHANGE_PWD && s->telnetState != TELNET_CHANGE_PWD_ACK)
 	  	send( s->num_connect, pcEndOfCommandOutputString, strlen( ( const char * ) pcEndOfCommandOutputString ), 0 );
   }