diff --git a/tests/drivers/shtcx/main.c b/tests/drivers/shtcx/main.c index 5caddee803..8b603caa23 100644 --- a/tests/drivers/shtcx/main.c +++ b/tests/drivers/shtcx/main.c @@ -20,6 +20,7 @@ */ #include #include +#include #include "timex.h" #include "ztimer.h" @@ -51,6 +52,9 @@ int main(void) len = fmt_s16_dfp(str_hum, hum, -2); str_hum[len] = '\0'; + } else { + strcpy(str_temp, "ERROR"); + strcpy(str_hum, "ERROR"); } /* print values to STDIO */ printf("Temperature [°C]: %s\n", str_temp);