Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 8:96c852630824
- Parent:
- 7:9521d6ae3747
- Child:
- 9:97b26dcd1035
--- a/main.cpp Sun Dec 11 00:52:39 2016 +0000 +++ b/main.cpp Sun Dec 11 16:28:43 2016 +0000 @@ -2,6 +2,7 @@ #include "model.h" #include "structures.h" #include "Serial.h" +Timer tms; DigitalOut cervena(LED1); DigitalOut zelena(LED2); Ticker ticker; @@ -16,7 +17,7 @@ char CrcIn; char wd[1]; -Model *mModel=new Model(&pc); +Model *mModel=new Model(&pc,tms); char datal; int pom=0; @@ -96,7 +97,7 @@ wd[0]=0xff; char data[1]; data[0]=0x43; - mModel->pc->attach(&SerialCallBack,Serial::RxIrq); + mModel->getSerial()->attach(&SerialCallBack,Serial::RxIrq); mModel->sendPacket(0xa0,0xd0,0x00,data,1); while(1) {