1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-14 06:23:07 +01:00

allow to set a read only mode for config items, output compiler messages for overwritten configs, add m5 gps unit defs

This commit is contained in:
andreas
2023-10-05 18:52:30 +02:00
parent 9572b1e95e
commit 4fa40b98b3
7 changed files with 114 additions and 45 deletions

View File

@@ -17,7 +17,7 @@
#define GWSERIAL_TYPE_BI 2
#define GWSERIAL_TYPE_RX 3
#define GWSERIAL_TYPE_TX 4
#include <GwConfigItem.h>
#include <HardwareSerial.h>
#include "GwUserTasks.h"
@@ -148,8 +148,8 @@
#ifdef M5_GPS_KIT
#define GWSERIAL_RX BOARD_LEFT1
#define GWSERIAL_TYPE GWSERIAL_TYPE_RX
#define CFGGDEFAULT_serialBaud "9600"
#define CFGHIDE_serialBaud
#define CFGDEFAULT_serialBaud "9600"
#define CFGMODE_serialBaud GwConfigInterface::READONLY
#endif
//below we define the final device config based on the above
@@ -181,6 +181,21 @@
#endif
#endif
//http://docs.m5stack.com/en/unit/gps
#ifdef M5_GPS_UNIT
#ifdef GWSERIAL_TYPE
#define GWSERIAL2_RX GROOVE_PIN_2
#define GWSERIAL2_TYPE GWSERIAL_TYPE_RX
#define CFGDEFAULT_serialBaud "9600"
#define CFGMODE_serialBaud GwConfigInterface::READONLY
#else
#define GWSERIAL_RX GROOVE_PIN_2
#define GWSERIAL_TYPE GWSERIAL_TYPE_RX
#define CFGDEFAULT_serial2Baud "9600"
#define CFGMODE_serial2Baud GwConfigInterface::READONLY
#endif
#endif
//can kit for M5 Atom
#ifdef M5_CAN_KIT
#define ESP32_CAN_TX_PIN BOARD_LEFT1