assembly output + json testing

This commit is contained in:
2021-10-04 17:07:15 +02:00
parent 584f88dec7
commit 7fada51a42
7 changed files with 1031 additions and 924 deletions

View File

@@ -15,6 +15,7 @@ std::vector<tagConfig> tags;
void loadConfig(const char *fname)
{
Serial.println("config: load");
File file = LITTLEFS.open(fname);
StaticJsonDocument<512> doc;
DeserializationError error = deserializeJson(doc, file);
@@ -22,13 +23,21 @@ void loadConfig(const char *fname)
Serial.println(F("Failed to read file, using default configuration"));
JsonArray array = doc.as<JsonArray>();
for(JsonVariant v : array) {
Serial.print("json entry: ");
Serial.println(v.as<String>());
}
serializeJsonPretty(doc, Serial);
Serial.println("config: load done");
}
void initConfig(void)
{
Serial.println("config: init");
loadConfig(tagConfigfile);
Serial.println("config: init done");
}
void handleConfig(void)

View File

@@ -4,6 +4,7 @@
#include "storage.h"
#include "audio.h"
#include "rfid.h"
#include "config.h"
#include "game.h"
@@ -13,9 +14,12 @@ void setup()
delay(2000);
initStorage();
initConfig();
initAudio();
initRfid();
initGame();
}
void loop()

View File

@@ -0,0 +1,85 @@
{
"cod": "200",
"message": 0,
"list": [
{
"dt": 1581498000,
"main": {
"temp": 3.23,
"feels_like": -3.63,
"temp_min": 3.23,
"temp_max": 4.62,
"pressure": 1014,
"sea_level": 1014,
"grnd_level": 1010,
"humidity": 58,
"temp_kf": -1.39
},
"weather": [
{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}
],
"clouds": {
"all": 0
},
"wind": {
"speed": 6.19,
"deg": 266
},
"sys": {
"pod": "d"
},
"dt_txt": "2020-02-12 09:00:00"
},
{
"dt": 1581508800,
"main": {
"temp": 6.09,
"feels_like": -1.07,
"temp_min": 6.09,
"temp_max": 7.13,
"pressure": 1015,
"sea_level": 1015,
"grnd_level": 1011,
"humidity": 48,
"temp_kf": -1.04
},
"weather": [
{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}
],
"clouds": {
"all": 9
},
"wind": {
"speed": 6.64,
"deg": 268
},
"sys": {
"pod": "d"
},
"dt_txt": "2020-02-12 12:00:00"
}
],
"city": {
"id": 2643743,
"name": "London",
"coord": {
"lat": 51.5085,
"lon": -0.1257
},
"country": "GB",
"population": 1000000,
"timezone": 0,
"sunrise": 1581492085,
"sunset": 1581527294
}
}