fix line buffer size

This commit is contained in:
King Kévin 2020-01-09 11:31:11 +01:00
parent 2e9cf70688
commit a52d5ed069
2 changed files with 2 additions and 2 deletions

View File

@ -791,7 +791,7 @@ int main(int argc, char* argv[])
}
}
// line containing values for influxdb
char line[21 * 4];
char line[22 * 4];
int line_len;
if (packet_len == sizeof(packet)) { // message is complete
if (0xf1 == packet[0] && 0x01 == packet[1]) { // device information packet

View File

@ -189,7 +189,7 @@ int main(int argc, char* argv[])
bool run = true; // read from USB as long as true
struct u2_measurement_t meas; // to store the parsed measurement values
// line containing values for influxdb
char line[21 * 2];
char line[22 * 2];
int line_len;
while (run) {
rc = hid_read_timeout(handle, meas.payload, ARRAY_SIZE(meas.payload), 50); // wait for max 50 ms for a measurement