Auf den letzten Metern
Dependencies: mbed
Revision 22:5600f9b29a51, committed 23 months ago
- Comitter:
- alexander0707
- Date:
- Mon Dec 05 15:47:05 2022 +0000
- Parent:
- 21:2c1292affc10
- Commit message:
- v3.9
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Dec 05 15:38:59 2022 +0000
+++ b/main.cpp Mon Dec 05 15:47:05 2022 +0000
@@ -448,8 +448,6 @@
*/
-Serial pc(USBTX, USBRX); // tx, rx
-
void vComA(void){
if(abTxBuffer[0]=='a'){
@@ -483,15 +481,9 @@
}
void vCheckCom(void){
- for(int i=60; i>=0; i--){
- if(abTxBufferOld[i]!=abTxBuffer[i]) bComp=1;
- }
- if(bComp==1){
- vComA();
- vComPlus();
- vComMinus();
- }
- bComp=0;
+ vComA();
+ vComPlus();
+ vComMinus();
}
@@ -513,15 +505,14 @@
vCheckTasten();
nDiffWert = wVorgabeWert - wPotiWert;
- if(pc.readable()) {
- pinBeep=0;
- //device.putc(pc.getc());
- } else pinBeep=1;
+ if(stComX.readable()) {
+ abTxBuffer[0]=stComX.getc();
+ }
//stComX.attach(&vIsrRxComX, Serial::RxIrq); /* ISR zum Datemempfang vom PC */
//stComX.attach(&vIsrTxComX, Serial::TxIrq); /* Sende-ISR */
- //vCheckCom();
+ vCheckCom();
switch(bMainState) {