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

allow for multiple counters in user task

This commit is contained in:
andreas
2023-10-14 19:43:50 +02:00
parent 6cdaab4d60
commit 015b4762f8
3 changed files with 39 additions and 17 deletions

View File

@@ -98,7 +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");
int counter=api->addCounter("usertest");
while(true){
delay(1000);
/*
@@ -197,7 +197,7 @@ void exampleTask(GwApi *api){
status.n2kRx,
status.n2kTx);
//increment some counter
api->increment("Test");
api->increment(counter,"Test");
}
vTaskDelete(NULL);