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.
Dependents: JRO_DDSv2 JRO_DDSv2_rev2019
Diff: JroIpdata.cpp
- Revision:
- 6:dd61acd77e2c
- Parent:
- 5:6500be930b36
--- a/JroIpdata.cpp Mon Feb 23 20:36:23 2015 +0000 +++ b/JroIpdata.cpp Wed Sep 04 22:25:24 2019 +0000 @@ -174,9 +174,8 @@ //printf("\r\nID_CLASS = 0x%x, ID_DEV = 0x%x, CMD = 0x%x, XOR = 0x%x", id_class, id_dev, cmd, xor_rd); //printf("\r\nPAYLOAD[0] = 0x%x, PYLD_LEN = 0x%x\r\n", payload[0], len_payload); - if (this->id_class == ID_CLASS){ + if ((this->id_class == ID_CLASS) || (this->id_class == 0)){ this->isValidData = true; - return 1; } @@ -236,11 +235,11 @@ char* IpData::getNIData(unsigned short cmd){ - char tx_data[5]; + char tx_data[150]; strcpy(tx_data, NI_PAYLOAD); - return this->encode(cmd, tx_data, NI_LEN); + return this->encode(cmd, tx_data, strlen(tx_data)); } unsigned long IpData::getNIDataLen(){ @@ -250,11 +249,11 @@ char* IpData::getOKData(unsigned short cmd){ - char tx_data[5]; + char tx_data[150]; strcpy(tx_data, OK_PAYLOAD); - return this->encode(cmd, tx_data, OK_LEN); + return this->encode(cmd, tx_data, strlen(tx_data)); } unsigned long IpData::getOKDataLen(){ @@ -264,11 +263,11 @@ char* IpData::getKOData(unsigned short cmd){ - char tx_data[5]; + char tx_data[150]; strcpy(tx_data, KO_PAYLOAD); - return this->encode(cmd, tx_data, KO_LEN); + return this->encode(cmd, tx_data, strlen(tx_data)); } unsigned long IpData::getKODataLen(){