mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
Merge branch 'master' into sensors
This commit is contained in:
@@ -90,6 +90,7 @@ class TaskInterfacesStorage{
|
||||
return true;
|
||||
}
|
||||
GwApi::TaskInterfaces::Ptr get(const String &name, int &result){
|
||||
GWSYNCHRONIZED(lock);
|
||||
GWSYNCHRONIZED(lock);
|
||||
auto it = values.find(name);
|
||||
if (it == values.end())
|
||||
@@ -161,6 +162,7 @@ class TaskApi : public GwApiInternal
|
||||
GwApiInternal *api=nullptr;
|
||||
int sourceId;
|
||||
SemaphoreHandle_t mainLock;
|
||||
SemaphoreHandle_t mainLock;
|
||||
SemaphoreHandle_t localLock;
|
||||
std::map<int,GwCounter<String>> counter;
|
||||
std::map<String,GwApi::HandlerFunction> webHandlers;
|
||||
@@ -243,6 +245,7 @@ public:
|
||||
}
|
||||
};
|
||||
virtual int getJsonSize(){
|
||||
GWSYNCHRONIZED(localLock);
|
||||
GWSYNCHRONIZED(localLock);
|
||||
if (! counterUsed) return 0;
|
||||
int rt=0;
|
||||
@@ -252,6 +255,7 @@ public:
|
||||
return rt;
|
||||
};
|
||||
virtual void increment(int idx,const String &name,bool failed=false){
|
||||
GWSYNCHRONIZED(localLock);
|
||||
GWSYNCHRONIZED(localLock);
|
||||
counterUsed=true;
|
||||
auto it=counter.find(idx);
|
||||
|
||||
Reference in New Issue
Block a user