mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-14 18:15:22 +01:00
small fix /preset should work now
This commit is contained in:
@@ -171,7 +171,7 @@ void hWritePreset()
|
||||
}
|
||||
|
||||
error = savePresetFile() ? 0 : 1;
|
||||
if(error != 0)
|
||||
if(error == 0)
|
||||
{
|
||||
String responseBuffer = String();
|
||||
root.prettyPrintTo(responseBuffer);
|
||||
@@ -361,10 +361,11 @@ bool savePresetFile() {
|
||||
JsonObject& sets = json.createNestedObject("presets");
|
||||
for (int i = 0; i < maxPresets; i++)
|
||||
{
|
||||
JsonArray& set = sets.createNestedArray((String)i);
|
||||
int b = i+1;
|
||||
JsonArray& set = sets.createNestedArray((String)b);
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
set.add(presets[i+1][x]);
|
||||
set.add(presets[i][x]);
|
||||
}
|
||||
}
|
||||
//json.prettyPrintTo(Serial);
|
||||
|
||||
Reference in New Issue
Block a user