Update to new build system.
[clinton/Smoothieware.git] / src / modules / communication / SerialConsole.cpp
index b5297c7..4d55aad 100644 (file)
@@ -50,6 +50,7 @@ void SerialConsole::on_serial_char_received(){
 void SerialConsole::on_main_loop(void * argument){
     if( this->has_char('\n') ){
         string received;
+        received.reserve(20);
         while(1){
            char c;
            this->buffer.pop_front(c);
@@ -67,13 +68,9 @@ void SerialConsole::on_main_loop(void * argument){
 }
 
 
-int SerialConsole::printf(const char* format, ...){
-    va_list args;
-    int result;
-    va_start (args, format);
-    result = vfprintf( this->serial->_file, format, args);
-    va_end (args);
-    return result;
+int SerialConsole::puts(const char* s)
+{
+    return fwrite(s, strlen(s), 1, (FILE*)this->serial);
 }
 
 int SerialConsole::_putc(int c)