nakagawa kit emurator (add CR) BaudRate 115200,p20

Dependencies:   mbed NetServicesMin

Revision:
3:51e64f5e42b8
Parent:
2:c3f3d783560d
Child:
4:9daa308155d6
--- a/main.cpp	Thu Mar 22 15:15:10 2012 +0000
+++ b/main.cpp	Tue Apr 17 03:38:00 2012 +0000
@@ -2,13 +2,13 @@
 #include "data_models.h"
 
 
-Serial serial(USBTX, USBRX);
+Serial pc(USBTX, USBRX);
 DigitalIn din(p20);
 
 void serialInit(void){
 
-    serial.baud(115200);
-    serial.format(8, Serial::None, 1);
+    pc.baud(115200);
+    pc.format(8, Serial::None, 1);
      
 }
 
@@ -16,10 +16,10 @@
 
     uint8_t *d=(uint8_t *)&data->ftype;
     
-    for(uint8_t i=0 ; i<65 ; i++){
+    for(uint8_t i=0 ; i<67 ; i++){
     
-       if(d[i]==0x0A)   serial.putc(0x0D); //add CR LF
-        serial.putc(d[i]);
+       if(d[i]==0x0A)   pc.putc(0x0D); //add CR LF
+        pc.putc(d[i]);
         
     }
 }
@@ -36,9 +36,9 @@
     payloadToNetwork(&payload);
     
     while(1) {
-        if(!din){
+ //       if(!din){
             sendPayload(&payload);
             wait(0.2);
-         } 
+//         } 
     }
 }