Skip to content

Commit

Permalink
Made the responseBuffer public
Browse files Browse the repository at this point in the history
  • Loading branch information
SRGDamia1 committed Sep 6, 2017
1 parent 9bb885d commit 4000e13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SensorModbusMaster",
"version": "0.1.0",
"version": "0.1.2",
"keywords": "sensor, modbus",
"description": "Arduino library for communicating via modbus with the Arduino acting as master",
"repository":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SensorModbusMaster
version=0.1.0
version=0.1.2
author=Sara Damiano <[email protected]>
maintainer=Sara Damiano <[email protected]>
sentence=Arduino library for communicating via modbus with the Arduino acting as master
Expand Down
10 changes: 6 additions & 4 deletions src/SensorModbusMaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ class modbusMaster
void stopDebugging(void){_debugStream = &nullstream;}


// This needs to be bigger than the largest response
// For 8 parameters with 8 registers each:
// 64 registers * 2 bytes per register + 5 frame bytes
static byte responseBuffer[RESPONSE_BUFFER_SIZE];



//----------------------------------------------------------------------------
// PRIVATE FUNCTIONS
Expand Down Expand Up @@ -194,10 +200,6 @@ void printFrameHex(byte modbusFrame[], int frameLength);
NullStream nullstream;
Stream *_debugStream = &nullstream; // The stream instance (serial port) for debugging

// This needs to be bigger than the largest response
// For 8 parameters with 8 registers each:
// 64 registers * 2 bytes per register + 5 frame bytes
static byte responseBuffer[RESPONSE_BUFFER_SIZE];
static byte crcFrame[2];

// The modbus protocol defines that there can be no more than 1.5 characters
Expand Down

0 comments on commit 4000e13

Please sign in to comment.