diff --git a/libs/core/output.cpp b/libs/core/output.cpp index 3d157ba4..79c70320 100644 --- a/libs/core/output.cpp +++ b/libs/core/output.cpp @@ -1,6 +1,9 @@ #include "pxt.h" #include "ev3const.h" +#include +#include + namespace output { /** @@ -17,6 +20,7 @@ Buffer createBuffer(int size) { namespace pxt { void target_init() { + mkdir(SETTINGSDIR, 0777); } } diff --git a/libs/core/platform.h b/libs/core/platform.h index 67e813bb..2d16d2a2 100644 --- a/libs/core/platform.h +++ b/libs/core/platform.h @@ -1,3 +1,5 @@ #define PXT_GC_THREAD_LIST 1 #define PXT_IN_ISR() false + +#define SETTINGSDIR "/mnt/ramdisk/settings" diff --git a/libs/ev3/pxt.json b/libs/ev3/pxt.json index a8db774d..87a1d5d5 100644 --- a/libs/ev3/pxt.json +++ b/libs/ev3/pxt.json @@ -24,7 +24,7 @@ "ultrasonic-sensor": "file:../ultrasonic-sensor", "gyro-sensor": "file:../gyro-sensor", "infrared-sensor": "file:../infrared-sensor", - "settings": "file:../settings---files" + "settings": "file:../settings" }, "palette": [ "#ffffff", diff --git a/libs/settings---files/pxt.json b/libs/settings---files/pxt.json deleted file mode 100644 index 239c42dc..00000000 --- a/libs/settings---files/pxt.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "additionalFilePath": "../../node_modules/pxt-common-packages/libs/settings---files" -} diff --git a/libs/settings/pxt.json b/libs/settings/pxt.json index 6f98a2dd..876c1f9e 100644 --- a/libs/settings/pxt.json +++ b/libs/settings/pxt.json @@ -1,3 +1,4 @@ { - "additionalFilePath": "../../node_modules/pxt-common-packages/libs/settings" + "name": "settings", + "additionalFilePath": "../../node_modules/pxt-common-packages/libs/settings---files" } diff --git a/pxtarget.json b/pxtarget.json index c4089f1f..993c2e04 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -19,8 +19,7 @@ "libs/ev3", "libs/storage", "libs/broadcast", - "libs/settings", - "libs/settings---files" + "libs/settings" ], "simulator": { "autoRun": true,