V1.1.6 Update
This commit is contained in:
parent
29b5b4f746
commit
6f72d085b1
|
@ -19,6 +19,10 @@ This library is now complete, the remaining work is mainly maintenance and bug f
|
||||||
|
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
**V1.1.6 2024.2.25**
|
||||||
|
|
||||||
|
+ Fix the bug of the pkg's length may longer than maximum(without head, tail and pkg length, it's 63 Bytes).
|
||||||
|
|
||||||
**V1.1.5 2024.2.23**
|
**V1.1.5 2024.2.23**
|
||||||
|
|
||||||
+ Fix the bug of the pack vector may be accessed out of range.
|
+ Fix the bug of the pack vector may be accessed out of range.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name= DLLN3X ZigBee Mesh Module Library
|
name= DLLN3X ZigBee Mesh Module Library
|
||||||
version= 1.1.5
|
version= 1.1.6
|
||||||
author= Dylan Liu <mentalflow@ourdocs.cn>
|
author= Dylan Liu <mentalflow@ourdocs.cn>
|
||||||
maintainer= Dylan Liu <mentalflow@ourdocs.cn>
|
maintainer= Dylan Liu <mentalflow@ourdocs.cn>
|
||||||
sentence= This library allows you to use DLLN3X ZigBee mesh module very easily.
|
sentence= This library allows you to use DLLN3X ZigBee mesh module very easily.
|
||||||
|
|
|
@ -68,16 +68,17 @@ ZigbeeFrame DLLN3X::recv(bool non_blocked)
|
||||||
bool DLLN3X::send(ZigbeeFrame zf)
|
bool DLLN3X::send(ZigbeeFrame zf)
|
||||||
{
|
{
|
||||||
bool status = false;
|
bool status = false;
|
||||||
if (zf.getSrcPort() < 0x80)
|
uint8_t len = zf.size();
|
||||||
|
if (zf.getSrcPort() < 0x80 || len > 66)
|
||||||
return false;
|
return false;
|
||||||
status = _DSerial->write(zf.data(),zf.size());
|
status = _DSerial->write(zf.data(), len);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DLLN3X::send_cmd(uint8_t des_port, uint8_t arg, uint8_t* data, uint8_t data_length)
|
bool DLLN3X::send_cmd(uint8_t des_port, uint8_t arg, uint8_t* data, uint8_t data_length)
|
||||||
{
|
{
|
||||||
ZigbeeFrame zf(0x80, des_port, 0x0000);
|
ZigbeeFrame zf(0x80, des_port, 0x0000);
|
||||||
if (data_length - 4 > 63 - 1)
|
if (data_length + 4 > 63)
|
||||||
return false;
|
return false;
|
||||||
zf.append(arg);
|
zf.append(arg);
|
||||||
zf.addData(data, data_length);
|
zf.addData(data, data_length);
|
||||||
|
|
Loading…
Reference in New Issue