mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Refresh view in printText
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "helpers.h"
|
||||
#include "port.h"
|
||||
#include <ion.h>
|
||||
extern "C" {
|
||||
#include "mphalport.h"
|
||||
@@ -18,6 +19,12 @@ bool micropython_port_vm_hook_loop() {
|
||||
return false;
|
||||
}
|
||||
|
||||
return micropython_port_vm_hook_loop_content();
|
||||
}
|
||||
|
||||
bool micropython_port_vm_hook_loop_content() {
|
||||
assert(MicroPython::ExecutionEnvironment::currentExecutionEnvironment() != nullptr);
|
||||
MicroPython::ExecutionEnvironment::currentExecutionEnvironment()->refreshPrintOutput();
|
||||
// Check if the user asked for an interruption from the keyboard
|
||||
return micropython_port_interrupt_if_needed();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ extern "C" {
|
||||
|
||||
// These methods return true if they have been interrupted
|
||||
bool micropython_port_vm_hook_loop();
|
||||
bool micropython_port_vm_hook_loop_content();
|
||||
bool micropython_port_interruptible_msleep(int32_t delay);
|
||||
bool micropython_port_interrupt_if_needed();
|
||||
int micropython_port_random();
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
virtual void hideSandbox() {}
|
||||
virtual void resetSandbox() {}
|
||||
virtual void printText(const char * text, size_t length) {}
|
||||
virtual void refreshPrintOutput() {}
|
||||
void interrupt();
|
||||
void setSandboxIsDisplayed(bool display);
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user