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>
Thu, 15 Sep 2016 03:15:00 +0000 (05:15 +0200)
apps/base/i2c_light/main.c

index 15e44b9..c942009 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);
        }