From 55f60f30c106499e332437ae7d15591e14829449 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Thu, 15 Sep 2016 05:15:00 +0200 Subject: [PATCH] Display error number on error --- i2c_light/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i2c_light/main.c b/i2c_light/main.c index be3beea..993fbc7 100644 --- a/i2c_light/main.c +++ b/i2c_light/main.c @@ -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); } -- 2.43.0