Display error number on error
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 15 Sep 2016 03:15:00 +0000 (05:15 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 11 Feb 2023 04:06:55 +0000 (05:06 +0100)
i2c_light/main.c

index be3beea..993fbc7 100644 (file)
@@ -91,7 +91,7 @@ void lux_display(int uart_num)
 
        ret = tsl256x_sensor_read(&tsl256x_sensor, &comb, &ir, &lux);
        if (ret != 0) {
-               uprintf(uart_num, "Lux read error\n");
+               uprintf(uart_num, "Lux read error: %d\n", ret);
        } else {
                uprintf(uart_num, "Lux: %d  (Comb: 0x%04x, IR: 0x%04x)\n", lux, comb, ir);
        }