From a7fff773b5ee30ec29e3d8668cea7a421bab39b3 Mon Sep 17 00:00:00 2001 From: Lubos Petrovic Date: Mon, 7 Dec 2020 09:19:28 +0100 Subject: [PATCH] CommInterface, CommObd2Ble4, CommObd2Can --- Board320_240.cpp | 6 +++++- CommInterface.cpp | 7 +++++++ CommInterface.h | 12 ++++++++++++ CommObd2Ble4.cpp | 7 +++++++ CommObd2Ble4.h | 12 ++++++++++++ CommObd2Can.cpp | 7 +++++++ CommObd2Can.h | 12 ++++++++++++ 7 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 CommInterface.cpp create mode 100644 CommInterface.h create mode 100644 CommObd2Ble4.cpp create mode 100644 CommObd2Ble4.h create mode 100644 CommObd2Can.cpp create mode 100644 CommObd2Can.h diff --git a/Board320_240.cpp b/Board320_240.cpp index ea80a1b..42896a2 100644 --- a/Board320_240.cpp +++ b/Board320_240.cpp @@ -1167,7 +1167,11 @@ void Board320_240::redrawScreen() { spr.fillCircle(310, 10, 3, (liveData->params.sdcardInit == 1) ? (liveData->params.sdcardRecording) ? - (strlen(liveData->params.sdcardFilename) != 0) TFT_RED: TFT_BLUE : TFT_GREEN : TFT_YELLOW + (strlen(liveData->params.sdcardFilename) != 0) ? + TFT_GREEN /* assigned filename (opsec from bms or gsm/gps timestamp */: + TFT_BLUE /* recording started but waiting for data */ : + TFT_ORANGE /* sdcard init ready but recording not started*/ : + TFT_YELLOW /* failed to initialize sdcard */ ); } diff --git a/CommInterface.cpp b/CommInterface.cpp new file mode 100644 index 0000000..dea253e --- /dev/null +++ b/CommInterface.cpp @@ -0,0 +1,7 @@ +#ifndef COMMINTERFACE_CPP +#define COMMINTERFACE_CPP + +#include "CommInterface.h" +#include "LiveData.h" + +#endif // COMMINTERFACE_CPP diff --git a/CommInterface.h b/CommInterface.h new file mode 100644 index 0000000..cf36e4b --- /dev/null +++ b/CommInterface.h @@ -0,0 +1,12 @@ +#ifndef COMMINTERFACE_H +#define COMMINTERFACE_H + +#include "LiveData.h" + +class CommInterface { + + private: + public: +}; + +#endif // COMMINTERFACE_H diff --git a/CommObd2Ble4.cpp b/CommObd2Ble4.cpp new file mode 100644 index 0000000..2960b66 --- /dev/null +++ b/CommObd2Ble4.cpp @@ -0,0 +1,7 @@ +#ifndef COMMOBD2BLE4_CPP +#define COMMOBD2BLE4_CPP + +#include "CommInterface.h" +#include "LiveData.h" + +#endif // COMMOBD2BLE4_CPP diff --git a/CommObd2Ble4.h b/CommObd2Ble4.h new file mode 100644 index 0000000..5062379 --- /dev/null +++ b/CommObd2Ble4.h @@ -0,0 +1,12 @@ +#ifndef COMMOBD2BLE4_H +#define COMMOBD2BLE4_H + +#include "LiveData.h" + +class CommObd2Ble4 : public CommInterface { + + private: + public: +}; + +#endif // COMMOBD2BLE4_H diff --git a/CommObd2Can.cpp b/CommObd2Can.cpp new file mode 100644 index 0000000..dea253e --- /dev/null +++ b/CommObd2Can.cpp @@ -0,0 +1,7 @@ +#ifndef COMMINTERFACE_CPP +#define COMMINTERFACE_CPP + +#include "CommInterface.h" +#include "LiveData.h" + +#endif // COMMINTERFACE_CPP diff --git a/CommObd2Can.h b/CommObd2Can.h new file mode 100644 index 0000000..02b77ce --- /dev/null +++ b/CommObd2Can.h @@ -0,0 +1,12 @@ +#ifndef COMMOBD2CAN_H +#define COMMOBD2CAN_H + +#include "LiveData.h" + +class CommObd2Can : public CommInterface { + + private: + public: +}; + +#endif // COMMOBD2CAN_H