Skip to content

Commit

Permalink
Version 0.5.1-20201221
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpool committed Dec 21, 2020
1 parent 680eef3 commit e9d185c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This CHANGELOG file should help that the library becomes a standardized open sou
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2020-12-14
## [Unreleased] - 2020-12-21

### Added
- Low Level funtion LogoClient::ReadBlock
Expand All @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- GetOrderCode: Support of 0BA6.ES10
- StreamConnect: Clearing serial buffer for Reconnection
- ReadArea: VM Mapping (correct access to the program space)

## [0.5.1] - 2018-09-18
### Added
Expand Down
7 changes: 5 additions & 2 deletions src/LogoPG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ int LogoClient::ReadArea(int Area, word DBNumber, word Start, word Amount, void
SizeRequested = NumElements * WordSize;
while (SizeRequested-- > 0)
{
byte val = PDU.DATA[Mapping[Address++]];
// byte val = PDU.DATA[Mapping[Address++]]
byte val = PDU.DATA[pgm_read_byte_near(Mapping + Address++)];
if (val != 0xFF)
Target[Offset++] = val;
}
Expand Down Expand Up @@ -1219,8 +1220,10 @@ int LogoClient::RecvPacket(byte buf[], size_t Size)

// The next line will also notice a rollover after about 50 days.
// https://playground.arduino.cc/Code/TimingRollover
if (millis() - Elapsed > RecvTimeout)
if (millis() - Elapsed > RecvTimeout) {
Log.warning(F("Timeout > %d" CR), RecvTimeout);
break; // Timeout
}
}

// Here we are in timeout zone, if there's something into the buffer, it must be discarded.
Expand Down

0 comments on commit e9d185c

Please sign in to comment.