1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

free GwApi from ArduinoJson

This commit is contained in:
wellenvogel
2021-11-28 12:11:47 +01:00
parent d9af772a57
commit 5195c3be88
8 changed files with 37 additions and 20 deletions

View File

@@ -2,7 +2,7 @@
#define _NMEA0183CONVERTERLIST_H
#include "WString.h"
#include "ArduinoJson.h"
#include "GwJsonDocument.h"
#include <map>
template <class T, class Msg>
@@ -189,10 +189,10 @@ private:
int numConverters(){
return converters.size();
}
void toJson(String prefix, JsonDocument &json){
void toJson(String prefix, GwJsonDocument *json){
for (auto it = converters.begin(); it != converters.end(); it++)
{
json[prefix][String(it->first)] = it->second.count;
(*json)[prefix][String(it->first)] = it->second.count;
}
}
String handledKeys(){