fix line buffer size
This commit is contained in:
parent
2e9cf70688
commit
a52d5ed069
2
u2_bt.c
2
u2_bt.c
|
@ -791,7 +791,7 @@ int main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// line containing values for influxdb
|
// line containing values for influxdb
|
||||||
char line[21 * 4];
|
char line[22 * 4];
|
||||||
int line_len;
|
int line_len;
|
||||||
if (packet_len == sizeof(packet)) { // message is complete
|
if (packet_len == sizeof(packet)) { // message is complete
|
||||||
if (0xf1 == packet[0] && 0x01 == packet[1]) { // device information packet
|
if (0xf1 == packet[0] && 0x01 == packet[1]) { // device information packet
|
||||||
|
|
2
u2_usb.c
2
u2_usb.c
|
@ -189,7 +189,7 @@ int main(int argc, char* argv[])
|
||||||
bool run = true; // read from USB as long as true
|
bool run = true; // read from USB as long as true
|
||||||
struct u2_measurement_t meas; // to store the parsed measurement values
|
struct u2_measurement_t meas; // to store the parsed measurement values
|
||||||
// line containing values for influxdb
|
// line containing values for influxdb
|
||||||
char line[21 * 2];
|
char line[22 * 2];
|
||||||
int line_len;
|
int line_len;
|
||||||
while (run) {
|
while (run) {
|
||||||
rc = hid_read_timeout(handle, meas.payload, ARRAY_SIZE(meas.payload), 50); // wait for max 50 ms for a measurement
|
rc = hid_read_timeout(handle, meas.payload, ARRAY_SIZE(meas.payload), 50); // wait for max 50 ms for a measurement
|
||||||
|
|
Loading…
Reference in New Issue