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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user