From 808709f5c2679f8dd955883bc6af4b15e45dd41d Mon Sep 17 00:00:00 2001 From: Marcel Peterkau Date: Mon, 22 Aug 2022 09:23:01 +0200 Subject: [PATCH] sanity-check now functional --- Software/src/main.cpp | 2 ++ Software/src/sanitycheck.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Software/src/main.cpp b/Software/src/main.cpp index 2b45b91..52123b1 100644 --- a/Software/src/main.cpp +++ b/Software/src/main.cpp @@ -11,6 +11,8 @@ #include "common.h" +#include "sanitycheck.h" + #include "lubeapp.h" #include "webui.h" #include "config.h" diff --git a/Software/src/sanitycheck.h b/Software/src/sanitycheck.h index c3783a7..e8033a5 100644 --- a/Software/src/sanitycheck.h +++ b/Software/src/sanitycheck.h @@ -7,6 +7,13 @@ #if PCB_REV < 1 || PCB_REV > 4 #error "Unsupported PCB-Revision" #endif + + #if PCB_REV < 4 && defined(FEATURE_ENABLE_CAN) + #error "CAN-Feature unsupported with this PCB-Rev" + #endif + #if PCB_REV < 4 && defined(DFEATURE_ENABLE_GPS) + #error "CAN-Feature unsupported with this PCB-Rev" + #endif #endif #ifndef ADMIN_PASSWORD