Przeglądaj źródła

update SDK version to solve issue #6

Oliver Fabel 1 rok temu
rodzic
commit
c5af7d650d
6 zmienionych plików z 19 dodań i 7 usunięć
  1. 4 0
      CHANGELOG.md
  2. 1 1
      application.fam
  3. 4 0
      docs/CHANGELOG.md
  4. 2 2
      docs/pages/conf.py
  5. 5 3
      upython.c
  6. 3 1
      upython_cli.c

+ 4 - 0
CHANGELOG.md

@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Fixed
+
+* [#6](https://github.com/ofabel/mp-flipper/issues/6): Update to latest SDK version.
+
 ## [1.6.0] - 2024-11-17
 
 ### Added

+ 1 - 1
application.fam

@@ -5,7 +5,7 @@ App(
     entry_point="upython",
     stack_size=4 * 1024,
     fap_category="Tools",
-    fap_version="1.6",
+    fap_version="1.7",
     fap_description="Compile and execute MicroPython scripts",
     fap_icon="icon.png",
     fap_icon_assets="images",

+ 4 - 0
docs/CHANGELOG.md

@@ -1,3 +1,7 @@
+## 1.7
+
+* Update to latest SDK version.
+
 ## 1.6
 
 * Added extra functions for the **random** module.

+ 2 - 2
docs/pages/conf.py

@@ -33,8 +33,8 @@ now = datetime.datetime.now()
 project = 'uPython'
 copyright = str(now.year) + ', Oliver Fabel'
 author = 'Oliver Fabel'
-release = '1.5.0'
-version = '1.5'
+release = '1.6.0'
+version = '1.6'
 language = 'en'
 
 extensions = [

+ 5 - 3
upython.c

@@ -10,7 +10,9 @@ volatile Action action = ActionNone;
 FuriString* file_path = NULL;
 volatile FuriThreadStdoutWriteCallback stdout_callback = NULL;
 
-static void write_to_log_output(const char* data, size_t size) {
+static void write_to_log_output(const char* data, size_t size, void* context) {
+    UNUSED(context);
+
     furi_log_tx((const uint8_t*)data, size);
 }
 
@@ -41,7 +43,7 @@ int32_t upython(void* args) {
         case ActionRepl:
             break;
         case ActionExec:
-            furi_thread_set_stdout_callback(stdout_callback);
+            furi_thread_set_stdout_callback(stdout_callback, NULL);
 
             upython_file_execute(file_path);
 
@@ -49,7 +51,7 @@ int32_t upython(void* args) {
 
             action = ActionNone;
 
-            furi_thread_set_stdout_callback(stdout_callback = NULL);
+            furi_thread_set_stdout_callback(stdout_callback = NULL, NULL);
 
             break;
         case ActionExit:

+ 3 - 1
upython_cli.c

@@ -5,7 +5,9 @@
 
 static FuriStreamBuffer* stdout_buffer = NULL;
 
-static void write_to_stdout_buffer(const char* data, size_t size) {
+static void write_to_stdout_buffer(const char* data, size_t size, void* context) {
+    UNUSED(context);
+
     furi_stream_buffer_send(stdout_buffer, data, size, 0);
 }