![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Versão do protegemed que calcula o tempo em ms da fuga, calcula o numero de onverflow (valores muito baixo) e underflow (valores muito altos). Além disso, calcula um valor médio a partir dos valores capturados e não apenas pela fft.
Dependencies: EthernetInterface mbed-rtos mbed
Codes/TelnetCommands/telnet_version.cpp
- Committer:
- rebonatto
- Date:
- 2014-07-09
- Revision:
- 0:c64e1194230b
File content as of revision 0:c64e1194230b:
#include "TelnetServer.h" char *header_msg_version = "Protegemed - version information:\r\n\r\n"; char *fwversion_msg = "FW Version: "; char *builddate_msg = "\r\nBuild Date: "; char *fwfile_msg = "\r\nFW Filename: "; char *fwfile_not_available_msg = "Information not available"; #define VERSION_TEXT "2.0" #define BUILD_TEXT __TIME__ int TelnetServer::VersionCommand(TCPSocketConnection *conn,char** argv,int argc) { conn->send(header_msg_version,strlen(header_msg_version)); conn->send(fwversion_msg,strlen(fwversion_msg)); conn->send(VERSION_TEXT,strlen(VERSION_TEXT)); conn->send(builddate_msg,strlen(builddate_msg)); conn->send(BUILD_TEXT,strlen(BUILD_TEXT)); //printf("Version\n"); conn->send(fwfile_msg,strlen(fwfile_msg)); FILE *f = fopen("/local/version.txt","r"); if(f != NULL) { char buf[20]; fread(buf,1,19,f); buf[19]='\0'; conn->send(buf,strlen(buf)); fclose(f); } else { conn->send(fwfile_not_available_msg,strlen(fwfile_not_available_msg)); } conn->send("\r\n\r\n",strlen("\r\n\r\n")); return 0; }