mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-25 22:09:21 +00:00
00_HMUARTLGW.pm: check if LastSendLen is defined before using it
git-svn-id: https://svn.fhem.de/fhem/trunk@14899 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1a32894b59
commit
72fbadc428
@ -1459,7 +1459,8 @@ sub HMUARTLGW_Read($)
|
||||
|
||||
my $crc = HMUARTLGW_crc16(chr(0xfd).$unescaped);
|
||||
if ($crc != 0x0000 &&
|
||||
$hash->{DevState} != HMUARTLGW_STATE_RUNNING) {
|
||||
$hash->{DevState} != HMUARTLGW_STATE_RUNNING &&
|
||||
defined($hash->{Helper}{LastSendLen})) {
|
||||
#When writing to the device while it prepares to write a frame to
|
||||
#the host, the device seems to initialize the crc with 0x827f or
|
||||
#0x8281 plus the length of the frame being received (firmware bug).
|
||||
|
Loading…
x
Reference in New Issue
Block a user