]> mj.ucw.cz Git - home-hw.git/commitdiff
BSB: Minor fixes of daemon
authorMartin Mares <mj@ucw.cz>
Tue, 25 Feb 2020 22:03:34 +0000 (23:03 +0100)
committerMartin Mares <mj@ucw.cz>
Tue, 25 Feb 2020 22:03:34 +0000 (23:03 +0100)
bsb/daemon/burrow-bsb.c

index 8396a22660238aee9e73d32241d64ad1aeb6e845..714f811600ff09a5038e56280983c9cc5dc4c02e 100644 (file)
@@ -100,6 +100,8 @@ static void show_stats(byte *resp, uint len)
        for (uint i=0; 4*i + 3 < (uint) len; i++)
                printf(" %s=%u", (i < sizeof(stat_names) / sizeof(stat_names[0]) ? stat_names[i] : "?"), get_u32_le(resp+4*i));
        printf("\n");
+
+       fflush(stdout);
 }
 
 static void show_packet(byte *pkt, uint len)
@@ -131,6 +133,8 @@ static void show_packet(byte *pkt, uint len)
                default:
                        printf("??? type=%02x\n", pkt[4]);
        }
+
+       fflush(stdout);
 }
 
 int main(void)
@@ -155,7 +159,7 @@ int main(void)
                }
 
                time_t now = time(NULL);
-               if (last_stats + 10 < now) {
+               if (last_stats + 60 < now) {
                        if ((received = libusb_control_transfer(devh, 0xc0, 0x00, 0, 0, resp, sizeof(resp), 1000)) < 0) {
                                usb_error("Receive failed: error %d", received);
                                continue;