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: model.cpp
- Revision:
- 10:dc94bacfccc6
- Parent:
- 9:97b26dcd1035
- Child:
- 11:95e4e04a7dd2
--- a/model.cpp Mon Dec 12 22:25:35 2016 +0000 +++ b/model.cpp Wed Dec 14 17:52:35 2016 +0000 @@ -2,8 +2,9 @@ int pom=0; DigitalOut cervena(LED1); DigitalOut zelena(LED2); -Model::Model(Serial *pci):cmd(new Commands) +Model::Model(Serial *pci)//:cmd(new Commands) { + cmd= new Commands(); pc=pci; pc->baud(57600); pc->attach(this,&Model::SerialCallBack,Serial::RxIrq); @@ -23,6 +24,7 @@ watchDog[0]=0x01; sendPacket(0xa0,0xfe,0x0, watchDog,1); watchDog[0]=0x2; + DataIn= new char[6](); cmd->LedOn[0]=0x01; cmd->LedOff[0]=0x00; @@ -58,6 +60,7 @@ for (unsigned int i=0; i< DataLength; i++) { DataIn[i]=pc->getc(); } +// if(DataLength!=0x00) CrcIn=pc->getc(); switch( sourceAdd) { case 0xc4: