Changes between Version 9 and Version 10 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/StartRepeatMulti
- Timestamp:
- 05/29/14 16:28:31 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/Weight/StartRepeatMulti
v9 v10 90 90 91 91 MnBdSetEvent(MNBD_REQ_REP_MULTI, MnBdEventMultiRcv); 92 MnBdSetCommEvent(MnBdSerialDataRcv); 92 93 93 94 SetBackgroundEvent(BackgroundEventComm); … … 106 107 FORM_RUN(Main); 107 108 FORM_HIDE(Main); 109 110 MnBdClearCommEvent(); 108 111 109 112 StopRepeatMulti(); … … 159 162 } 160 163 164 struct mnbd_serial_struct 165 { 166 char buffer[100]; 167 int pos; 168 } mnbd_serial[2] = { { "", 0 }, { "", 0 } }; 169 170 171 int MnBdSerialDataRcv(int nPort, int nLen, unsigned char* data) 172 { 173 int n; 174 for(n = 0; n < nLen; n++) 175 { 176 if(data[n] == '\r') 177 { 178 mnbd_serial[nPort].buffer[mnbd_serial[nPort].pos = '\0'; 179 printf("rcv com %d [%s]\r\n", nPort + 3, mnbd_serial[nPort].buffer); 180 181 } 182 else 183 { 184 mnbd_serial[nPort].buffer[mnbd_serial[nPort].pos++] = data[n]; 185 } 186 187 } 188 } 161 189 }}} 162 190