mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-25 20:06:08 +00:00
Some modifications to increase stability
This commit is contained in:
@@ -110,6 +110,12 @@ String HanReader::getString(int objectId) {
|
||||
return getString(objectId, buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
int HanReader::getBuffer(byte* buf) {
|
||||
for (int i = 0; i < bytesRead; i++) {
|
||||
buf[i] = buffer[i];
|
||||
}
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
int HanReader::findValuePosition(int dataPosition, byte *buffer, int start, int length) {
|
||||
// The first byte after the header gives the length
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
uint32_t getUint(int objectId); // Only for uint32
|
||||
String getString(int objectId);
|
||||
time_t getTime(int objectId);
|
||||
int getBuffer(byte* buf);
|
||||
|
||||
private:
|
||||
RemoteDebug* debugger;
|
||||
|
||||
Reference in New Issue
Block a user