[code] Each script has a name, stored in the accordeon buffer.

A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.

Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
This commit is contained in:
Léa Saviot
2017-10-19 13:52:18 +02:00
committed by Romain Goyet
parent f3200fe2e9
commit 5de4b5cd67
34 changed files with 868 additions and 600 deletions

View File

@@ -18,7 +18,7 @@ const Image * App::Descriptor::icon() {
}
App::Snapshot::Snapshot() {
m_programStore.addDefaultProgram();
m_scriptStore.addMandelbrotScript();
}
App * App::Snapshot::unpack(Container * container) {
@@ -26,7 +26,7 @@ App * App::Snapshot::unpack(Container * container) {
}
void App::Snapshot::reset() {
m_programStore.deleteAll();
m_scriptStore.deleteAll();
}
App::Descriptor * App::Snapshot::descriptor() {
@@ -34,14 +34,14 @@ App::Descriptor * App::Snapshot::descriptor() {
return &descriptor;
}
ProgramStore * App::Snapshot::programStore() {
return &m_programStore;
ScriptStore * App::Snapshot::scriptStore() {
return &m_scriptStore;
}
App::App(Container * container, Snapshot * snapshot) :
::App(container, snapshot, &m_codeStackViewController, I18n::Message::Warning),
m_listFooter(&m_codeStackViewController, &m_menuController, &m_menuController, ButtonRowController::Position::Bottom, ButtonRowController::Style::EmbossedGrey),
m_menuController(&m_listFooter, snapshot->programStore(), &m_listFooter),
m_menuController(&m_listFooter, snapshot->scriptStore(), &m_listFooter),
m_codeStackViewController(&m_modalViewController, &m_listFooter)
{
}