Skip to content

Commit dd8528d

Browse files
committed
Quieten status messages
1 parent 61470de commit dd8528d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

owonb35.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#include <gattlib.h>
3939

40-
#define VERSION "1.4"
40+
#define VERSION "1.4.0"
4141

4242
_Bool quiet = FALSE;
4343

@@ -558,7 +558,7 @@ static void ble_discovered_device(const char* addr, const char* name) {
558558

559559
if ((name != NULL) && (strcmp(BDM, name) == 0) && (address == NULL)) {
560560

561-
if (!quiet) fprintf(stderr, "Connecting to %s\n", addr);
561+
if (!quiet) fprintf(stderr, "Found %s\n", addr);
562562

563563
address = malloc(18);
564564
strcpy(address,addr);
@@ -571,9 +571,10 @@ static void ble_discovered_device(const char* addr, const char* name) {
571571
void connect_device() {
572572

573573
do {
574+
if (!quiet) fprintf(stderr, "Connecting...\n");
574575
connection = gattlib_connect(NULL, address, BDADDR_LE_PUBLIC, BT_SEC_LOW, 0, 0);
575576
if (connection == NULL) {
576-
fprintf(stderr, "Fail to connect to the multimeter bluetooth device.\n");
577+
if (!quiet) fprintf(stderr, "Fail to connect to the multimeter bluetooth device.\n");
577578
sleep(1);
578579
}
579580
} while (connection == NULL);

0 commit comments

Comments
 (0)