Skip to content

Commit 58ff198

Browse files
committed
[omega] 1.22.0
2 parents 9eff895 + f1d1502 commit 58ff198

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+965
-757
lines changed

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "apps/rpn"]
22
path = apps/rpn
33
url = https://github.com/Omega-Numworks/Omega-RPN.git
4-
[submodule "apps/atom"]
5-
path = apps/atom
6-
url = https://github.com/Omega-Numworks/Omega-Atom.git
4+
[submodule "apps/atomic"]
5+
path = apps/atomic
6+
url = https://github.com/Omega-Numworks/Omega-Atomic.git

README.fr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/109067616-08b0d500-76ef-11eb-9e23-78f40c335c18.png" /></p>
1+
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/111199951-80bd3d00-85c1-11eb-936c-28cf590208b8.png" /></p>
22

33
<p align="center">
44
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
@@ -155,7 +155,7 @@ Pour contribuer, merci de lire le [Wiki](https://github.com/Omega-Numworks/Omega
155155
* [Omega Themes](https://github.com/Omega-Numworks/Omega-Themes)
156156
* [Omega Website](https://github.com/Omega-Numworks/Omega-Website)
157157
* [Omega RPN `APP`](https://github.com/Omega-Numworks/Omega-RPN)
158-
* [Omega Atom `APP`](https://github.com/Omega-Numworks/Omega-Atom)
158+
* [Omega Atomic `APP`](https://github.com/Omega-Numworks/Omega-Atomic)
159159
* [Omega Design](https://github.com/Omega-Numworks/Omega-Design)
160160
* [Omega Discord Bot](https://github.com/Omega-Numworks/Omega-Discord-Bot)
161161
* [Omega App Template `BETA`](https://github.com/Omega-Numworks/Omega-App-Template)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/109067616-08b0d500-76ef-11eb-9e23-78f40c335c18.png" /></p>
1+
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/111199951-80bd3d00-85c1-11eb-936c-28cf590208b8.png" /></p>
22

33
<p align="center">
44
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
@@ -154,7 +154,7 @@ To contribute, please refer to the [Wiki](https://github.com/Omega-Numworks/Omeg
154154
* [Omega Themes](https://github.com/Omega-Numworks/Omega-Themes)
155155
* [Omega Website](https://github.com/Omega-Numworks/Omega-Website)
156156
* [Omega RPN `APP`](https://github.com/Omega-Numworks/Omega-RPN)
157-
* [Omega Atom `APP`](https://github.com/Omega-Numworks/Omega-Atom)
157+
* [Omega Atomic `APP`](https://github.com/Omega-Numworks/Omega-Atomic)
158158
* [Omega Design](https://github.com/Omega-Numworks/Omega-Design)
159159
* [Omega Discord Bot](https://github.com/Omega-Numworks/Omega-Discord-Bot)
160160
* [Omega App Template `BETA`](https://github.com/Omega-Numworks/Omega-App-Template)

apps/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ $(BUILD_DIR)/apps/i18n.h: $(BUILD_DIR)/apps/i18n.cpp
110110
$(eval $(call depends_on_image,apps/title_bar_view.cpp,apps/exam_icon.png))
111111

112112
$(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/apps/i18n.h
113+
$(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/apps/home/apps_layout.h
113114
$(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/python/port/genhdr/qstrdefs.generated.h
114115

115116
apps_tests_src = $(app_calculation_test_src) $(app_code_test_src) $(app_graph_test_src) $(app_probability_test_src) $(app_regression_test_src) $(app_sequence_test_src) $(app_shared_test_src) $(app_statistics_test_src) $(app_settings_test_src) $(app_solver_test_src)

apps/apps_container.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <ion/backlight.h>
99
#include <poincare/preferences.h>
1010

11+
#include <algorithm>
12+
1113
extern "C" {
1214
#include <assert.h>
1315
}
@@ -218,6 +220,13 @@ bool AppsContainer::dispatchEvent(Ion::Events::Event event) {
218220
return didProcessEvent || alphaLockWantsRedraw;
219221
}
220222

223+
static constexpr Ion::Events::Event switch_events[] = {
224+
Ion::Events::ShiftSeven, Ion::Events::ShiftEight, Ion::Events::ShiftNine,
225+
Ion::Events::ShiftFour, Ion::Events::ShiftFive, Ion::Events::ShiftSix,
226+
Ion::Events::ShiftOne, Ion::Events::ShiftTwo, Ion::Events::ShiftThree,
227+
Ion::Events::ShiftZero, Ion::Events::ShiftDot, Ion::Events::ShiftEE
228+
};
229+
221230
bool AppsContainer::processEvent(Ion::Events::Event event) {
222231
// Warning: if the window is dirtied, you need to call window()->redraw()
223232
if (event == Ion::Events::USBPlug) {
@@ -242,6 +251,15 @@ bool AppsContainer::processEvent(Ion::Events::Event event) {
242251
switchTo(appSnapshotAtIndex(1));
243252
return true;
244253
}
254+
255+
for(int i = 0; i < std::min((int) (sizeof(switch_events) / sizeof(Ion::Events::Event)), APPS_CONTAINER_SNAPSHOT_COUNT); i++) {
256+
if (event == switch_events[i]) {
257+
m_window.redraw(true);
258+
switchTo(appSnapshotAtIndex(i+1));
259+
return true;
260+
}
261+
}
262+
245263
if (event == Ion::Events::OnOff) {
246264
suspend(true);
247265
return true;

apps/atom

-1
This file was deleted.

apps/atomic

Submodule atomic added at 69f7a06

apps/calculation/expression_field.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ bool ExpressionField::handleEvent(Ion::Events::Event event) {
1717
event == Ion::Events::Power ||
1818
event == Ion::Events::Square ||
1919
event == Ion::Events::Division ||
20-
event == Ion::Events::Sto)) {
20+
event == Ion::Events::Sto ||
21+
event == Ion::Events::EE)) {
2122
handleEventWithText(Poincare::Symbol::k_ans);
2223
}
2324
return(::ExpressionField::handleEvent(event));

apps/code/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ app_code_src = $(addprefix apps/code/,\
1515
sandbox_controller.cpp \
1616
script_name_cell.cpp \
1717
script_parameter_controller.cpp \
18+
toolbox_ion_keys.cpp \
1819
)
1920

2021
app_code_test_src = $(addprefix apps/code/,\

apps/code/app.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ Toolbox * App::toolboxForInputEventHandler(InputEventHandler * textInput) {
124124
return &m_toolbox;
125125
}
126126

127+
Code::toolboxIonKeys * App::toolboxIonKeys() {
128+
return &m_toolboxIonKeys;
129+
}
130+
127131
VariableBoxController * App::variableBoxForInputEventHandler(InputEventHandler * textInput) {
128132
return &m_variableBoxController;
129133
}

apps/code/app.h

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "python_toolbox.h"
1111
#include "variable_box_controller.h"
1212
#include "../shared/shared_app.h"
13+
#include "toolbox_ion_keys.h"
1314

1415
namespace Code {
1516

@@ -77,6 +78,8 @@ class App : public Shared::InputEventHandlerDelegateApp {
7778

7879
static constexpr int k_pythonHeapSize = 100000;
7980

81+
Code::toolboxIonKeys * toolboxIonKeys();
82+
8083
private:
8184
/* Python delegate:
8285
* MicroPython requires a heap. To avoid dynamic allocation, we keep a working
@@ -93,6 +96,7 @@ class App : public Shared::InputEventHandlerDelegateApp {
9396
StackViewController m_codeStackViewController;
9497
PythonToolbox m_toolbox;
9598
VariableBoxController m_variableBoxController;
99+
Code::toolboxIonKeys m_toolboxIonKeys;
96100
};
97101

98102
}

apps/code/base.fr.i18n

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ ImportedModulesAndScripts = "Modules et scripts importés"
1212
NoWordAvailableHere = "Aucun mot disponible à cet endroit."
1313
ScriptInProgress = "Script en cours"
1414
ScriptOptions = "Options de script"
15-
ScriptSize = "Script size"
15+
ScriptSize = "Taille du script"

apps/code/catalog.de.i18n

+1-46
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolic cosine"
4545
PythonCount = "Zählt wie oft x vorkommt"
4646
PythonDegrees = "x von Radian zu Grad umwandeln"
4747
PythonDivMod = "Quotient und Rest"
48+
PythonDrawLine = "Draw a line"
4849
PythonDrawString = "Schreibt Text bei (x,y)"
4950
PythonErf = "Fehlerfunktion"
5051
PythonErfc = "Complementary error function"
@@ -86,52 +87,6 @@ PythonIsInfinite = "Prüft ob x unendlich ist"
8687
PythonIsNaN = "Prüft ob x NaN ist"
8788
PythonIsKeyDown = "true wenn k gedrückt ist"
8889
PythonKandinskyFunction = "kandinsky module function prefix"
89-
PythonKeyLeft = "Linke Pfeiltaste"
90-
PythonKeyUp = "Pfeiltaste nach oben"
91-
PythonKeyDown = "Pfeiltaste nach unten"
92-
PythonKeyRight = "Rechte Pfeiltaste"
93-
PythonKeyOk = "OK Taste"
94-
PythonKeyBack = "ZURÜCK Taste"
95-
PythonKeyHome = "HOME Taste"
96-
PythonKeyOnOff = "AN/AUS Taste"
97-
PythonKeyShift = "SHIFT Taste"
98-
PythonKeyAlpha = "ALPHA Taste"
99-
PythonKeyXnt = "X,N,T Taste"
100-
PythonKeyVar = "VAR Taste"
101-
PythonKeyToolbox = "WERKZEUGBOX Taste"
102-
PythonKeyBackspace = "LÖSCHEN Taste"
103-
PythonKeyExp = "EXPONENTIAL Taste"
104-
PythonKeyLn = "NATURAL LOGARITHM Taste"
105-
PythonKeyLog = "DECIMAL LOGARITHM Taste"
106-
PythonKeyImaginary = "IMAGINÄRES I Taste"
107-
PythonKeyComma = "KOMMA Taste"
108-
PythonKeyPower = "HOCH Taste"
109-
PythonKeySine = "SINUS Taste"
110-
PythonKeyCosine = "COSINUS Taste"
111-
PythonKeyTangent = "TANGENZ Taste"
112-
PythonKeyPi = "PI Taste"
113-
PythonKeySqrt = "WURZEL Taste"
114-
PythonKeySquare = "QUADRAT Taste"
115-
PythonKeySeven = "7 Taste"
116-
PythonKeyEight = "8 Taste"
117-
PythonKeyNine = "9 Taste"
118-
PythonKeyLeftParenthesis = "LEFT PARENTHESIS key"
119-
PythonKeyRightParenthesis = "RIGHT PARENTHESIS key"
120-
PythonKeyFour = "4 Taste"
121-
PythonKeyFive = "5 Taste"
122-
PythonKeySix = "6 Taste"
123-
PythonKeyMultiplication = "MULTIPLIKATIONSTASTE"
124-
PythonKeyDivision = "DIVISIONSTASTE"
125-
PythonKeyOne = "1 Taste"
126-
PythonKeyTwo = "2 Taste"
127-
PythonKeyThree = "3 Taste"
128-
PythonKeyPlus = "PLUS Taste"
129-
PythonKeyMinus = "MINUS Taste"
130-
PythonKeyZero = "0 Taste"
131-
PythonKeyDot = "PUNKT Taste"
132-
PythonKeyEe = "10 HOCH X Taste"
133-
PythonKeyAns = "ANS Taste"
134-
PythonKeyExe = "EXE Taste"
13590
PythonLdexp = "Return x*(2**i), inverse of frexp"
13691
PythonLength = "Length of an object"
13792
PythonLgamma = "Log-gamma function"

apps/code/catalog.en.i18n

+1-46
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolic cosine"
4545
PythonCount = "Count the occurrences of x"
4646
PythonDegrees = "Convert x from radians to degrees"
4747
PythonDivMod = "Quotient and remainder"
48+
PythonDrawLine = "Draw a line"
4849
PythonDrawString = "Display a text from pixel (x,y)"
4950
PythonErf = "Error function"
5051
PythonErfc = "Complementary error function"
@@ -81,52 +82,6 @@ PythonIsInfinite = "Check if x is infinity"
8182
PythonIsKeyDown = "Return True if the k key is down"
8283
PythonIsNaN = "Check if x is a NaN"
8384
PythonKandinskyFunction = "kandinsky module function prefix"
84-
PythonKeyLeft = "LEFT ARROW key"
85-
PythonKeyUp = "UP ARROW key"
86-
PythonKeyDown = "DOWN ARROW key"
87-
PythonKeyRight = "RIGHT ARROW key"
88-
PythonKeyOk = "OK key"
89-
PythonKeyBack = "BACK key"
90-
PythonKeyHome = "HOME key"
91-
PythonKeyOnOff = "ON/OFF key"
92-
PythonKeyShift = "SHIFT key"
93-
PythonKeyAlpha = "ALPHA key"
94-
PythonKeyXnt = "X,N,T key"
95-
PythonKeyVar = "VAR key"
96-
PythonKeyToolbox = "TOOLBOX key"
97-
PythonKeyBackspace = "BACKSPACE key"
98-
PythonKeyExp = "EXPONENTIAL key"
99-
PythonKeyLn = "NATURAL LOGARITHM key"
100-
PythonKeyLog = "DECIMAL LOGARITHM key"
101-
PythonKeyImaginary = "IMAGINARY I key"
102-
PythonKeyComma = "COMMA key"
103-
PythonKeyPower = "POWER key"
104-
PythonKeySine = "SINE key"
105-
PythonKeyCosine = "COSINE key"
106-
PythonKeyTangent = "TANGENT key"
107-
PythonKeyPi = "PI key"
108-
PythonKeySqrt = "SQUARE ROOT key"
109-
PythonKeySquare = "SQUARE key"
110-
PythonKeySeven = "7 key"
111-
PythonKeyEight = "8 key"
112-
PythonKeyNine = "9 key"
113-
PythonKeyLeftParenthesis = "LEFT PARENTHESIS key"
114-
PythonKeyRightParenthesis = "RIGHT PARENTHESIS key"
115-
PythonKeyFour = "4 key"
116-
PythonKeyFive = "5 key"
117-
PythonKeySix = "6 key"
118-
PythonKeyMultiplication = "MULTIPLICATION key"
119-
PythonKeyDivision = "DIVISION key"
120-
PythonKeyOne = "1 key"
121-
PythonKeyTwo = "2 key"
122-
PythonKeyThree = "3 key"
123-
PythonKeyPlus = "PLUS key"
124-
PythonKeyMinus = "MINUS key"
125-
PythonKeyZero = "0 key"
126-
PythonKeyDot = "DOT key"
127-
PythonKeyEe = "10 POWER X key"
128-
PythonKeyAns = "ANS key"
129-
PythonKeyExe = "EXE key"
13085
PythonLdexp = "Return x*(2**i), inverse of frexp"
13186
PythonLength = "Length of an object"
13287
PythonLgamma = "Log-gamma function"

apps/code/catalog.es.i18n

+1-46
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolic cosine"
4545
PythonCount = "Count the occurrences of x"
4646
PythonDegrees = "Convert x from radians to degrees"
4747
PythonDivMod = "Quotient and remainder"
48+
PythonDrawLine = "Draw a line"
4849
PythonDrawString = "Display a text from pixel (x,y)"
4950
PythonErf = "Error function"
5051
PythonErfc = "Complementary error function"
@@ -81,52 +82,6 @@ PythonIsInfinite = "Check if x is infinity"
8182
PythonIsKeyDown = "Return True if the k key is down"
8283
PythonIsNaN = "Check if x is a NaN"
8384
PythonKandinskyFunction = "kandinsky module function prefix"
84-
PythonKeyLeft = "LEFT ARROW key"
85-
PythonKeyUp = "UP ARROW key"
86-
PythonKeyDown = "DOWN ARROW key"
87-
PythonKeyRight = "RIGHT ARROW key"
88-
PythonKeyOk = "OK key"
89-
PythonKeyBack = "BACK key"
90-
PythonKeyHome = "HOME key"
91-
PythonKeyOnOff = "ON/OFF key"
92-
PythonKeyShift = "SHIFT key"
93-
PythonKeyAlpha = "ALPHA key"
94-
PythonKeyXnt = "X,N,T key"
95-
PythonKeyVar = "VAR key"
96-
PythonKeyToolbox = "TOOLBOX key"
97-
PythonKeyBackspace = "BACKSPACE key"
98-
PythonKeyExp = "EXPONENTIAL key"
99-
PythonKeyLn = "NATURAL LOGARITHM key"
100-
PythonKeyLog = "DECIMAL LOGARITHM key"
101-
PythonKeyImaginary = "IMAGINARY I key"
102-
PythonKeyComma = "COMMA key"
103-
PythonKeyPower = "POWER key"
104-
PythonKeySine = "SINE key"
105-
PythonKeyCosine = "COSINE key"
106-
PythonKeyTangent = "TANGENT key"
107-
PythonKeyPi = "PI key"
108-
PythonKeySqrt = "SQUARE ROOT key"
109-
PythonKeySquare = "SQUARE key"
110-
PythonKeySeven = "7 key"
111-
PythonKeyEight = "8 key"
112-
PythonKeyNine = "9 key"
113-
PythonKeyLeftParenthesis = "LEFT PARENTHESIS key"
114-
PythonKeyRightParenthesis = "RIGHT PARENTHESIS key"
115-
PythonKeyFour = "4 key"
116-
PythonKeyFive = "5 key"
117-
PythonKeySix = "6 key"
118-
PythonKeyMultiplication = "MULTIPLICATION key"
119-
PythonKeyDivision = "DIVISION key"
120-
PythonKeyOne = "1 key"
121-
PythonKeyTwo = "2 key"
122-
PythonKeyThree = "3 key"
123-
PythonKeyPlus = "PLUS key"
124-
PythonKeyMinus = "MINUS key"
125-
PythonKeyZero = "0 key"
126-
PythonKeyDot = "DOT key"
127-
PythonKeyEe = "10 POWER X key"
128-
PythonKeyAns = "ANS key"
129-
PythonKeyExe = "EXE key"
13085
PythonLdexp = "Return x*(2**i), inverse of frexp"
13186
PythonLength = "Length of an object"
13287
PythonLgamma = "Log-gamma function"

0 commit comments

Comments
 (0)