mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
allow a counter for user tasks, reorganize generated config handling
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#ifdef BOARD_TEST
|
||||
#include "GwExampleTask.h"
|
||||
#include "GwApi.h"
|
||||
#include "GWConfig.h"
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
@@ -97,6 +98,7 @@ void exampleTask(GwApi *api){
|
||||
GwApi::BoatValue *testValue=new GwApi::BoatValue(boatItemName);
|
||||
GwApi::BoatValue *valueList[]={longitude,latitude,testValue};
|
||||
GwApi::Status status;
|
||||
api->setCounterDisplayName("usertest");
|
||||
while(true){
|
||||
delay(1000);
|
||||
/*
|
||||
@@ -193,7 +195,9 @@ void exampleTask(GwApi *api){
|
||||
status.tcpClRx,
|
||||
status.tcpClTx,
|
||||
status.n2kRx,
|
||||
status.n2kTx);
|
||||
status.n2kTx);
|
||||
//increment some counter
|
||||
api->increment("Test");
|
||||
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
|
||||
@@ -2,32 +2,11 @@
|
||||
#include "GwApi.h"
|
||||
//we only compile for some boards
|
||||
#ifdef BOARD_TEST
|
||||
|
||||
#define ESP32_CAN_TX_PIN GPIO_NUM_22
|
||||
#define ESP32_CAN_RX_PIN GPIO_NUM_19
|
||||
//if using tail485
|
||||
#define GWSERIAL_TX 26
|
||||
#define GWSERIAL_RX 32
|
||||
#define GWSERIAL_MODE "UNI"
|
||||
|
||||
#define GWSERIAL2_TX 14
|
||||
#define GWSERIAL2_RX 15
|
||||
#define GWSERIAL2_MODE "BI"
|
||||
|
||||
#define GWBUTTON_PIN GPIO_NUM_39
|
||||
#define GWBUTTON_ACTIVE LOW
|
||||
//if GWBUTTON_PULLUPDOWN we enable a pulup/pulldown
|
||||
#define GWBUTTON_PULLUPDOWN
|
||||
//led handling
|
||||
//if we define GWLED_FASTNET the arduino fastnet lib is used
|
||||
#define GWLED_FASTLED
|
||||
#define GWLED_TYPE SK6812
|
||||
//color schema for fastled
|
||||
#define GWLED_SCHEMA GRB
|
||||
#define GWLED_PIN GPIO_NUM_27
|
||||
//brightness 0...255
|
||||
#define GWLED_BRIGHTNESS 64
|
||||
#define USBSerial Serial
|
||||
//we could add the following defines also in our local platformio.ini
|
||||
//CAN base
|
||||
#define M5_CAN_KIT
|
||||
//RS485 on groove
|
||||
#define SERIAL_GROOVE_485
|
||||
|
||||
void exampleTask(GwApi *param);
|
||||
void exampleInit(GwApi *param);
|
||||
|
||||
Reference in New Issue
Block a user