examples: Load stock calibration profile if calibration failed
authorJean THOMAS <git0@pub.jeanthomas.me>
Thu, 6 Aug 2020 16:49:19 +0000 (18:49 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Thu, 6 Aug 2020 16:49:19 +0000 (18:49 +0200)
examples/firmware/main.c

index f336bab4844ed8c5ed5d0eb91cca26bc111d6ce4..cd26b737e630bd54af2bdabef8398fe3c9693b76 100644 (file)
@@ -86,6 +86,7 @@ int main(void) {
        res = gram_generate_calibration(&ctx, &profile2);
        if (res != GRAM_ERR_NONE) {
                uart_writestr("failed\n");
+               gram_load_calibration(&ctx, &profile);
        } else {
                gram_load_calibration(&ctx, &profile2);
        }