[apps/code] Refresh view in printText

This commit is contained in:
Léa Saviot
2020-01-17 10:04:28 +01:00
parent f20bb1fcf2
commit f47f1f0543
5 changed files with 18 additions and 0 deletions

View File

@@ -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();
}