mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
Fix spelling (#128)
* Fix spelling in .cpp files * Fix spelling in all files
This commit is contained in:
2
Makefile
2
Makefile
@@ -105,7 +105,7 @@ print-%:
|
|||||||
@echo $*\'s origin is $(origin $*)
|
@echo $*\'s origin is $(origin $*)
|
||||||
|
|
||||||
# Since we're building out-of-tree, we need to make sure the output directories
|
# Since we're building out-of-tree, we need to make sure the output directories
|
||||||
# are created, otherwise the receipes will fail (e.g. gcc will fail to create
|
# are created, otherwise the recipes will fail (e.g. gcc will fail to create
|
||||||
# "output/foo/bar.o" because the directory "output/foo" doesn't exist).
|
# "output/foo/bar.o" because the directory "output/foo" doesn't exist).
|
||||||
# We need to mark those directories as precious, otherwise Make will try to get
|
# We need to mark those directories as precious, otherwise Make will try to get
|
||||||
# rid of them upon completion (and fail, since those folders won't be empty).
|
# rid of them upon completion (and fail, since those folders won't be empty).
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -19,7 +19,7 @@ Upsilon is a fork of Omega, an user-made OS that runs on the Numworks calculator
|
|||||||
### Some new features
|
### Some new features
|
||||||
- Enhancements for the Kandinsky python module
|
- Enhancements for the Kandinsky python module
|
||||||
- Support for wallpapers
|
- Support for wallpapers
|
||||||
- Exernal apps
|
- External apps
|
||||||
- A custom theme
|
- A custom theme
|
||||||
- Operator overload for python
|
- Operator overload for python
|
||||||
- Improvements for the Periodic table application
|
- Improvements for the Periodic table application
|
||||||
@@ -154,18 +154,18 @@ You need a windows version >= 1903.
|
|||||||
```powershell
|
```powershell
|
||||||
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux all /norestart
|
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux all /norestart
|
||||||
```
|
```
|
||||||
This command activate WSL functionnalities.
|
This command activate WSL functionalities.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
|
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
|
||||||
```
|
```
|
||||||
This one allows virtual machines developped by Microsoft.
|
This one allows virtual machines developed by Microsoft.
|
||||||
|
|
||||||
2. Restart your computer.
|
2. Restart your computer.
|
||||||
|
|
||||||
3. Download [this file](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) and follow instructions.
|
3. Download [this file](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi) and follow instructions.
|
||||||
|
|
||||||
4. Now open powershell admain like before and type:
|
4. Now open powershell admin like before and type:
|
||||||
```powershell
|
```powershell
|
||||||
wsl --set-default-version 2
|
wsl --set-default-version 2
|
||||||
```
|
```
|
||||||
@@ -174,7 +174,7 @@ wsl --set-default-version 2
|
|||||||
WSL is now installed.
|
WSL is now installed.
|
||||||
|
|
||||||
### Usbipd installation to connect your calculator
|
### Usbipd installation to connect your calculator
|
||||||
If you want to connect to the calculator, you have to connect to install this [tool](https://github.com/dorssel/usbipd-win/releases/download/v1.3.0/usbipd-win_1.3.0.msi). This will allow you to connect WSL to the calculator through internet. Follow the on screen informations to install.
|
If you want to connect to the calculator, you have to connect to install this [tool](https://github.com/dorssel/usbipd-win/releases/download/v1.3.0/usbipd-win_1.3.0.msi). This will allow you to connect WSL to the calculator through internet. Follow the on screen information to install.
|
||||||
#### Ubuntu
|
#### Ubuntu
|
||||||
1. In a WSL Ubuntu command prompt, type:
|
1. In a WSL Ubuntu command prompt, type:
|
||||||
```bash
|
```bash
|
||||||
@@ -188,7 +188,7 @@ sudo visudo
|
|||||||
`Defaults secure_path="/usr/lib/linux-tools/5.4.0-77-generic:/usr/local/sbin:..."`
|
`Defaults secure_path="/usr/lib/linux-tools/5.4.0-77-generic:/usr/local/sbin:..."`
|
||||||
|
|
||||||
#### Debian
|
#### Debian
|
||||||
1. If you use debian for your WSL distro, use this comand instead:
|
1. If you use debian for your WSL distro, use this command instead:
|
||||||
```bash
|
```bash
|
||||||
sudo apt install usbip hwdata usbutils
|
sudo apt install usbip hwdata usbutils
|
||||||
```
|
```
|
||||||
@@ -244,7 +244,7 @@ Now, run either:
|
|||||||
```bash
|
```bash
|
||||||
make MODEL=n0100 epsilon_flash
|
make MODEL=n0100 epsilon_flash
|
||||||
```
|
```
|
||||||
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in.
|
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and plugging in.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ or:
|
|||||||
```bash
|
```bash
|
||||||
make MODEL=n0100 OMEGA_USERNAME="" binpack -j4
|
make MODEL=n0100 OMEGA_USERNAME="" binpack -j4
|
||||||
```
|
```
|
||||||
to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
to make binpack witch you can flash to the calculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@ Now, run either:
|
|||||||
```bash
|
```bash
|
||||||
make epsilon_flash
|
make epsilon_flash
|
||||||
```
|
```
|
||||||
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in.
|
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and plugging in.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ or:
|
|||||||
```bash
|
```bash
|
||||||
make OMEGA_USERNAME="" binpack -j4
|
make OMEGA_USERNAME="" binpack -j4
|
||||||
```
|
```
|
||||||
to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0110/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
to make binpack witch you can flash to the calculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0110/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ ifneq ($(strip $(apps_missing)),)
|
|||||||
$(foreach i, $(SUBMODULES_APPS), $(if $(call app_equals, $(filter $(i), $(apps_missing)), $(i)), $(eval miss_modules=1)))
|
$(foreach i, $(SUBMODULES_APPS), $(if $(call app_equals, $(filter $(i), $(apps_missing)), $(i)), $(eval miss_modules=1)))
|
||||||
|
|
||||||
ifeq ($(miss_modules), 1)
|
ifeq ($(miss_modules), 1)
|
||||||
PLS_IGNORE := $(shell >&2 printf "\nSome submodules apps seem to be missing. To download them, assumming you git clone'd the repo, do\n")
|
PLS_IGNORE := $(shell >&2 printf "\nSome submodules apps seem to be missing. To download them, assuming you git clone'd the repo, do\n")
|
||||||
PLS_IGNORE := $(shell >&2 printf " git submodule init\n")
|
PLS_IGNORE := $(shell >&2 printf " git submodule init\n")
|
||||||
PLS_IGNORE := $(shell >&2 printf " git submodule update\n\n")
|
PLS_IGNORE := $(shell >&2 printf " git submodule update\n\n")
|
||||||
endif
|
endif
|
||||||
@@ -81,7 +81,7 @@ $(call object_for,apps/apps_container_storage.cpp apps/apps_container.cpp apps/m
|
|||||||
country_preferences = apps/country_preferences.csv
|
country_preferences = apps/country_preferences.csv
|
||||||
language_preferences = apps/language_preferences.csv
|
language_preferences = apps/language_preferences.csv
|
||||||
|
|
||||||
# The header is refered to as <apps/i18n.h> so make sure it's findable this way
|
# The header is referred to as <apps/i18n.h> so make sure it's findable this way
|
||||||
SFLAGS += -I$(BUILD_DIR)
|
SFLAGS += -I$(BUILD_DIR)
|
||||||
|
|
||||||
i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N)))
|
i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N)))
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ AppsContainer::AppsContainer() :
|
|||||||
* poincareCircuitBreaker is run. This means either whitelisting all Epsilon
|
* poincareCircuitBreaker is run. This means either whitelisting all Epsilon
|
||||||
* (which makes bigger files to download and slower execution), or
|
* (which makes bigger files to download and slower execution), or
|
||||||
* whitelisting all the symbols (that's a big amount of symbols to find and
|
* whitelisting all the symbols (that's a big amount of symbols to find and
|
||||||
* quite painy to maintain).
|
* quite paint to maintain).
|
||||||
* We just remove the circuit breaker for now.
|
* We just remove the circuit breaker for now.
|
||||||
* TODO: Put the Poincare circuit breaker back on epsilon's web emulator */
|
* TODO: Put the Poincare circuit breaker back on epsilon's web emulator */
|
||||||
|
|
||||||
@@ -319,7 +319,7 @@ void AppsContainer::run() {
|
|||||||
* destroyed from the pool. To avoid using them before packing the app
|
* destroyed from the pool. To avoid using them before packing the app
|
||||||
* (in App::willBecomeInactive for instance), we tidy them early on. */
|
* (in App::willBecomeInactive for instance), we tidy them early on. */
|
||||||
s_activeApp->snapshot()->tidy();
|
s_activeApp->snapshot()->tidy();
|
||||||
/* When an app encoutered an exception due to a full pool, the next time
|
/* When an app encountered an exception due to a full pool, the next time
|
||||||
* the user enters the app, the same exception could happen again which
|
* the user enters the app, the same exception could happen again which
|
||||||
* would prevent from reopening the app. To avoid being stuck outside the
|
* would prevent from reopening the app. To avoid being stuck outside the
|
||||||
* app causing the issue, we reset its snapshot when leaving it due to
|
* app causing the issue, we reset its snapshot when leaving it due to
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ BacklightDimmingTimer::BacklightDimmingTimer() :
|
|||||||
bool BacklightDimmingTimer::fire() {
|
bool BacklightDimmingTimer::fire() {
|
||||||
if (m_dimerExecutions == 0) {
|
if (m_dimerExecutions == 0) {
|
||||||
m_brightnessLevel = GlobalPreferences::sharedGlobalPreferences()->brightnessLevel();
|
m_brightnessLevel = GlobalPreferences::sharedGlobalPreferences()->brightnessLevel();
|
||||||
m_dimerSteps = m_brightnessLevel / decreaseby;
|
m_dimerSteps = m_brightnessLevel / decreaseBy;
|
||||||
m_timeToSleep = decreasetime / m_dimerSteps;
|
m_timeToSleep = decreasetime / m_dimerSteps;
|
||||||
m_period = m_timeToSleep / Timer::TickDuration;
|
m_period = m_timeToSleep / Timer::TickDuration;
|
||||||
if (m_period == 0) {
|
if (m_period == 0) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
constexpr static int k_idleBeforeDimmingDuration = 30*1000; // In miliseconds
|
constexpr static int k_idleBeforeDimmingDuration = 30*1000; // In miliseconds
|
||||||
constexpr static int k_dimBacklightBrightness = 0;
|
constexpr static int k_dimBacklightBrightness = 0;
|
||||||
constexpr static int decreaseby = 15;
|
constexpr static int decreaseBy = 15;
|
||||||
constexpr static int decreasetime = 1*1000; // In miliseconds
|
constexpr static int decreasetime = 1*1000; // In miliseconds
|
||||||
int m_dimerExecutions = 0;
|
int m_dimerExecutions = 0;
|
||||||
int m_brightnessLevel;
|
int m_brightnessLevel;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ CalculationStore::CalculationStore(char * buffer, int size) :
|
|||||||
// Returns an expiring pointer to the calculation of index i
|
// Returns an expiring pointer to the calculation of index i
|
||||||
ExpiringPointer<Calculation> CalculationStore::calculationAtIndex(int i) {
|
ExpiringPointer<Calculation> CalculationStore::calculationAtIndex(int i) {
|
||||||
assert(i >= 0 && i < m_numberOfCalculations);
|
assert(i >= 0 && i < m_numberOfCalculations);
|
||||||
// m_buffer is the adress of the oldest calculation in calculation store
|
// m_buffer is the address of the oldest calculation in calculation store
|
||||||
Calculation * c = (Calculation *) m_buffer;
|
Calculation * c = (Calculation *) m_buffer;
|
||||||
if (i != m_numberOfCalculations-1) {
|
if (i != m_numberOfCalculations-1) {
|
||||||
// The calculation we want is not the oldest one so we get its pointer
|
// The calculation we want is not the oldest one so we get its pointer
|
||||||
@@ -100,9 +100,9 @@ ExpiringPointer<Calculation> CalculationStore::push(const char * text, Context *
|
|||||||
numberOfSignificantDigits = Poincare::Preferences::sharedPreferences()->numberOfSignificantDigits();
|
numberOfSignificantDigits = Poincare::Preferences::sharedPreferences()->numberOfSignificantDigits();
|
||||||
}
|
}
|
||||||
if (!pushSerializeExpression(outputs[i], beginingOfFreeSpace, &endOfFreeSpace, numberOfSignificantDigits)) {
|
if (!pushSerializeExpression(outputs[i], beginingOfFreeSpace, &endOfFreeSpace, numberOfSignificantDigits)) {
|
||||||
/* If the exat/approximate output does not fit in the store (event if the
|
/* If the exact/approximate output does not fit in the store (event if the
|
||||||
* current calculation is the only calculation), replace the output with
|
* current calculation is the only calculation), replace the output with
|
||||||
* undef if it fits, else replace the whole calcualtion with undef. */
|
* undef if it fits, else replace the whole calculation with undef. */
|
||||||
Expression undef = Undefined::Builder();
|
Expression undef = Undefined::Builder();
|
||||||
if (!pushSerializeExpression(undef, beginingOfFreeSpace, &endOfFreeSpace)) {
|
if (!pushSerializeExpression(undef, beginingOfFreeSpace, &endOfFreeSpace)) {
|
||||||
return emptyStoreAndPushUndef(context, heightComputer);
|
return emptyStoreAndPushUndef(context, heightComputer);
|
||||||
@@ -177,8 +177,8 @@ Expression CalculationStore::ansExpression(Context * context) {
|
|||||||
* parsed), ans is replaced by the approximation output when any Store or
|
* parsed), ans is replaced by the approximation output when any Store or
|
||||||
* Equal expression appears. */
|
* Equal expression appears. */
|
||||||
Expression e = mostRecentCalculation->exactOutput();
|
Expression e = mostRecentCalculation->exactOutput();
|
||||||
bool exactOuptutInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal;
|
bool exactOutputInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal;
|
||||||
if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOuptutInvolvesStoreEqual) {
|
if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOutputInvolvesStoreEqual) {
|
||||||
return mostRecentCalculation->approximateOutput(context, Calculation::NumberOfSignificantDigits::Maximal);
|
return mostRecentCalculation->approximateOutput(context, Calculation::NumberOfSignificantDigits::Maximal);
|
||||||
}
|
}
|
||||||
return mostRecentCalculation->exactOutput();
|
return mostRecentCalculation->exactOutput();
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location"
|
|||||||
PythonTurtleReset = "Reset the drawing"
|
PythonTurtleReset = "Reset the drawing"
|
||||||
PythonTurtleRight = "Turn right by a degrees"
|
PythonTurtleRight = "Turn right by a degrees"
|
||||||
PythonTurtleSetheading = "Set the orientation to a degrees"
|
PythonTurtleSetheading = "Set the orientation to a degrees"
|
||||||
PythonTurtleSetposition = "Positionne la tortue"
|
PythonTurtleSetposition = "Positioning the turtle"
|
||||||
PythonTurtleShowturtle = "Show the turtle"
|
PythonTurtleShowturtle = "Show the turtle"
|
||||||
PythonTurtleSpeed = "Drawing speed between 0 and 10"
|
PythonTurtleSpeed = "Drawing speed between 0 and 10"
|
||||||
PythonTurtleWrite = "Display a text"
|
PythonTurtleWrite = "Display a text"
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location"
|
|||||||
PythonTurtleReset = "Reset the drawing"
|
PythonTurtleReset = "Reset the drawing"
|
||||||
PythonTurtleRight = "Turn right by a degrees"
|
PythonTurtleRight = "Turn right by a degrees"
|
||||||
PythonTurtleSetheading = "Set the orientation to a degrees"
|
PythonTurtleSetheading = "Set the orientation to a degrees"
|
||||||
PythonTurtleSetposition = "Positionne la tortue"
|
PythonTurtleSetposition = "Colocar la tortuga"
|
||||||
PythonTurtleShowturtle = "Show the turtle"
|
PythonTurtleShowturtle = "Show the turtle"
|
||||||
PythonTurtleSpeed = "Drawing speed between 0 and 10"
|
PythonTurtleSpeed = "Drawing speed between 0 and 10"
|
||||||
PythonTurtleWrite = "Display a text"
|
PythonTurtleWrite = "Display a text"
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ PythonTurtlePosition = "Devolve a posição atual (x,y)"
|
|||||||
PythonTurtleReset = "Reiniciar o desenho"
|
PythonTurtleReset = "Reiniciar o desenho"
|
||||||
PythonTurtleRight = "Virar à esquerda por a graus"
|
PythonTurtleRight = "Virar à esquerda por a graus"
|
||||||
PythonTurtleSetheading = "Definir a orientação por a graus"
|
PythonTurtleSetheading = "Definir a orientação por a graus"
|
||||||
PythonTurtleSetposition = "Positionne la tortue"
|
PythonTurtleSetposition = "Posicionamento da tartaruga"
|
||||||
PythonTurtleShowturtle = "Mostrar o turtle"
|
PythonTurtleShowturtle = "Mostrar o turtle"
|
||||||
PythonTurtleSpeed = "Velocidade do desenho entre 0 e 10"
|
PythonTurtleSpeed = "Velocidade do desenho entre 0 e 10"
|
||||||
PythonTurtleWrite = "Mostrar um texto"
|
PythonTurtleWrite = "Mostrar um texto"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void assert_variables_are(const char * script, const char * nameToComplete, cons
|
|||||||
&addParentheses,
|
&addParentheses,
|
||||||
i,
|
i,
|
||||||
&index);
|
&index);
|
||||||
quiz_assert(i == index); // If false, the autompletion has cycled: there are not as many results as expected
|
quiz_assert(i == index); // If false, the autocompletion has cycled: there are not as many results as expected
|
||||||
quiz_assert(strncmp(*(expectedVariables + i), autocompletionI - nameToCompleteLength, textToInsertLength + nameToCompleteLength) == 0);
|
quiz_assert(strncmp(*(expectedVariables + i), autocompletionI - nameToCompleteLength, textToInsertLength + nameToCompleteLength) == 0);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, in
|
|||||||
assert(sizeof(builtinNames) / sizeof(builtinNames[0]) == k_totalBuiltinNodesCount);
|
assert(sizeof(builtinNames) / sizeof(builtinNames[0]) == k_totalBuiltinNodesCount);
|
||||||
for (int i = 0; i < k_totalBuiltinNodesCount; i++) {
|
for (int i = 0; i < k_totalBuiltinNodesCount; i++) {
|
||||||
if (addNodeIfMatches(textToAutocomplete, textToAutocompleteLength, builtinNames[i].type, NodeOrigin::Builtins, builtinNames[i].name)) {
|
if (addNodeIfMatches(textToAutocomplete, textToAutocompleteLength, builtinNames[i].type, NodeOrigin::Builtins, builtinNames[i].name)) {
|
||||||
/* We can leverage on the fact that buitin nodes are stored in
|
/* We can leverage on the fact that builtin nodes are stored in
|
||||||
* alphabetical order. */
|
* alphabetical order. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -575,7 +575,7 @@ void VariableBoxController::loadImportedVariablesInScript(const char * scriptCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VariableBoxController::loadCurrentVariablesInScript(const char * scriptContent, const char * textToAutocomplete, int textToAutocompleteLength) {
|
void VariableBoxController::loadCurrentVariablesInScript(const char * scriptContent, const char * textToAutocomplete, int textToAutocompleteLength) {
|
||||||
/* To find variable and funtion names: we lex the script and keep all
|
/* To find variable and function names: we lex the script and keep all
|
||||||
* MP_TOKEN_NAME that complete the text to autocomplete and are not already in
|
* MP_TOKEN_NAME that complete the text to autocomplete and are not already in
|
||||||
* the builtins or imported scripts. */
|
* the builtins or imported scripts. */
|
||||||
|
|
||||||
@@ -653,7 +653,7 @@ void VariableBoxController::loadGlobalAndImportedVariablesInScriptAsImported(Scr
|
|||||||
/* At this point, if the script node is not of type "file_input_2", it
|
/* At this point, if the script node is not of type "file_input_2", it
|
||||||
* will not have main structures of the wanted type.
|
* will not have main structures of the wanted type.
|
||||||
* We look for structures at first level (not inside nested scopes) that
|
* We look for structures at first level (not inside nested scopes) that
|
||||||
* are either dunction definitions, variables statements or imports. */
|
* are either function definitions, variables statements or imports. */
|
||||||
size_t n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns);
|
size_t n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns);
|
||||||
for (size_t i = 0; i < n; i++) {
|
for (size_t i = 0; i < n; i++) {
|
||||||
mp_parse_node_t child = pns->nodes[i];
|
mp_parse_node_t child = pns->nodes[i];
|
||||||
@@ -826,15 +826,15 @@ bool VariableBoxController::importationSourceIsModule(const char * sourceName, c
|
|||||||
return mp_module_get(qstr_from_str(sourceName)) != MP_OBJ_NULL;
|
return mp_module_get(qstr_from_str(sourceName)) != MP_OBJ_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VariableBoxController::importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retreivedScript) {
|
bool VariableBoxController::importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retrievedScript) {
|
||||||
// Try fetching the nodes from a script
|
// Try fetching the nodes from a script
|
||||||
Script importedScript = ScriptStore::ScriptBaseNamed(sourceName);
|
Script importedScript = ScriptStore::ScriptBaseNamed(sourceName);
|
||||||
if (importedScript.isNull()) {
|
if (importedScript.isNull()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*scriptFullName = importedScript.fullName();
|
*scriptFullName = importedScript.fullName();
|
||||||
if (retreivedScript != nullptr) {
|
if (retrievedScript != nullptr) {
|
||||||
*retreivedScript = importedScript;
|
*retrievedScript = importedScript;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ private:
|
|||||||
bool addNodesFromImportMaybe(mp_parse_node_struct_t * parseNode, const char * textToAutocomplete, int textToAutocompleteLength, bool importFromModules = true);
|
bool addNodesFromImportMaybe(mp_parse_node_struct_t * parseNode, const char * textToAutocomplete, int textToAutocompleteLength, bool importFromModules = true);
|
||||||
const char * importationSourceNameFromNode(mp_parse_node_t & node);
|
const char * importationSourceNameFromNode(mp_parse_node_t & node);
|
||||||
bool importationSourceIsModule(const char * sourceName, const ToolboxMessageTree * * moduleChildren = nullptr, int * numberOfModuleChildren = nullptr);
|
bool importationSourceIsModule(const char * sourceName, const ToolboxMessageTree * * moduleChildren = nullptr, int * numberOfModuleChildren = nullptr);
|
||||||
bool importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retreivedScript = nullptr);
|
bool importationSourceIsScript(const char * sourceName, const char * * scriptFullName, Script * retrievedScript = nullptr);
|
||||||
bool addImportStructFromScript(mp_parse_node_struct_t * pns, uint structKind, const char * scriptName, const char * textToAutocomplete, int textToAutocompleteLength);
|
bool addImportStructFromScript(mp_parse_node_struct_t * pns, uint structKind, const char * scriptName, const char * textToAutocomplete, int textToAutocompleteLength);
|
||||||
/* Add a node if it completes the text to autocomplete and if it is not
|
/* Add a node if it completes the text to autocomplete and if it is not
|
||||||
* already contained in the variable box. The returned boolean means we
|
* already contained in the variable box. The returned boolean means we
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ EvenOddBufferTextCell * ValuesController::floatCells(int j) {
|
|||||||
|
|
||||||
/* ValuesController::ValuesSelectableTableView */
|
/* ValuesController::ValuesSelectableTableView */
|
||||||
|
|
||||||
int writeMatrixBrakets(char * buffer, const int bufferSize, int type) {
|
int writeMatrixBrackets(char * buffer, const int bufferSize, int type) {
|
||||||
/* Write the double brackets required in matrix notation.
|
/* Write the double brackets required in matrix notation.
|
||||||
* - type == 1: "[["
|
* - type == 1: "[["
|
||||||
* - type == 0: "]["
|
* - type == 0: "]["
|
||||||
@@ -365,14 +365,14 @@ bool ValuesController::ValuesSelectableTableView::handleEvent(Ion::Events::Event
|
|||||||
constexpr int bufferSize = 2*PrintFloat::k_maxFloatCharSize + 6; // "[[a][b]]" gives 6 characters in addition to the 2 floats
|
constexpr int bufferSize = 2*PrintFloat::k_maxFloatCharSize + 6; // "[[a][b]]" gives 6 characters in addition to the 2 floats
|
||||||
char buffer[bufferSize];
|
char buffer[bufferSize];
|
||||||
int currentChar = 0;
|
int currentChar = 0;
|
||||||
currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, -1);
|
currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, -1);
|
||||||
assert(currentChar < bufferSize-1);
|
assert(currentChar < bufferSize-1);
|
||||||
size_t semiColonPosition = UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1, ';');
|
size_t semiColonPosition = UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1, ';');
|
||||||
currentChar += semiColonPosition;
|
currentChar += semiColonPosition;
|
||||||
currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, 0);
|
currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, 0);
|
||||||
assert(currentChar < bufferSize-1);
|
assert(currentChar < bufferSize-1);
|
||||||
currentChar += UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1+semiColonPosition+1, ')');
|
currentChar += UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1+semiColonPosition+1, ')');
|
||||||
currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, 1);
|
currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, 1);
|
||||||
assert(currentChar < bufferSize-1);
|
assert(currentChar < bufferSize-1);
|
||||||
buffer[currentChar] = 0;
|
buffer[currentChar] = 0;
|
||||||
Clipboard::sharedClipboard()->store(buffer);
|
Clipboard::sharedClipboard()->store(buffer);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ i18n_files += $(call i18n_without_universal_for,home/base)
|
|||||||
|
|
||||||
# Apps layout file generation
|
# Apps layout file generation
|
||||||
|
|
||||||
# The header is refered to as <apps/home/apps_layout.h> so make sure it's
|
# The header is referred to as <apps/home/apps_layout.h> so make sure it's
|
||||||
# findable this way
|
# findable this way
|
||||||
SFLAGS += -I$(BUILD_DIR)
|
SFLAGS += -I$(BUILD_DIR)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Anwendungen"
|
Apps = "Anwendungen"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Diese Anwendung ist im"
|
ForbiddenAppInExamMode1 = "Diese Anwendung ist im"
|
||||||
ForbidenAppInExamMode2 = "Prüfungsmodus nicht erlaubt."
|
ForbiddenAppInExamMode2 = "Prüfungsmodus nicht erlaubt."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Applications"
|
Apps = "Applications"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "This application is"
|
ForbiddenAppInExamMode1 = "This application is"
|
||||||
ForbidenAppInExamMode2 = "forbidden in exam mode"
|
ForbiddenAppInExamMode2 = "forbidden in exam mode"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Aplicaciones"
|
Apps = "Aplicaciones"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Esta aplicación está prohibida"
|
ForbiddenAppInExamMode1 = "Esta aplicación está prohibida"
|
||||||
ForbidenAppInExamMode2 = "en el modo de examen"
|
ForbiddenAppInExamMode2 = "en el modo de examen"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Applications"
|
Apps = "Applications"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Cette application n'est"
|
ForbiddenAppInExamMode1 = "Cette application n'est"
|
||||||
ForbidenAppInExamMode2 = "pas autorisée en mode examen."
|
ForbiddenAppInExamMode2 = "pas autorisée en mode examen."
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Alkalmazások"
|
Apps = "Alkalmazások"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Ez az alkalmazás"
|
ForbiddenAppInExamMode1 = "Ez az alkalmazás"
|
||||||
ForbidenAppInExamMode2 = "tilos vizsga módban"
|
ForbiddenAppInExamMode2 = "tilos vizsga módban"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Applicazioni"
|
Apps = "Applicazioni"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Questa applicazione è"
|
ForbiddenAppInExamMode1 = "Questa applicazione è"
|
||||||
ForbidenAppInExamMode2 = "proibita nella modalità d'esame"
|
ForbiddenAppInExamMode2 = "proibita nella modalità d'esame"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Applicaties"
|
Apps = "Applicaties"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Deze applicatie is"
|
ForbiddenAppInExamMode1 = "Deze applicatie is"
|
||||||
ForbidenAppInExamMode2 = "uitgesloten in examenstand"
|
ForbiddenAppInExamMode2 = "uitgesloten in examenstand"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Apps = "Aplicações"
|
Apps = "Aplicações"
|
||||||
AppsCapital = "UPSILON"
|
AppsCapital = "UPSILON"
|
||||||
ForbidenAppInExamMode1 = "Esta aplicação é"
|
ForbiddenAppInExamMode1 = "Esta aplicação é"
|
||||||
ForbidenAppInExamMode2 = "proibida no Modo de Exame"
|
ForbiddenAppInExamMode2 = "proibida no Modo de Exame"
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ bool Controller::handleEvent(Ion::Events::Event event) {
|
|||||||
#ifdef HOME_DISPLAY_EXTERNALS
|
#ifdef HOME_DISPLAY_EXTERNALS
|
||||||
if (index >= container->numberOfApps()) {
|
if (index >= container->numberOfApps()) {
|
||||||
if (GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Dutch || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSymNoText || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSym) {
|
if (GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Dutch || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSymNoText || GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::NoSym) {
|
||||||
App::app()->displayWarning(I18n::Message::ForbidenAppInExamMode1, I18n::Message::ForbidenAppInExamMode2);
|
App::app()->displayWarning(I18n::Message::ForbiddenAppInExamMode1, I18n::Message::ForbiddenAppInExamMode2);
|
||||||
} else {
|
} else {
|
||||||
External::Archive::File executable;
|
External::Archive::File executable;
|
||||||
if (External::Archive::executableAtIndex(index - container->numberOfApps(), executable)) {
|
if (External::Archive::executableAtIndex(index - container->numberOfApps(), executable)) {
|
||||||
@@ -120,7 +120,7 @@ bool Controller::handleEvent(Ion::Events::Event event) {
|
|||||||
#endif
|
#endif
|
||||||
::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(index);
|
::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(index);
|
||||||
if (ExamModeConfiguration::appIsForbiddenInExamMode(selectedSnapshot->descriptor()->examinationLevel(), GlobalPreferences::sharedGlobalPreferences()->examMode())) {
|
if (ExamModeConfiguration::appIsForbiddenInExamMode(selectedSnapshot->descriptor()->examinationLevel(), GlobalPreferences::sharedGlobalPreferences()->examMode())) {
|
||||||
App::app()->displayWarning(I18n::Message::ForbidenAppInExamMode1, I18n::Message::ForbidenAppInExamMode2);
|
App::app()->displayWarning(I18n::Message::ForbiddenAppInExamMode1, I18n::Message::ForbiddenAppInExamMode2);
|
||||||
} else {
|
} else {
|
||||||
bool switched = container->switchTo(selectedSnapshot);
|
bool switched = container->switchTo(selectedSnapshot);
|
||||||
assert(switched);
|
assert(switched);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const ToolboxMessageTree calculChildren[] = {
|
|||||||
|
|
||||||
const ToolboxMessageTree complexChildren[] = {
|
const ToolboxMessageTree complexChildren[] = {
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg,I18n::Message::ComplexAbsoluteValue),
|
ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg,I18n::Message::ComplexAbsoluteValue),
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::ArgCommandWithArg, I18n::Message::Agument),
|
ToolboxMessageTree::Leaf(I18n::Message::ArgCommandWithArg, I18n::Message::Argument),
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::ReCommandWithArg, I18n::Message::RealPart),
|
ToolboxMessageTree::Leaf(I18n::Message::ReCommandWithArg, I18n::Message::RealPart),
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::ImCommandWithArg, I18n::Message::ImaginaryPart),
|
ToolboxMessageTree::Leaf(I18n::Message::ImCommandWithArg, I18n::Message::ImaginaryPart),
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::ConjCommandWithArg, I18n::Message::Conjugate)
|
ToolboxMessageTree::Leaf(I18n::Message::ConjCommandWithArg, I18n::Message::Conjugate)
|
||||||
@@ -252,7 +252,7 @@ const ToolboxMessageTree unitEnergyElectronVoltChildren[] = {
|
|||||||
};
|
};
|
||||||
const ToolboxMessageTree unitEnergyChildren[] = {
|
const ToolboxMessageTree unitEnergyChildren[] = {
|
||||||
ToolboxMessageTree::Node(I18n::Message::UnitEnergyJouleMenu, unitEnergyJouleChildren),
|
ToolboxMessageTree::Node(I18n::Message::UnitEnergyJouleMenu, unitEnergyJouleChildren),
|
||||||
ToolboxMessageTree::Node(I18n::Message::UnitEnergyEletronVoltMenu, unitEnergyElectronVoltChildren)};
|
ToolboxMessageTree::Node(I18n::Message::UnitEnergyElectronVoltMenu, unitEnergyElectronVoltChildren)};
|
||||||
|
|
||||||
const ToolboxMessageTree unitPowerWattChildren[] = {
|
const ToolboxMessageTree unitPowerWattChildren[] = {
|
||||||
ToolboxMessageTree::Leaf(I18n::Message::UnitPowerWattMicroSymbol, I18n::Message::UnitPowerWattMicro),
|
ToolboxMessageTree::Leaf(I18n::Message::UnitPowerWattMicroSymbol, I18n::Message::UnitPowerWattMicro),
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ void CalculationController::willDisplayCellAtLocation(HighlightCell * cell, int
|
|||||||
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
|
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
|
||||||
constexpr int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(precision);
|
constexpr int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(precision);
|
||||||
char buffer[bufferSize];
|
char buffer[bufferSize];
|
||||||
// FIXME: Leo has not decided yet if we should use the prefered mode instead of always using scientific mode
|
// FIXME: Leo has not decided yet if we should use the preferred mode instead of always using scientific mode
|
||||||
PoincareHelpers::ConvertFloatToTextWithDisplayMode<double>(m_calculation->parameterAtIndex(i-1), buffer, bufferSize, precision, Preferences::PrintFloatMode::Decimal);
|
PoincareHelpers::ConvertFloatToTextWithDisplayMode<double>(m_calculation->parameterAtIndex(i-1), buffer, bufferSize, precision, Preferences::PrintFloatMode::Decimal);
|
||||||
field->setText(buffer);
|
field->setText(buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ double Distribution::cumulativeDistributiveInverseForProbabilityUsingIncreasingF
|
|||||||
* the given ax bx bounds */
|
* the given ax bx bounds */
|
||||||
if (!(std::isnan(result.x2()) || std::fabs(result.x2()) <= FLT_EPSILON || std::fabs(result.x1()- ax) < FLT_EPSILON || std::fabs(result.x1() - bx) < FLT_EPSILON)) {
|
if (!(std::isnan(result.x2()) || std::fabs(result.x2()) <= FLT_EPSILON || std::fabs(result.x1()- ax) < FLT_EPSILON || std::fabs(result.x1() - bx) < FLT_EPSILON)) {
|
||||||
/* TODO We would like to put this as an assertion, but sometimes we do get
|
/* TODO We would like to put this as an assertion, but sometimes we do get
|
||||||
* false result: we replace them with inf to make the problem obvisous to
|
* false result: we replace them with inf to make the problem obvious to
|
||||||
* the student. */
|
* the student. */
|
||||||
return *probability > 0.5 ? INFINITY : -INFINITY;
|
return *probability > 0.5 ? INFINITY : -INFINITY;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ double StudentDistribution::cumulativeDistributiveFunctionAtAbscissa(double x) c
|
|||||||
if (std::isinf(x)) {
|
if (std::isinf(x)) {
|
||||||
return x > 0 ? 1.0 : 0.0;
|
return x > 0 ? 1.0 : 0.0;
|
||||||
}
|
}
|
||||||
/* TODO There are some computation errors, where the probability falsly jumps to 1.
|
/* TODO There are some computation errors, where the probability falsy jumps to 1.
|
||||||
* k = 0.001 and P(x < 42000000) (for 41000000 it is around 0.5)
|
* k = 0.001 and P(x < 42000000) (for 41000000 it is around 0.5)
|
||||||
* k = 0.01 and P(x < 8400000) (for 41000000 it is around 0.6) */
|
* k = 0.01 and P(x < 8400000) (for 41000000 it is around 0.6) */
|
||||||
const double k = m_parameter1;
|
const double k = m_parameter1;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Reader {
|
|||||||
|
|
||||||
// List of available Function Commands that don't require a specific handling
|
// List of available Function Commands that don't require a specific handling
|
||||||
static constexpr char const * k_FunctionCommands[] = {
|
static constexpr char const * k_FunctionCommands[] = {
|
||||||
"arcos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth",
|
"arccos", "arcsin", "arctan", "arg", "cos", "cosh", "cot", "coth",
|
||||||
"csc", "deg", "det", "dim", "exp", "gcd", "hom", "inf",
|
"csc", "deg", "det", "dim", "exp", "gcd", "hom", "inf",
|
||||||
"ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max",
|
"ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max",
|
||||||
"min", "Pr", "sec", "sin", "sinh", "sup", "tan", "tanh"
|
"min", "Pr", "sec", "sin", "sinh", "sup", "tan", "tanh"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ bool GoToParameterController::confirmParameterAtIndex(int parameterIndex, double
|
|||||||
} else {
|
} else {
|
||||||
double yFromX = m_store->modelForSeries(series)->evaluate(m_store->coefficientsForSeries(series, globContext), unknown);
|
double yFromX = m_store->modelForSeries(series)->evaluate(m_store->coefficientsForSeries(series, globContext), unknown);
|
||||||
/* We here compute y2 = a*((y1-b)/a)+b, which does not always give y1,
|
/* We here compute y2 = a*((y1-b)/a)+b, which does not always give y1,
|
||||||
* because of computation precision. y2 migth thus be invalid. */
|
* because of computation precision. y2 might thus be invalid. */
|
||||||
if (std::isnan(yFromX) || std::isinf(yFromX)) {
|
if (std::isnan(yFromX) || std::isinf(yFromX)) {
|
||||||
Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue);
|
Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ protected:
|
|||||||
Poincare::Layout m_layout;
|
Poincare::Layout m_layout;
|
||||||
private:
|
private:
|
||||||
// Model attributes
|
// Model attributes
|
||||||
virtual Poincare::Expression expression(double * modelCoefficients) { return Poincare::Expression(); } // expression is overrided only by Models that do not override levelSet
|
virtual Poincare::Expression expression(double * modelCoefficients) { return Poincare::Expression(); } // expression is overridden only by Models that do not override levelSet
|
||||||
virtual double partialDerivate(double * modelCoefficients, int derivateCoefficientIndex, double x) const = 0;
|
virtual double partialDerivate(double * modelCoefficients, int derivateCoefficientIndex, double x) const = 0;
|
||||||
|
|
||||||
// Levenberg-Marquardt
|
// Levenberg-Marquardt
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ QUIZ_CASE(power_regression) {
|
|||||||
// assert_regression_is(x2, y2, 4, Model::Type::Power, coefficients2, r22);
|
// assert_regression_is(x2, y2, 4, Model::Type::Power, coefficients2, r22);
|
||||||
}
|
}
|
||||||
|
|
||||||
void assert_trigonomatric_regression_is(double * xi, double * yi, int numberOfPoints, double * trueCoefficients, double trueR2, Poincare::Preferences::AngleUnit trueCoeffcientsUnit) {
|
void assert_trigonometric_regression_is(double * xi, double * yi, int numberOfPoints, double * trueCoefficients, double trueR2, Poincare::Preferences::AngleUnit trueCoeffcientsUnit) {
|
||||||
// Test the trigonometric regression at all angle units
|
// Test the trigonometric regression at all angle units
|
||||||
const Preferences::AngleUnit previousAngleUnit = Preferences::sharedPreferences()->angleUnit();
|
const Preferences::AngleUnit previousAngleUnit = Preferences::sharedPreferences()->angleUnit();
|
||||||
const Poincare::Preferences::AngleUnit units[3] = {Poincare::Preferences::AngleUnit::Radian, Poincare::Preferences::AngleUnit::Degree, Poincare::Preferences::AngleUnit::Gradian};
|
const Poincare::Preferences::AngleUnit units[3] = {Poincare::Preferences::AngleUnit::Radian, Poincare::Preferences::AngleUnit::Degree, Poincare::Preferences::AngleUnit::Gradian};
|
||||||
@@ -214,7 +214,7 @@ QUIZ_CASE(trigonometric_regression1) {
|
|||||||
int numberOfPoints = sizeof(x) / sizeof(double);
|
int numberOfPoints = sizeof(x) / sizeof(double);
|
||||||
assert(sizeof(y) == sizeof(double) * numberOfPoints);
|
assert(sizeof(y) == sizeof(double) * numberOfPoints);
|
||||||
|
|
||||||
assert_trigonomatric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian);
|
assert_trigonometric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian);
|
||||||
}
|
}
|
||||||
|
|
||||||
QUIZ_CASE(trigonometric_regression2) {
|
QUIZ_CASE(trigonometric_regression2) {
|
||||||
@@ -225,7 +225,7 @@ QUIZ_CASE(trigonometric_regression2) {
|
|||||||
int numberOfPoints = sizeof(x) / sizeof(double);
|
int numberOfPoints = sizeof(x) / sizeof(double);
|
||||||
assert(sizeof(y) == sizeof(double) * numberOfPoints);
|
assert(sizeof(y) == sizeof(double) * numberOfPoints);
|
||||||
|
|
||||||
assert_trigonomatric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian);
|
assert_trigonometric_regression_is(x, y, numberOfPoints, coefficients, r2, Poincare::Preferences::AngleUnit::Radian);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ TypeParameterController::TypeParameterController(Responder * parentResponder, Li
|
|||||||
ViewController(parentResponder),
|
ViewController(parentResponder),
|
||||||
m_explicitCell(&m_selectableTableView, I18n::Message::Explicit, cellLayout),
|
m_explicitCell(&m_selectableTableView, I18n::Message::Explicit, cellLayout),
|
||||||
m_singleRecurrenceCell(&m_selectableTableView, I18n::Message::SingleRecurrence, cellLayout),
|
m_singleRecurrenceCell(&m_selectableTableView, I18n::Message::SingleRecurrence, cellLayout),
|
||||||
m_doubleRecurenceCell(&m_selectableTableView, I18n::Message::DoubleRecurrence, cellLayout),
|
m_doubleRecurrenceCell(&m_selectableTableView, I18n::Message::DoubleRecurrence, cellLayout),
|
||||||
m_layouts{},
|
m_layouts{},
|
||||||
m_selectableTableView(this),
|
m_selectableTableView(this),
|
||||||
m_record(),
|
m_record(),
|
||||||
@@ -100,7 +100,7 @@ int TypeParameterController::numberOfRows() const {
|
|||||||
HighlightCell * TypeParameterController::reusableCell(int index) {
|
HighlightCell * TypeParameterController::reusableCell(int index) {
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
assert(index < k_totalNumberOfCell);
|
assert(index < k_totalNumberOfCell);
|
||||||
HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurenceCell};
|
HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurrenceCell};
|
||||||
return cells[index];
|
return cells[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ private:
|
|||||||
constexpr static int k_totalNumberOfCell = 3;
|
constexpr static int k_totalNumberOfCell = 3;
|
||||||
ExpressionTableCellWithPointer m_explicitCell;
|
ExpressionTableCellWithPointer m_explicitCell;
|
||||||
ExpressionTableCellWithPointer m_singleRecurrenceCell;
|
ExpressionTableCellWithPointer m_singleRecurrenceCell;
|
||||||
ExpressionTableCellWithPointer m_doubleRecurenceCell;
|
ExpressionTableCellWithPointer m_doubleRecurrenceCell;
|
||||||
Poincare::Layout m_layouts[k_totalNumberOfCell];
|
Poincare::Layout m_layouts[k_totalNumberOfCell];
|
||||||
SelectableTableView m_selectableTableView;
|
SelectableTableView m_selectableTableView;
|
||||||
Ion::Storage::Record m_record;
|
Ion::Storage::Record m_record;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ void check_sequences_defined_by(double result[MaxNumberOfSequences][10], Sequenc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
store->removeAll();
|
store->removeAll();
|
||||||
/* The store is a global variable that has been contructed through
|
/* The store is a global variable that has been constructed through
|
||||||
* GlobalContext::sequenceStore singleton. It won't be destructed. However,
|
* GlobalContext::sequenceStore singleton. It won't be destructed. However,
|
||||||
* we need to make sure that the pool is empty between quiz_cases. */
|
* we need to make sure that the pool is empty between quiz_cases. */
|
||||||
store->tidy();
|
store->tidy();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Settings {
|
|||||||
|
|
||||||
void AboutController::viewWillAppear() {
|
void AboutController::viewWillAppear() {
|
||||||
GenericSubController::viewWillAppear();
|
GenericSubController::viewWillAppear();
|
||||||
// IN OMEGA, THE FOLLOWING LINES ARE ADDED IN A SUBMENU "LEGAL INFORMATION", BECAUSE MESSAGES DELETE THE SCROLLBAR.
|
// IN UPSILON, THE FOLLOWING LINES ARE ADDED IN A SUBMENU "LEGAL INFORMATION", BECAUSE MESSAGES DELETE THE SCROLLBAR.
|
||||||
// --------------------- Please don't edit these lines ----------------------
|
// --------------------- Please don't edit these lines ----------------------
|
||||||
I18n::Message cautionMessages[] = {I18n::Message::AboutWarning1, I18n::Message::AboutWarning2, I18n::Message::AboutWarning3, I18n::Message::AboutWarning4};
|
I18n::Message cautionMessages[] = {I18n::Message::AboutWarning1, I18n::Message::AboutWarning2, I18n::Message::AboutWarning3, I18n::Message::AboutWarning4};
|
||||||
// m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message));
|
// m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message));
|
||||||
|
|||||||
@@ -63,15 +63,15 @@ void UsbInfoController::willDisplayCellForIndex(HighlightCell *cell, int index)
|
|||||||
SwitchView *mySwitch = (SwitchView *)myCell->accessoryView();
|
SwitchView *mySwitch = (SwitchView *)myCell->accessoryView();
|
||||||
mySwitch->setState(!GlobalPreferences::sharedGlobalPreferences()->dfuUnlocked());
|
mySwitch->setState(!GlobalPreferences::sharedGlobalPreferences()->dfuUnlocked());
|
||||||
} else if (index == 1) {
|
} else if (index == 1) {
|
||||||
MessageTableCellWithChevronAndMessage *mcell = (MessageTableCellWithChevronAndMessage *)cell;
|
MessageTableCellWithChevronAndMessage *m_cell = (MessageTableCellWithChevronAndMessage *)cell;
|
||||||
int currentLevel = GlobalPreferences::sharedGlobalPreferences()->dfuLevel();
|
int currentLevel = GlobalPreferences::sharedGlobalPreferences()->dfuLevel();
|
||||||
if (currentLevel == 0) {
|
if (currentLevel == 0) {
|
||||||
mcell->setSubtitle(I18n::Message::USBDefaultLevelDesc);
|
m_cell->setSubtitle(I18n::Message::USBDefaultLevelDesc);
|
||||||
} else if (currentLevel == 1) {;
|
} else if (currentLevel == 1) {;
|
||||||
mcell->setSubtitle(I18n::Message::USBLowLevelDesc);
|
m_cell->setSubtitle(I18n::Message::USBLowLevelDesc);
|
||||||
} else {
|
} else {
|
||||||
assert(currentLevel == 2);
|
assert(currentLevel == 2);
|
||||||
mcell->setSubtitle(I18n::Message::USBParanoidLevelDesc);
|
m_cell->setSubtitle(I18n::Message::USBParanoidLevelDesc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,15 +115,15 @@ bool DoublePairStore::seriesNumberOfAbscissaeGreaterOrEqualTo(int series, int i)
|
|||||||
if (count >= i) {
|
if (count >= i) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
double currentAbsissa = m_data[series][0][j];
|
double currentAbscissa = m_data[series][0][j];
|
||||||
bool firstOccurence = true;
|
bool firstOccurrence = true;
|
||||||
for (int k = 0; k < j; k++) {
|
for (int k = 0; k < j; k++) {
|
||||||
if (m_data[series][0][k] == currentAbsissa) {
|
if (m_data[series][0][k] == currentAbscissa) {
|
||||||
firstOccurence = false;
|
firstOccurrence = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (firstOccurence) {
|
if (firstOccurrence) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ Ion::Storage::Record::ErrorStatus ExpressionModel::setExpressionContent(Ion::Sto
|
|||||||
// Set the data with the right size
|
// Set the data with the right size
|
||||||
newData.size = newDataSize;
|
newData.size = newDataSize;
|
||||||
error = record->setValue(newData);
|
error = record->setValue(newData);
|
||||||
// Any error would have occured at the first call to setValue
|
// Any error would have occurred at the first call to setValue
|
||||||
assert(error == Ion::Storage::Record::ErrorStatus::None);
|
assert(error == Ion::Storage::Record::ErrorStatus::None);
|
||||||
|
|
||||||
/* Here we delete only the elements relative to the expression model kept in
|
/* Here we delete only the elements relative to the expression model kept in
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ const Expression GlobalContext::ExpressionForSequence(const SymbolAbstract & sym
|
|||||||
} else if (!std::isnan(unknownSymbolValue)) {
|
} else if (!std::isnan(unknownSymbolValue)) {
|
||||||
/* If unknownSymbolValue is not nan, then we are in the graph app. In order
|
/* If unknownSymbolValue is not nan, then we are in the graph app. In order
|
||||||
* to allow functions like f(x) = u(x+0.5) to be ploted, we need to
|
* to allow functions like f(x) = u(x+0.5) to be ploted, we need to
|
||||||
* approximate the rank and check if it is an integer. Unfortunatly this
|
* approximate the rank and check if it is an integer. Unfortunately this
|
||||||
* leads to some edge cases were, because of quantification, we have
|
* leads to some edge cases were, because of quantification, we have
|
||||||
* floor(x) = x while x is not integer.*/
|
* floor(x) = x while x is not integer.*/
|
||||||
rankIsInteger = std::floor(rankValue) == rankValue;
|
rankIsInteger = std::floor(rankValue) == rankValue;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
m_sequenceStore(sequenceStore) {}
|
m_sequenceStore(sequenceStore) {}
|
||||||
/* expressionForSymbolAbstract & setExpressionForSymbolAbstractName directly call the parent
|
/* expressionForSymbolAbstract & setExpressionForSymbolAbstractName directly call the parent
|
||||||
* context respective methods. Indeed, special chars like n, u(n), u(n+1),
|
* context respective methods. Indeed, special chars like n, u(n), u(n+1),
|
||||||
* v(n), v(n+1) are taken into accound only when evaluating sequences which
|
* v(n), v(n+1) are taken into account only when evaluating sequences which
|
||||||
* is done in another context. */
|
* is done in another context. */
|
||||||
template<typename T> T valueOfCommonRankSequenceAtPreviousRank(int sequenceIndex, int rank) {
|
template<typename T> T valueOfCommonRankSequenceAtPreviousRank(int sequenceIndex, int rank) {
|
||||||
return static_cast<TemplatedSequenceContext<T>*>(helper<T>())->valueOfCommonRankSequenceAtPreviousRank(sequenceIndex, rank);
|
return static_cast<TemplatedSequenceContext<T>*>(helper<T>())->valueOfCommonRankSequenceAtPreviousRank(sequenceIndex, rank);
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ bool StoreController::privateFillColumnWithFormula(Expression formula, Expressio
|
|||||||
variables[0][0] = 0;
|
variables[0][0] = 0;
|
||||||
AppsContainer * appsContainer = AppsContainer::sharedAppsContainer();
|
AppsContainer * appsContainer = AppsContainer::sharedAppsContainer();
|
||||||
int nbOfVariables = formula.getVariables(appsContainer->globalContext(), isVariable, (char *)variables, k_maxSizeOfStoreSymbols);
|
int nbOfVariables = formula.getVariables(appsContainer->globalContext(), isVariable, (char *)variables, k_maxSizeOfStoreSymbols);
|
||||||
(void) nbOfVariables; // Remove compilation warning of nused variable
|
(void) nbOfVariables; // Remove compilation warning of unused variable
|
||||||
assert(nbOfVariables >= 0);
|
assert(nbOfVariables >= 0);
|
||||||
int numberOfValuesToCompute = -1;
|
int numberOfValuesToCompute = -1;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|||||||
@@ -232,12 +232,12 @@ void SumGraphController::LegendView::layoutSubviews(bool force) {
|
|||||||
|
|
||||||
void SumGraphController::LegendView::layoutSubviews(Step step, bool force) {
|
void SumGraphController::LegendView::layoutSubviews(Step step, bool force) {
|
||||||
KDCoordinate width = bounds().width();
|
KDCoordinate width = bounds().width();
|
||||||
KDCoordinate heigth = bounds().height();
|
KDCoordinate height = bounds().height();
|
||||||
KDSize legendSize = m_legend.minimalSizeForOptimalDisplay();
|
KDSize legendSize = m_legend.minimalSizeForOptimalDisplay();
|
||||||
|
|
||||||
if (legendSize.width() > 0) {
|
if (legendSize.width() > 0) {
|
||||||
m_sum.setFrame(KDRect(0, k_symbolHeightMargin, width-legendSize.width(), m_sum.minimalSizeForOptimalDisplay().height()), force);
|
m_sum.setFrame(KDRect(0, k_symbolHeightMargin, width-legendSize.width(), m_sum.minimalSizeForOptimalDisplay().height()), force);
|
||||||
m_legend.setFrame(KDRect(width-legendSize.width(), 0, legendSize.width(), heigth), force);
|
m_legend.setFrame(KDRect(width-legendSize.width(), 0, legendSize.width(), height), force);
|
||||||
} else {
|
} else {
|
||||||
m_sum.setFrame(bounds(), force);
|
m_sum.setFrame(bounds(), force);
|
||||||
m_legend.setFrame(KDRectZero, force);
|
m_legend.setFrame(KDRectZero, force);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Es gibt zu viele Unbekannte"
|
|||||||
NonLinearSystem = "Das System ist nicht linear"
|
NonLinearSystem = "Das System ist nicht linear"
|
||||||
Solution = "Lösung"
|
Solution = "Lösung"
|
||||||
ApproximateSolution = "Ungefähre Lösung"
|
ApproximateSolution = "Ungefähre Lösung"
|
||||||
SearchInverval = "Lösungssuche Intervall"
|
SearchInterval = "Lösungssuche Intervall"
|
||||||
NoSolutionSystem = "Das System hat keine Lösung"
|
NoSolutionSystem = "Das System hat keine Lösung"
|
||||||
NoSolutionEquation = "Die Gleichung hat keine Lösung"
|
NoSolutionEquation = "Die Gleichung hat keine Lösung"
|
||||||
NoSolutionInterval = "Keine Lösung im Intervall gefunden"
|
NoSolutionInterval = "Keine Lösung im Intervall gefunden"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "There are too many unknowns"
|
|||||||
NonLinearSystem = "The system is not linear"
|
NonLinearSystem = "The system is not linear"
|
||||||
Solution = "Solution"
|
Solution = "Solution"
|
||||||
ApproximateSolution = "Approximate solution"
|
ApproximateSolution = "Approximate solution"
|
||||||
SearchInverval = "Search interval"
|
SearchInterval = "Search interval"
|
||||||
NoSolutionSystem = "The system has no solution"
|
NoSolutionSystem = "The system has no solution"
|
||||||
NoSolutionEquation = "The equation has no solution"
|
NoSolutionEquation = "The equation has no solution"
|
||||||
NoSolutionInterval = "No solution found in the interval"
|
NoSolutionInterval = "No solution found in the interval"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Hay demasiadas incógnitas"
|
|||||||
NonLinearSystem = "El sistema no es lineal"
|
NonLinearSystem = "El sistema no es lineal"
|
||||||
Solution = "Solución"
|
Solution = "Solución"
|
||||||
ApproximateSolution = "Solución aproximada"
|
ApproximateSolution = "Solución aproximada"
|
||||||
SearchInverval = "Intervalo de búsqueda"
|
SearchInterval = "Intervalo de búsqueda"
|
||||||
NoSolutionSystem = "El sistema no tiene solución"
|
NoSolutionSystem = "El sistema no tiene solución"
|
||||||
NoSolutionEquation = "La ecuación no tiene solución"
|
NoSolutionEquation = "La ecuación no tiene solución"
|
||||||
NoSolutionInterval = "Ninguna solución encontrada en el intervalo"
|
NoSolutionInterval = "Ninguna solución encontrada en el intervalo"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Le nombre d'inconnues est trop grand"
|
|||||||
NonLinearSystem = "Le système n'est pas linéaire"
|
NonLinearSystem = "Le système n'est pas linéaire"
|
||||||
Solution = "Solution"
|
Solution = "Solution"
|
||||||
ApproximateSolution = "Solution approchée"
|
ApproximateSolution = "Solution approchée"
|
||||||
SearchInverval = "Intervalle de recherche"
|
SearchInterval = "Intervalle de recherche"
|
||||||
NoSolutionSystem = "Le système n'admet aucune solution"
|
NoSolutionSystem = "Le système n'admet aucune solution"
|
||||||
NoSolutionEquation = "L'équation n'admet aucune solution"
|
NoSolutionEquation = "L'équation n'admet aucune solution"
|
||||||
NoSolutionInterval = "Aucune solution trouvée dans cet intervalle"
|
NoSolutionInterval = "Aucune solution trouvée dans cet intervalle"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Túl sok ismeretlen van"
|
|||||||
NonLinearSystem = "A rendszer nem lineáris"
|
NonLinearSystem = "A rendszer nem lineáris"
|
||||||
Solution = "Megoldás"
|
Solution = "Megoldás"
|
||||||
ApproximateSolution = "Hozzávetöleges megoldás"
|
ApproximateSolution = "Hozzávetöleges megoldás"
|
||||||
SearchInverval = "Keresési intervallum"
|
SearchInterval = "Keresési intervallum"
|
||||||
NoSolutionSystem = "A rendszernek nincs megoldása"
|
NoSolutionSystem = "A rendszernek nincs megoldása"
|
||||||
NoSolutionEquation = "Az egyenletnek nincs megoldása"
|
NoSolutionEquation = "Az egyenletnek nincs megoldása"
|
||||||
NoSolutionInterval = "Nincs megoldás ebben az intervallumban"
|
NoSolutionInterval = "Nincs megoldás ebben az intervallumban"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Il numero di incognite è troppo elevato"
|
|||||||
NonLinearSystem = "Il sistema non è lineare"
|
NonLinearSystem = "Il sistema non è lineare"
|
||||||
Solution = "Soluzione"
|
Solution = "Soluzione"
|
||||||
ApproximateSolution = "Soluzione approssimata"
|
ApproximateSolution = "Soluzione approssimata"
|
||||||
SearchInverval = "Intervallo di ricerca"
|
SearchInterval = "Intervallo di ricerca"
|
||||||
NoSolutionSystem = "Il sistema non ammette nessuna soluzione"
|
NoSolutionSystem = "Il sistema non ammette nessuna soluzione"
|
||||||
NoSolutionEquation = "L'equazione non ammette nessuna soluzione"
|
NoSolutionEquation = "L'equazione non ammette nessuna soluzione"
|
||||||
NoSolutionInterval = "Nessuna soluzione trovata dentro questo intervallo"
|
NoSolutionInterval = "Nessuna soluzione trovata dentro questo intervallo"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Er zijn te veel onbekenden"
|
|||||||
NonLinearSystem = "Het stelsel is niet lineair"
|
NonLinearSystem = "Het stelsel is niet lineair"
|
||||||
Solution = "Oplossing"
|
Solution = "Oplossing"
|
||||||
ApproximateSolution = "Benaderde oplossing"
|
ApproximateSolution = "Benaderde oplossing"
|
||||||
SearchInverval = "Intervalbepaling"
|
SearchInterval = "Intervalbepaling"
|
||||||
NoSolutionSystem = "Het stelsel heeft geen oplossing"
|
NoSolutionSystem = "Het stelsel heeft geen oplossing"
|
||||||
NoSolutionEquation = "De vergelijking heeft geen oplossing"
|
NoSolutionEquation = "De vergelijking heeft geen oplossing"
|
||||||
NoSolutionInterval = "Geen oplossing gevonden binnen het interval"
|
NoSolutionInterval = "Geen oplossing gevonden binnen het interval"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ TooManyVariables = "Existem muitas incógnitas"
|
|||||||
NonLinearSystem = "O sistema não é linear"
|
NonLinearSystem = "O sistema não é linear"
|
||||||
Solution = "Solução"
|
Solution = "Solução"
|
||||||
ApproximateSolution = "Solução aproximada"
|
ApproximateSolution = "Solução aproximada"
|
||||||
SearchInverval = "Intervalo de pesquisa"
|
SearchInterval = "Intervalo de pesquisa"
|
||||||
NoSolutionSystem = "O sistema não tem solução"
|
NoSolutionSystem = "O sistema não tem solução"
|
||||||
NoSolutionEquation = "A equação não tem solução"
|
NoSolutionEquation = "A equação não tem solução"
|
||||||
NoSolutionInterval = "Nenhuma solução encontrada no intervalo"
|
NoSolutionInterval = "Nenhuma solução encontrada no intervalo"
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ EquationStore::Error EquationStore::exactSolve(Poincare::Context * context, bool
|
|||||||
* the exact answer is given to the user.
|
* the exact answer is given to the user.
|
||||||
* 3) If no classic form has been found in the developped form, we need to use
|
* 3) If no classic form has been found in the developped form, we need to use
|
||||||
* numerical approximation. Therefore, to prevent precision losses, we work
|
* numerical approximation. Therefore, to prevent precision losses, we work
|
||||||
* with the undevelopped form of the equation. Therefore we set reductionTarget
|
* with the undeveloped form of the equation. Therefore we set reductionTarget
|
||||||
* to SystemForApproximation. Solutions are then numericaly approximated
|
* to SystemForApproximation. Solutions are then numerically approximated
|
||||||
* between the bounds provided by the user. */
|
* between the bounds provided by the user. */
|
||||||
|
|
||||||
EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols) {
|
EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols) {
|
||||||
@@ -244,7 +244,7 @@ EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * contex
|
|||||||
if (degree == 2) {
|
if (degree == 2) {
|
||||||
// Polynomial degree <= 2
|
// Polynomial degree <= 2
|
||||||
m_type = Type::PolynomialMonovariable;
|
m_type = Type::PolynomialMonovariable;
|
||||||
error = oneDimensialPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context);
|
error = oneDimensionalPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context);
|
||||||
} else {
|
} else {
|
||||||
// Step 4. Monovariable non-polynomial or polynomial with degree > 2
|
// Step 4. Monovariable non-polynomial or polynomial with degree > 2
|
||||||
m_type = Type::Monovariable;
|
m_type = Type::Monovariable;
|
||||||
@@ -340,7 +340,7 @@ EquationStore::Error EquationStore::resolveLinearSystem(Expression exactSolution
|
|||||||
return Error::NoError;
|
return Error::NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
EquationStore::Error EquationStore::oneDimensialPolynomialSolve(Expression exactSolutions[k_maxNumberOfExactSolutions], Expression exactSolutionsApproximations[k_maxNumberOfExactSolutions], Expression coefficients[Expression::k_maxNumberOfPolynomialCoefficients], int degree, Context * context) {
|
EquationStore::Error EquationStore::oneDimensionalPolynomialSolve(Expression exactSolutions[k_maxNumberOfExactSolutions], Expression exactSolutionsApproximations[k_maxNumberOfExactSolutions], Expression coefficients[Expression::k_maxNumberOfPolynomialCoefficients], int degree, Context * context) {
|
||||||
/* Equation ax^2+bx+c = 0 */
|
/* Equation ax^2+bx+c = 0 */
|
||||||
assert(degree == 2);
|
assert(degree == 2);
|
||||||
// Compute delta = b*b-4ac
|
// Compute delta = b*b-4ac
|
||||||
@@ -441,13 +441,13 @@ void EquationStore::tidySolution() {
|
|||||||
|
|
||||||
Preferences::ComplexFormat EquationStore::updatedComplexFormat(Context * context) {
|
Preferences::ComplexFormat EquationStore::updatedComplexFormat(Context * context) {
|
||||||
Preferences::ComplexFormat complexFormat = Preferences::sharedPreferences()->complexFormat();
|
Preferences::ComplexFormat complexFormat = Preferences::sharedPreferences()->complexFormat();
|
||||||
if (complexFormat == Preferences::ComplexFormat::Real && isExplictlyComplex(context)) {
|
if (complexFormat == Preferences::ComplexFormat::Real && isExplicitlyComplex(context)) {
|
||||||
return Preferences::ComplexFormat::Cartesian;
|
return Preferences::ComplexFormat::Cartesian;
|
||||||
}
|
}
|
||||||
return complexFormat;
|
return complexFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EquationStore::isExplictlyComplex(Context * context) {
|
bool EquationStore::isExplicitlyComplex(Context * context) {
|
||||||
for (int i = 0; i < numberOfDefinedModels(); i++) {
|
for (int i = 0; i < numberOfDefinedModels(); i++) {
|
||||||
if (modelForRecord(definedRecordAtIndex(i))->containsIComplex(context)) {
|
if (modelForRecord(definedRecordAtIndex(i))->containsIComplex(context)) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -100,9 +100,9 @@ private:
|
|||||||
|
|
||||||
Error privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols);
|
Error privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols);
|
||||||
Error resolveLinearSystem(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression coefficients[k_maxNumberOfEquations][Poincare::Expression::k_maxNumberOfVariables], Poincare::Expression constants[k_maxNumberOfEquations], Poincare::Context * context);
|
Error resolveLinearSystem(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression coefficients[k_maxNumberOfEquations][Poincare::Expression::k_maxNumberOfVariables], Poincare::Expression constants[k_maxNumberOfEquations], Poincare::Context * context);
|
||||||
Error oneDimensialPolynomialSolve(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression polynomialCoefficients[Poincare::Expression::k_maxNumberOfPolynomialCoefficients], int degree, Poincare::Context * context);
|
Error oneDimensionalPolynomialSolve(Poincare::Expression solutions[k_maxNumberOfExactSolutions], Poincare::Expression solutionApproximations[k_maxNumberOfExactSolutions], Poincare::Expression polynomialCoefficients[Poincare::Expression::k_maxNumberOfPolynomialCoefficients], int degree, Poincare::Context * context);
|
||||||
void tidySolution();
|
void tidySolution();
|
||||||
bool isExplictlyComplex(Poincare::Context * context);
|
bool isExplicitlyComplex(Poincare::Context * context);
|
||||||
Poincare::Preferences::ComplexFormat updatedComplexFormat(Poincare::Context * context);
|
Poincare::Preferences::ComplexFormat updatedComplexFormat(Poincare::Context * context);
|
||||||
|
|
||||||
mutable Equation m_equations[k_maxNumberOfEquations];
|
mutable Equation m_equations[k_maxNumberOfEquations];
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ IntervalController::IntervalController(Responder * parentResponder, InputEventHa
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char * IntervalController::title() {
|
const char * IntervalController::title() {
|
||||||
return I18n::translate(I18n::Message::SearchInverval);
|
return I18n::translate(I18n::Message::SearchInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
int IntervalController::numberOfRows() const {
|
int IntervalController::numberOfRows() const {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ int SolutionsController::numberOfRows() const {
|
|||||||
void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
|
void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
|
||||||
const int rowOfUserVariablesMessage = userVariablesMessageRow();
|
const int rowOfUserVariablesMessage = userVariablesMessageRow();
|
||||||
if (j == rowOfUserVariablesMessage) {
|
if (j == rowOfUserVariablesMessage) {
|
||||||
// Predefined varaible used/ignored message
|
// Predefined variable used/ignored message
|
||||||
assert(i >= 0);
|
assert(i >= 0);
|
||||||
MessageCell * messageCell = static_cast<MessageCell *>(cell);
|
MessageCell * messageCell = static_cast<MessageCell *>(cell);
|
||||||
messageCell->setHorizontalAlignment(i == 0 ? 1.0f : 0.0f);
|
messageCell->setHorizontalAlignment(i == 0 ? 1.0f : 0.0f);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ View * TitleBarView::subviewAtIndex(int index) {
|
|||||||
void TitleBarView::layoutSubviews(bool force) {
|
void TitleBarView::layoutSubviews(bool force) {
|
||||||
/* We here cheat to layout the main title. The application title is written
|
/* We here cheat to layout the main title. The application title is written
|
||||||
* with upper cases. But, as upper letters are on the same baseline as lower
|
* with upper cases. But, as upper letters are on the same baseline as lower
|
||||||
* letters, they seem to be slightly above when they are perferctly centered
|
* letters, they seem to be slightly above when they are perfectly centered
|
||||||
* (because their glyph never cross the baseline). To avoid this effect, we
|
* (because their glyph never cross the baseline). To avoid this effect, we
|
||||||
* translate the frame of the title downwards.*/
|
* translate the frame of the title downwards.*/
|
||||||
m_titleView.setFrame(KDRect(0, 2, bounds().width(), bounds().height()-2), force);
|
m_titleView.setFrame(KDRect(0, 2, bounds().width(), bounds().height()-2), force);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hektopascal"
|
|||||||
UnitPressureAtm = "Atmosphere"
|
UnitPressureAtm = "Atmosphere"
|
||||||
UnitEnergyMenu = "Energie"
|
UnitEnergyMenu = "Energie"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Electronvolt"
|
UnitEnergyElectronVoltMenu = "Electronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
||||||
UnitEnergyElectronVolt = "Electronvolt"
|
UnitEnergyElectronVolt = "Electronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integral"
|
|||||||
Sum = "Summe"
|
Sum = "Summe"
|
||||||
Product = "Produkt"
|
Product = "Produkt"
|
||||||
ComplexAbsoluteValue = "Betrag"
|
ComplexAbsoluteValue = "Betrag"
|
||||||
Agument = "Argument"
|
Argument = "Argument"
|
||||||
RealPart = "Realteil"
|
RealPart = "Realteil"
|
||||||
ImaginaryPart = "Imaginärteil"
|
ImaginaryPart = "Imaginärteil"
|
||||||
Conjugate = "Konjugiert"
|
Conjugate = "Konjugiert"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosphere"
|
UnitPressureAtm = "Atmosphere"
|
||||||
UnitEnergyMenu = "Energy"
|
UnitEnergyMenu = "Energy"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Electronvolt"
|
UnitEnergyElectronVoltMenu = "Electronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
||||||
UnitEnergyElectronVolt = "Electronvolt"
|
UnitEnergyElectronVolt = "Electronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integral"
|
|||||||
Sum = "Sum"
|
Sum = "Sum"
|
||||||
Product = "Product"
|
Product = "Product"
|
||||||
ComplexAbsoluteValue = "Absolute value"
|
ComplexAbsoluteValue = "Absolute value"
|
||||||
Agument = "Argument"
|
Argument = "Argument"
|
||||||
RealPart = "Real part"
|
RealPart = "Real part"
|
||||||
ImaginaryPart = "Imaginary part"
|
ImaginaryPart = "Imaginary part"
|
||||||
Conjugate = "Conjugate"
|
Conjugate = "Conjugate"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosphere"
|
UnitPressureAtm = "Atmosphere"
|
||||||
UnitEnergyMenu = "Energy"
|
UnitEnergyMenu = "Energy"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Electronvolt"
|
UnitEnergyElectronVoltMenu = "Electronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
||||||
UnitEnergyElectronVolt = "Electronvolt"
|
UnitEnergyElectronVolt = "Electronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integral"
|
|||||||
Sum = "Suma"
|
Sum = "Suma"
|
||||||
Product = "Productorio"
|
Product = "Productorio"
|
||||||
ComplexAbsoluteValue = "Modulo"
|
ComplexAbsoluteValue = "Modulo"
|
||||||
Agument = "Argumento"
|
Argument = "Argumento"
|
||||||
RealPart = "Parte real"
|
RealPart = "Parte real"
|
||||||
ImaginaryPart = "Parte imaginaria"
|
ImaginaryPart = "Parte imaginaria"
|
||||||
Conjugate = "Conjugado"
|
Conjugate = "Conjugado"
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosphère"
|
UnitPressureAtm = "Atmosphère"
|
||||||
UnitEnergyMenu = "Énergie"
|
UnitEnergyMenu = "Énergie"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Électronvolt"
|
UnitEnergyElectronVoltMenu = "Électronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Mégaélectronvolt"
|
UnitEnergyElectronVoltMega = "Mégaélectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloélectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloélectronvolt"
|
||||||
UnitEnergyElectronVolt = "Électronvolt"
|
UnitEnergyElectronVolt = "Électronvolt"
|
||||||
@@ -120,7 +120,7 @@ Integral = "Intégrale de f sur [a;b]"
|
|||||||
Sum = "Somme"
|
Sum = "Somme"
|
||||||
Product = "Produit"
|
Product = "Produit"
|
||||||
ComplexAbsoluteValue = "Module"
|
ComplexAbsoluteValue = "Module"
|
||||||
Agument = "Argument"
|
Argument = "Argument"
|
||||||
RealPart = "Partie réelle"
|
RealPart = "Partie réelle"
|
||||||
ImaginaryPart = "Partie imaginaire"
|
ImaginaryPart = "Partie imaginaire"
|
||||||
Conjugate = "Conjugué"
|
Conjugate = "Conjugué"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Légkör"
|
UnitPressureAtm = "Légkör"
|
||||||
UnitEnergyMenu = "Energia"
|
UnitEnergyMenu = "Energia"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Electronvolt"
|
UnitEnergyElectronVoltMenu = "Electronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
||||||
UnitEnergyElectronVolt = "Electronvolt"
|
UnitEnergyElectronVolt = "Electronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integral"
|
|||||||
Sum = "Összeg"
|
Sum = "Összeg"
|
||||||
Product = "Termék"
|
Product = "Termék"
|
||||||
ComplexAbsoluteValue = "Abszolút érték"
|
ComplexAbsoluteValue = "Abszolút érték"
|
||||||
Agument = "érv"
|
Argument = "érv"
|
||||||
RealPart = "Igazi rész"
|
RealPart = "Igazi rész"
|
||||||
ImaginaryPart = "Képzeletbeli rész"
|
ImaginaryPart = "Képzeletbeli rész"
|
||||||
Conjugate = "Konjugátum"
|
Conjugate = "Konjugátum"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosfera"
|
UnitPressureAtm = "Atmosfera"
|
||||||
UnitEnergyMenu = "Energia"
|
UnitEnergyMenu = "Energia"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Electronvolt"
|
UnitEnergyElectronVoltMenu = "Electronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
UnitEnergyElectronVoltMega = "Megaelectronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
|
||||||
UnitEnergyElectronVolt = "Electronvolt"
|
UnitEnergyElectronVolt = "Electronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integrale"
|
|||||||
Sum = "Somma"
|
Sum = "Somma"
|
||||||
Product = "Prodotto"
|
Product = "Prodotto"
|
||||||
ComplexAbsoluteValue = "Modulo"
|
ComplexAbsoluteValue = "Modulo"
|
||||||
Agument = "Argomento"
|
Argument = "Argomento"
|
||||||
RealPart = "Parte reale"
|
RealPart = "Parte reale"
|
||||||
ImaginaryPart = "Parte immaginaria"
|
ImaginaryPart = "Parte immaginaria"
|
||||||
Conjugate = "Coniugato"
|
Conjugate = "Coniugato"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosfeer"
|
UnitPressureAtm = "Atmosfeer"
|
||||||
UnitEnergyMenu = "Energie"
|
UnitEnergyMenu = "Energie"
|
||||||
UnitEnergyJouleMilli = "Millijoule"
|
UnitEnergyJouleMilli = "Millijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Elektronvolt"
|
UnitEnergyElectronVoltMenu = "Elektronvolt"
|
||||||
UnitEnergyElectronVoltMega = "Megaelektronvolt"
|
UnitEnergyElectronVoltMega = "Megaelektronvolt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloelektronvolt"
|
UnitEnergyElectronVoltKilo = "Kiloelektronvolt"
|
||||||
UnitEnergyElectronVolt = "Elektronvolt"
|
UnitEnergyElectronVolt = "Elektronvolt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integraal"
|
|||||||
Sum = "Som"
|
Sum = "Som"
|
||||||
Product = "Product"
|
Product = "Product"
|
||||||
ComplexAbsoluteValue = "Absolute waarde"
|
ComplexAbsoluteValue = "Absolute waarde"
|
||||||
Agument = "Argument"
|
Argument = "Argument"
|
||||||
RealPart = "Reëel deel"
|
RealPart = "Reëel deel"
|
||||||
ImaginaryPart = "Imaginair deel"
|
ImaginaryPart = "Imaginair deel"
|
||||||
Conjugate = "Geconjugeerde"
|
Conjugate = "Geconjugeerde"
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
|
|||||||
UnitPressureAtm = "Atmosfera"
|
UnitPressureAtm = "Atmosfera"
|
||||||
UnitEnergyMenu = "Energia"
|
UnitEnergyMenu = "Energia"
|
||||||
UnitEnergyJouleMilli = "Milijoule"
|
UnitEnergyJouleMilli = "Milijoule"
|
||||||
UnitEnergyEletronVoltMenu = "Eletrão-volt"
|
UnitEnergyElectronVoltMenu = "Eletrão-volt"
|
||||||
UnitEnergyElectronVoltMega = "Megaeletrão-volt"
|
UnitEnergyElectronVoltMega = "Megaeletrão-volt"
|
||||||
UnitEnergyElectronVoltKilo = "Kiloeletrão-volt"
|
UnitEnergyElectronVoltKilo = "Kiloeletrão-volt"
|
||||||
UnitEnergyElectronVolt = "Eletrão-volt"
|
UnitEnergyElectronVolt = "Eletrão-volt"
|
||||||
@@ -116,7 +116,7 @@ Integral = "Integral"
|
|||||||
Sum = "Somatório"
|
Sum = "Somatório"
|
||||||
Product = "Produto"
|
Product = "Produto"
|
||||||
ComplexAbsoluteValue = "Módulo"
|
ComplexAbsoluteValue = "Módulo"
|
||||||
Agument = "Argumento"
|
Argument = "Argumento"
|
||||||
RealPart = "Parte real"
|
RealPart = "Parte real"
|
||||||
ImaginaryPart = "Parte imaginária"
|
ImaginaryPart = "Parte imaginária"
|
||||||
Conjugate = "Conjugado"
|
Conjugate = "Conjugado"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"""This module implements enough functionality to program the STM32F4xx over
|
"""This module implements enough functionality to program the STM32F4xx over
|
||||||
DFU, without requiring dfu-util.
|
DFU, without requiring dfu-util.
|
||||||
See app note AN3156 for a description of the DFU protocol.
|
See app note AN3156 for a description of the DFU protocol.
|
||||||
See document UM0391 for a dscription of the DFuse file.
|
See document UM0391 for a description of the DFuse file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ def parse_line(line):
|
|||||||
|
|
||||||
readelf_output = subprocess.check_output([
|
readelf_output = subprocess.check_output([
|
||||||
"arm-none-eabi-readelf",
|
"arm-none-eabi-readelf",
|
||||||
"-W", # Don't limit line lenght
|
"-W", # Don't limit line length
|
||||||
"-s", # Sizes
|
"-s", # Sizes
|
||||||
sys.argv[1]
|
sys.argv[1]
|
||||||
]).decode('utf-8')
|
]).decode('utf-8')
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ def methodtrace(logger):
|
|||||||
if not _enable_tracing:
|
if not _enable_tracing:
|
||||||
return f
|
return f
|
||||||
def do_trace(*args, **named_args):
|
def do_trace(*args, **named_args):
|
||||||
# this if is just a optimization to avoid unecessary string formatting
|
# this if is just a optimization to avoid unnecessary string formatting
|
||||||
if logging.DEBUG >= logger.getEffectiveLevel():
|
if logging.DEBUG >= logger.getEffectiveLevel():
|
||||||
fn = type(args[0]).__name__ + '.' + f.__name__
|
fn = type(args[0]).__name__ + '.' + f.__name__
|
||||||
_trace_function_call(logger, fn, *args[1:], **named_args)
|
_trace_function_call(logger, fn, *args[1:], **named_args)
|
||||||
@@ -70,7 +70,7 @@ def functiontrace(logger):
|
|||||||
if not _enable_tracing:
|
if not _enable_tracing:
|
||||||
return f
|
return f
|
||||||
def do_trace(*args, **named_args):
|
def do_trace(*args, **named_args):
|
||||||
# this if is just a optimization to avoid unecessary string formatting
|
# this if is just a optimization to avoid unnecessary string formatting
|
||||||
if logging.DEBUG >= logger.getEffectiveLevel():
|
if logging.DEBUG >= logger.getEffectiveLevel():
|
||||||
_trace_function_call(logger, f.__name__, *args, **named_args)
|
_trace_function_call(logger, f.__name__, *args, **named_args)
|
||||||
return f(*args, **named_args)
|
return f(*args, **named_args)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ This module exports:
|
|||||||
IBackend - backend interface.
|
IBackend - backend interface.
|
||||||
|
|
||||||
Backends are Python objects which implement the IBackend interface.
|
Backends are Python objects which implement the IBackend interface.
|
||||||
The easiest way to do so is inherinting from IBackend.
|
The easiest way to do so is inheriting from IBackend.
|
||||||
|
|
||||||
PyUSB already provides backends for libusb versions 0.1 and 1.0,
|
PyUSB already provides backends for libusb versions 0.1 and 1.0,
|
||||||
and OpenUSB library. Backends modules included with PyUSB are required to
|
and OpenUSB library. Backends modules included with PyUSB are required to
|
||||||
@@ -87,7 +87,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
|
|
||||||
IBackend is the basic interface for backend implementations. By default,
|
IBackend is the basic interface for backend implementations. By default,
|
||||||
the methods of the interface raise a NotImplementedError exception. A
|
the methods of the interface raise a NotImplementedError exception. A
|
||||||
backend implementation should replace the methods to provide the funcionality
|
backend implementation should replace the methods to provide the functionality
|
||||||
necessary.
|
necessary.
|
||||||
|
|
||||||
As Python is a dynamic typed language, you are not obligated to inherit from
|
As Python is a dynamic typed language, you are not obligated to inherit from
|
||||||
@@ -126,7 +126,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
r"""Return a configuration descriptor of the given device.
|
r"""Return a configuration descriptor of the given device.
|
||||||
|
|
||||||
The object returned is required to have all the Configuration Descriptor
|
The object returned is required to have all the Configuration Descriptor
|
||||||
fields acessible as member variables. They must be convertible (but
|
fields accessible as member variables. They must be convertible (but
|
||||||
not required to be equal) to the int type.
|
not required to be equal) to the int type.
|
||||||
|
|
||||||
The dev parameter is the device identification object.
|
The dev parameter is the device identification object.
|
||||||
@@ -156,7 +156,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
r"""Return an endpoint descriptor of the given device.
|
r"""Return an endpoint descriptor of the given device.
|
||||||
|
|
||||||
The object returned is required to have all the Endpoint Descriptor
|
The object returned is required to have all the Endpoint Descriptor
|
||||||
fields acessible as member variables. They must be convertible (but
|
fields accessible as member variables. They must be convertible (but
|
||||||
not required to be equal) to the int type.
|
not required to be equal) to the int type.
|
||||||
|
|
||||||
The ep parameter is the endpoint logical index (not the bEndpointAddress
|
The ep parameter is the endpoint logical index (not the bEndpointAddress
|
||||||
@@ -246,7 +246,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The data parameter
|
of the interface containing the endpoint. The data parameter
|
||||||
is the data to be sent. It must be an instance of the array.array
|
is the data to be sent. It must be an instance of the array.array
|
||||||
class. The timeout parameter specifies a time limit to the operation
|
class. The timeout parameter specifies a time limit to the operation
|
||||||
in miliseconds.
|
in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes written.
|
The method returns the number of bytes written.
|
||||||
"""
|
"""
|
||||||
@@ -261,7 +261,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The buff parameter
|
of the interface containing the endpoint. The buff parameter
|
||||||
is the buffer to receive the data read, the length of the buffer
|
is the buffer to receive the data read, the length of the buffer
|
||||||
tells how many bytes should be read. The timeout parameter
|
tells how many bytes should be read. The timeout parameter
|
||||||
specifies a time limit to the operation in miliseconds.
|
specifies a time limit to the operation in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes actually read.
|
The method returns the number of bytes actually read.
|
||||||
"""
|
"""
|
||||||
@@ -276,7 +276,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The data parameter
|
of the interface containing the endpoint. The data parameter
|
||||||
is the data to be sent. It must be an instance of the array.array
|
is the data to be sent. It must be an instance of the array.array
|
||||||
class. The timeout parameter specifies a time limit to the operation
|
class. The timeout parameter specifies a time limit to the operation
|
||||||
in miliseconds.
|
in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes written.
|
The method returns the number of bytes written.
|
||||||
"""
|
"""
|
||||||
@@ -291,7 +291,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The buff parameter
|
of the interface containing the endpoint. The buff parameter
|
||||||
is the buffer to receive the data read, the length of the buffer
|
is the buffer to receive the data read, the length of the buffer
|
||||||
tells how many bytes should be read. The timeout parameter
|
tells how many bytes should be read. The timeout parameter
|
||||||
specifies a time limit to the operation in miliseconds.
|
specifies a time limit to the operation in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes actually read.
|
The method returns the number of bytes actually read.
|
||||||
"""
|
"""
|
||||||
@@ -306,7 +306,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The data parameter
|
of the interface containing the endpoint. The data parameter
|
||||||
is the data to be sent. It must be an instance of the array.array
|
is the data to be sent. It must be an instance of the array.array
|
||||||
class. The timeout parameter specifies a time limit to the operation
|
class. The timeout parameter specifies a time limit to the operation
|
||||||
in miliseconds.
|
in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes written.
|
The method returns the number of bytes written.
|
||||||
"""
|
"""
|
||||||
@@ -321,7 +321,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
of the interface containing the endpoint. The buff parameter
|
of the interface containing the endpoint. The buff parameter
|
||||||
is buffer to receive the data read, the length of the buffer tells
|
is buffer to receive the data read, the length of the buffer tells
|
||||||
how many bytes should be read. The timeout parameter specifies
|
how many bytes should be read. The timeout parameter specifies
|
||||||
a time limit to the operation in miliseconds.
|
a time limit to the operation in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes actually read.
|
The method returns the number of bytes actually read.
|
||||||
"""
|
"""
|
||||||
@@ -347,7 +347,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
|
|||||||
IN requests it is the buffer to hold the data read. The number
|
IN requests it is the buffer to hold the data read. The number
|
||||||
of bytes requested to transmit or receive is equal to the length
|
of bytes requested to transmit or receive is equal to the length
|
||||||
of the array times the data.itemsize field. The timeout parameter
|
of the array times the data.itemsize field. The timeout parameter
|
||||||
specifies a time limit to the operation in miliseconds.
|
specifies a time limit to the operation in milliseconds.
|
||||||
|
|
||||||
Return the number of bytes written (for OUT transfers) or the data
|
Return the number of bytes written (for OUT transfers) or the data
|
||||||
read (for IN transfers), as an array.array object.
|
read (for IN transfers), as an array.array object.
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ def _setup_prototypes(lib):
|
|||||||
# void libusb_exit (struct libusb_context *ctx)
|
# void libusb_exit (struct libusb_context *ctx)
|
||||||
lib.libusb_exit.argtypes = [c_void_p]
|
lib.libusb_exit.argtypes = [c_void_p]
|
||||||
|
|
||||||
# ssize_t libusb_get_device_list (libusb_context *ctx,
|
# size_t libusb_get_device_list (libusb_context *ctx,
|
||||||
# libusb_device ***list)
|
# libusb_device ***list)
|
||||||
lib.libusb_get_device_list.argtypes = [
|
lib.libusb_get_device_list.argtypes = [
|
||||||
c_void_p,
|
c_void_p,
|
||||||
|
|||||||
@@ -735,7 +735,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
|
|||||||
value for most devices) and then writes some data to the endpoint 0x01.
|
value for most devices) and then writes some data to the endpoint 0x01.
|
||||||
|
|
||||||
Timeout values for the write, read and ctrl_transfer methods are specified
|
Timeout values for the write, read and ctrl_transfer methods are specified
|
||||||
in miliseconds. If the parameter is omitted, Device.default_timeout value
|
in milliseconds. If the parameter is omitted, Device.default_timeout value
|
||||||
will be used instead. This property can be set by the user at anytime.
|
will be used instead. This property can be set by the user at anytime.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -961,7 +961,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
|
|||||||
The data parameter should be a sequence like type convertible to
|
The data parameter should be a sequence like type convertible to
|
||||||
the array type (see array module).
|
the array type (see array module).
|
||||||
|
|
||||||
The timeout is specified in miliseconds.
|
The timeout is specified in milliseconds.
|
||||||
|
|
||||||
The method returns the number of bytes written.
|
The method returns the number of bytes written.
|
||||||
"""
|
"""
|
||||||
@@ -993,7 +993,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
|
|||||||
tells how many bytes you want to read or supplies the buffer to
|
tells how many bytes you want to read or supplies the buffer to
|
||||||
receive the data (it *must* be an object of the type array).
|
receive the data (it *must* be an object of the type array).
|
||||||
|
|
||||||
The timeout is specified in miliseconds.
|
The timeout is specified in milliseconds.
|
||||||
|
|
||||||
If the size_or_buffer parameter is the number of bytes to read, the
|
If the size_or_buffer parameter is the number of bytes to read, the
|
||||||
method returns an array object with the data read. If the
|
method returns an array object with the data read. If the
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
|
|||||||
# title of most generated pages and in a few other places.
|
# title of most generated pages and in a few other places.
|
||||||
# The default value is: My Project.
|
# The default value is: My Project.
|
||||||
|
|
||||||
PROJECT_NAME = Omega
|
PROJECT_NAME = Upsilon
|
||||||
|
|
||||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ endif
|
|||||||
|
|
||||||
DISPLAY_TARGET ?= "Undefined"
|
DISPLAY_TARGET ?= "Undefined"
|
||||||
|
|
||||||
PLS_IGNORE := $(shell >&2 printf "\e[32m Targetting $(DISPLAY_TARGET)\n")
|
PLS_IGNORE := $(shell >&2 printf "\e[32m Targeting $(DISPLAY_TARGET)\n")
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
DISPLAY_OS = Windows
|
DISPLAY_OS = Windows
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
HANDY_TARGETS += test.external_flash.write test.external_flash.read
|
HANDY_TARGETS += test.external_flash.write test.external_flash.read
|
||||||
|
|
||||||
$(BUILD_DIR)/test.external_flash.%.$(EXE): LDSCRIPT = ion/test/device/n0110/external_flash_tests.ld
|
$(BUILD_DIR)/test.external_flash.%.$(EXE): LDSCRIPT = ion/test/device/n0110/external_flash_tests.ld
|
||||||
test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(default_kandinsky_src) $(poincare_src) $(ion_device_dfu_relogated_src) $(runner_src)
|
test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(default_kandinsky_src) $(poincare_src) $(ion_device_dfu_relegated_src) $(runner_src)
|
||||||
$(BUILD_DIR)/test.external_flash.read.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_read_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_read_src))
|
$(BUILD_DIR)/test.external_flash.read.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_read_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_read_src))
|
||||||
$(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_write_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_write_src))
|
$(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_write_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_write_src))
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<path class="st4" d="M82.3 203h119.6v31.7H82.3z"/>
|
<path class="st4" d="M82.3 203h119.6v31.7H82.3z"/>
|
||||||
<path class="st1" d="M98.4 212.1h66.3v19.3H98.4z"/>
|
<path class="st1" d="M98.4 212.1h66.3v19.3H98.4z"/>
|
||||||
<text transform="translate(98.372 227.228)" class="st5 st6">
|
<text transform="translate(98.372 227.228)" class="st5 st6">
|
||||||
Esher
|
Escher
|
||||||
</text>
|
</text>
|
||||||
<image width="129" height="77" xlink:href="C75050B38B4C690A.png" transform="translate(80.824 316.754)" overflow="visible" opacity=".1"/>
|
<image width="129" height="77" xlink:href="C75050B38B4C690A.png" transform="translate(80.824 316.754)" overflow="visible" opacity=".1"/>
|
||||||
<path class="st0" d="M81 316.6h123v71.2H81z"/>
|
<path class="st0" d="M81 316.6h123v71.2H81z"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
12
docs/build/index.md
vendored
12
docs/build/index.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
title: Installing the SDK
|
title: Installing the SDK
|
||||||
breadcrumb: SDK
|
breadcrumb: SDK
|
||||||
---
|
---
|
||||||
# Build and run your own version of Epsilon
|
# Build and run your own version of Upsilon
|
||||||
|
|
||||||
## Install the SDK
|
## Install the SDK
|
||||||
|
|
||||||
@@ -46,13 +46,13 @@ apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
|
|||||||
|
|
||||||
## Retrieve the source code
|
## Retrieve the source code
|
||||||
|
|
||||||
The code is hosted on <a href="https://github.com/numworks/epsilon">GitHub</a>. You can retrieve it using the follwing command.
|
The code is hosted on <a href="https://github.com/Lauryy06/Upsilon">GitHub</a>. You can retrieve it using the following command.
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/numworks/epsilon.git
|
git clone https://github.com/Lauryy06/Upsilon.git
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run Epsilon on your computer
|
## Run Upsilon on your computer
|
||||||
|
|
||||||
Once the SDK has been installed, just open your terminal (Msys2, Terminal.app, xterm…) and type the following commands:
|
Once the SDK has been installed, just open your terminal (Msys2, Terminal.app, xterm…) and type the following commands:
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ make PLATFORM=simulator clean
|
|||||||
make PLATFORM=simulator epsilon_run
|
make PLATFORM=simulator epsilon_run
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run Epsilon on your calculator
|
## Run Upsilon on your calculator
|
||||||
|
|
||||||
You can also update your NumWorks calculator easily. Note that you'll need to press the Reset button and that all data on your calculator will be lost.
|
You can also update your NumWorks calculator easily. Note that you'll need to press the Reset button and that all data on your calculator will be lost.
|
||||||
|
|
||||||
@@ -71,4 +71,4 @@ make
|
|||||||
make epsilon_flash
|
make epsilon_flash
|
||||||
```
|
```
|
||||||
|
|
||||||
Congratulations, you're running your very own version of Epsilon!
|
Congratulations, you're running your very own version of Upsilon!
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ We're listing here all the topics you should be familiar with before being able
|
|||||||
The choice of a programming language is a controversial topic. Not all of them can be used to write an operating system, but quite a few can. We settled on C++ for several reasons:
|
The choice of a programming language is a controversial topic. Not all of them can be used to write an operating system, but quite a few can. We settled on C++ for several reasons:
|
||||||
|
|
||||||
- It is a [system](https://en.wikipedia.org/wiki/System_programming_language) programming language, which is something we need since we have to write some low-level code.
|
- It is a [system](https://en.wikipedia.org/wiki/System_programming_language) programming language, which is something we need since we have to write some low-level code.
|
||||||
- It has excellent tooling: several extremly high-quality compilers
|
- It has excellent tooling: several extremely high-quality compilers
|
||||||
- It is used for several high-profile projects LLVM, WebKit, MySQL, Photoshop… This ensures a strong ecosystem of tools, code and documentation.
|
- It is used for several high-profile projects LLVM, WebKit, MySQL, Photoshop… This ensures a strong ecosystem of tools, code and documentation.
|
||||||
- It easily allows Object-Oriented Programming, which is a convenient abstraction.
|
- It easily allows Object-Oriented Programming, which is a convenient abstraction.
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ If you want to contribute to Epsilon, you'll need to learn some C++.
|
|||||||
|
|
||||||
### Working with limited memory
|
### Working with limited memory
|
||||||
|
|
||||||
Our device has 256 KB of RAM. That's very little memory by today's standards. That being said, by writing code carefuly, a huge lot can be achieved in that space. After all, that's 64 times more memory than the computer of the Apollo mission!
|
Our device has 256 KB of RAM. That's very little memory by today's standards. That being said, by writing code carefully, a huge lot can be achieved in that space. After all, that's 64 times more memory than the computer of the Apollo mission!
|
||||||
|
|
||||||
#### Stack memory
|
#### Stack memory
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* The inliner creates a .h and a .cpp file in the same directory as the input
|
* The inliner creates a .h and a .cpp file in the same directory as the input
|
||||||
* file. The implementation file declares an Image in the ImageStore namespace,
|
* file. The implementation file declares an Image in the ImageStore namespace,
|
||||||
* and the header exposes a pointer to this variable. The Image embedds the
|
* and the header exposes a pointer to this variable. The Image embedded the
|
||||||
* bitmap data in the RGB565 format. */
|
* bitmap data in the RGB565 format. */
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ protected:
|
|||||||
class Position {
|
class Position {
|
||||||
/* column and line correspond to the visual column and line. The glyph at
|
/* column and line correspond to the visual column and line. The glyph at
|
||||||
* the kth column is not the the glyph of kth code point, because of
|
* the kth column is not the the glyph of kth code point, because of
|
||||||
* combining code points that do not fave a personnal glyph. */
|
* combining code points that do not fave a personal glyph. */
|
||||||
public:
|
public:
|
||||||
Position(int column, int line) : m_column(column), m_line(line) {}
|
Position(int column, int line) : m_column(column), m_line(line) {}
|
||||||
int column() const { return m_column; }
|
int column() const { return m_column; }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ extern "C" {
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ViewControllers are reponsible for
|
/* ViewControllers are responsible for
|
||||||
* - Building the view hierarchy
|
* - Building the view hierarchy
|
||||||
* - Handling user input
|
* - Handling user input
|
||||||
*
|
*
|
||||||
@@ -23,7 +23,7 @@ extern "C" {
|
|||||||
* - willExitResponderChain
|
* - willExitResponderChain
|
||||||
* - willResignFirstResponder
|
* - willResignFirstResponder
|
||||||
*
|
*
|
||||||
* Both methods are always called after setting a view and laying its subwiews
|
* Both methods are always called after setting a view and laying its subviews
|
||||||
* out.
|
* out.
|
||||||
*
|
*
|
||||||
* The method initView is called before setting a View (or often sets itself)
|
* The method initView is called before setting a View (or often sets itself)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ int ButtonRowController::ContentView::numberOfSubviews() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
View * ButtonRowController::ContentView::subviewAtIndex(int index) {
|
View * ButtonRowController::ContentView::subviewAtIndex(int index) {
|
||||||
/* Warning: the order of the subviews is important for drity tracking.
|
/* Warning: the order of the subviews is important for dirty tracking.
|
||||||
* Indeed, when a child is redrawn, the redrawn area is the smallest
|
* Indeed, when a child is redrawn, the redrawn area is the smallest
|
||||||
* rectangle unioniong the dirty rectangle and the previous redrawn area.
|
* rectangle unioniong the dirty rectangle and the previous redrawn area.
|
||||||
* As the main view is more likely to be bigger, we prefer to set it as the
|
* As the main view is more likely to be bigger, we prefer to set it as the
|
||||||
@@ -217,7 +217,7 @@ void ButtonRowController::initView() {
|
|||||||
|
|
||||||
void ButtonRowController::viewWillAppear() {
|
void ButtonRowController::viewWillAppear() {
|
||||||
/* We need to layout subviews at first appearance because the number of
|
/* We need to layout subviews at first appearance because the number of
|
||||||
* buttons might have changed between 2 appearences. */
|
* buttons might have changed between 2 appearances. */
|
||||||
m_contentView.layoutSubviews();
|
m_contentView.layoutSubviews();
|
||||||
m_contentView.mainViewController()->viewWillAppear();
|
m_contentView.mainViewController()->viewWillAppear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void IconView::drawRect(KDContext * ctx, KDRect rect) const {
|
|||||||
//Then we push the rectangular part of the image
|
//Then we push the rectangular part of the image
|
||||||
ctx->fillRectWithPixels(KDRect(0, 6, m_frame.width(), 44),pixelBuffer+(6*55), nullptr);
|
ctx->fillRectWithPixels(KDRect(0, 6, m_frame.width(), 44),pixelBuffer+(6*55), nullptr);
|
||||||
|
|
||||||
//Finaly we push the last 5 lines of the image so that they are truncated on the sides
|
//Finally we push the last 5 lines of the image so that they are truncated on the sides
|
||||||
ctx->fillRectWithPixels(KDRect(1, 50, m_frame.width()-2, 1),pixelBuffer+1+(50*55), nullptr);
|
ctx->fillRectWithPixels(KDRect(1, 50, m_frame.width()-2, 1),pixelBuffer+1+(50*55), nullptr);
|
||||||
ctx->fillRectWithPixels(KDRect(1, 51, m_frame.width()-2, 1),pixelBuffer+1+(51*55), nullptr);
|
ctx->fillRectWithPixels(KDRect(1, 51, m_frame.width()-2, 1),pixelBuffer+1+(51*55), nullptr);
|
||||||
ctx->fillRectWithPixels(KDRect(2, 52, m_frame.width()-4, 1),pixelBuffer+2+(52*55), nullptr);
|
ctx->fillRectWithPixels(KDRect(2, 52, m_frame.width()-4, 1),pixelBuffer+2+(52*55), nullptr);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ bool SelectableTableView::selectCellAtLocation(int i, int j, bool setFirstRespon
|
|||||||
* ExpressionModelListController needs to update its memoized cell before
|
* ExpressionModelListController needs to update its memoized cell before
|
||||||
* being able to scroll;
|
* being able to scroll;
|
||||||
* - after scrolling: for instance, the calculation history table might
|
* - after scrolling: for instance, the calculation history table might
|
||||||
* change its cell content when selected (outup toggling, ellipsis toggling)
|
* change its cell content when selected (output toggling, ellipsis toggling)
|
||||||
* and thus need to access the right used cell - which is defined only
|
* and thus need to access the right used cell - which is defined only
|
||||||
* after scrolling.
|
* after scrolling.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ bool TextField::ContentView::removePreviousGlyph() {
|
|||||||
assert(m_isEditing);
|
assert(m_isEditing);
|
||||||
|
|
||||||
if (m_horizontalAlignment > 0.0f) {
|
if (m_horizontalAlignment > 0.0f) {
|
||||||
/* Reload the view. If we do it later, the text beins supposedly shorter, we
|
/* Reload the view. If we do it later, the text beings supposedly shorter, we
|
||||||
* will not clean the first char. */
|
* will not clean the first char. */
|
||||||
reloadRectFromPosition(s_draftTextBuffer);
|
reloadRectFromPosition(s_draftTextBuffer);
|
||||||
}
|
}
|
||||||
@@ -290,7 +290,7 @@ bool TextField::privateHandleEvent(Ion::Events::Event event) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (isEditing() && shouldFinishEditing(event)) {
|
if (isEditing() && shouldFinishEditing(event)) {
|
||||||
/* If textFieldDidFinishEditing displays a pop-up (because of an unvalid
|
/* If textFieldDidFinishEditing displays a pop-up (because of an invalid
|
||||||
* text for instance), the text field will call willResignFirstResponder.
|
* text for instance), the text field will call willResignFirstResponder.
|
||||||
* This will call textFieldDidAbortEditing if the textfield is still editing,
|
* This will call textFieldDidAbortEditing if the textfield is still editing,
|
||||||
* which we do not want, as we are not really aborting edition, just
|
* which we do not want, as we are not really aborting edition, just
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ include ion/src/$(PLATFORM)/Makefile
|
|||||||
include ion/src/shared/tools/Makefile
|
include ion/src/shared/tools/Makefile
|
||||||
|
|
||||||
# We need to work around a GCC bug (concerning versions < 5.1). It is valid in
|
# We need to work around a GCC bug (concerning versions < 5.1). It is valid in
|
||||||
# C++11 to initialize a character array by providing a string litteral (e.g.
|
# C++11 to initialize a character array by providing a string literal (e.g.
|
||||||
# char test[4]= "ab"; is valid and should initialize test to 'a','b',0,0).
|
# char test[4]= "ab"; is valid and should initialize test to 'a','b',0,0).
|
||||||
# Older versions of GCC are not conformant so we resort to an initializer list.
|
# Older versions of GCC are not conformant so we resort to an initializer list.
|
||||||
initializer_list = $(shell echo $(1) | sed "s/\(.\)/'\1',/g")0
|
initializer_list = $(shell echo $(1) | sed "s/\(.\)/'\1',/g")0
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Timing {
|
|||||||
void usleep(uint32_t us);
|
void usleep(uint32_t us);
|
||||||
void msleep(uint32_t ms);
|
void msleep(uint32_t ms);
|
||||||
|
|
||||||
/* millis is the number of milliseconds ellapsed since a random epoch.
|
/* millis is the number of milliseconds elapsed since a random epoch.
|
||||||
* On the device, epoch is the boot time. */
|
* On the device, epoch is the boot time. */
|
||||||
uint64_t millis();
|
uint64_t millis();
|
||||||
|
|
||||||
|
|||||||
@@ -19,17 +19,17 @@ private:
|
|||||||
bool m_removeParenthesesExtention;
|
bool m_removeParenthesesExtention;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Returns the number of occurences of a code point in a string
|
// Returns the number of occurrences of a code point in a string
|
||||||
int CountOccurrences(const char * s, CodePoint c);
|
int CountOccurrences(const char * s, CodePoint c);
|
||||||
|
|
||||||
/* Returns the first occurence of a code point in a string, the position of the
|
/* Returns the first occurrence of a code point in a string, the position of the
|
||||||
* null terminating char otherwise. */
|
* null terminating char otherwise. */
|
||||||
const char * CodePointSearch(const char * s, CodePoint c, const char * stoppingPosition = nullptr);
|
const char * CodePointSearch(const char * s, CodePoint c, const char * stoppingPosition = nullptr);
|
||||||
|
|
||||||
// Returns true if the text had the code point
|
// Returns true if the text had the code point
|
||||||
bool HasCodePoint(const char * s, CodePoint c, const char * stoppingPosition = nullptr);
|
bool HasCodePoint(const char * s, CodePoint c, const char * stoppingPosition = nullptr);
|
||||||
|
|
||||||
/* Returns the first occurence of a code point that is not c in a string,
|
/* Returns the first occurrence of a code point that is not c in a string,
|
||||||
* stopping at the null-terminating char or the start of string. */
|
* stopping at the null-terminating char or the start of string. */
|
||||||
const char * NotCodePointSearch(const char * s, CodePoint c, bool goingLeft = false, const char * initialPosition = nullptr);
|
const char * NotCodePointSearch(const char * s, CodePoint c, bool goingLeft = false, const char * initialPosition = nullptr);
|
||||||
|
|
||||||
@@ -41,9 +41,9 @@ bool CopyAndRemoveCodePoints(char * dst, size_t dstSize, const char * src, CodeP
|
|||||||
* points where removed before it. Ensure null-termination of dst. */
|
* points where removed before it. Ensure null-termination of dst. */
|
||||||
void RemoveCodePoint(char * buffer, CodePoint c, const char * * indexToUpdate = nullptr, const char * stoppingPosition = nullptr);
|
void RemoveCodePoint(char * buffer, CodePoint c, const char * * indexToUpdate = nullptr, const char * stoppingPosition = nullptr);
|
||||||
|
|
||||||
/* Slides a string by a number of chars. If slidingSize < 0, the string is slided
|
/* Slides a string by a number of chars. If slidingSize < 0, the string is slid
|
||||||
* to the left losing the first chars. Returns true if successful.
|
* to the left losing the first chars. Returns true if successful.
|
||||||
* Exemples :
|
* Examples :
|
||||||
* SlideStringByNumberOfChar("12345", 2, 7) gives "1212345"
|
* SlideStringByNumberOfChar("12345", 2, 7) gives "1212345"
|
||||||
* SlideStringByNumberOfChar("12345", 2, 5) gives "12123"
|
* SlideStringByNumberOfChar("12345", 2, 5) gives "12123"
|
||||||
* SlideStringByNumberOfChar("12345", -2, 5) gives "34545"*/
|
* SlideStringByNumberOfChar("12345", -2, 5) gives "34545"*/
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ SECTIONS {
|
|||||||
/* The data section is written to Flash but linked as if it were in RAM.
|
/* The data section is written to Flash but linked as if it were in RAM.
|
||||||
*
|
*
|
||||||
* This is required because its initial value matters (so it has to be in
|
* This is required because its initial value matters (so it has to be in
|
||||||
* persistant memory in the first place), but it is a R/W area of memory
|
* persistent memory in the first place), but it is a R/W area of memory
|
||||||
* so it will have to live in RAM upon execution (in linker lingo, that
|
* so it will have to live in RAM upon execution (in linker lingo, that
|
||||||
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ void initMPU() {
|
|||||||
/* This is needed for interfacing with the LCD
|
/* This is needed for interfacing with the LCD
|
||||||
* We define the whole FMC memory bank 1 as strongly ordered, non-executable
|
* We define the whole FMC memory bank 1 as strongly ordered, non-executable
|
||||||
* and not accessible. We define the FMC command and data addresses as
|
* and not accessible. We define the FMC command and data addresses as
|
||||||
* writeable non-cachable, non-buffereable and non shareable. */
|
* writeable non-cacheable, non-buffereable and non shareable. */
|
||||||
int sector = 0;
|
int sector = 0;
|
||||||
MPU.RNR()->setREGION(sector++);
|
MPU.RNR()->setREGION(sector++);
|
||||||
MPU.RBAR()->setADDR(0x60000000);
|
MPU.RBAR()->setADDR(0x60000000);
|
||||||
@@ -84,7 +84,7 @@ void initMPU() {
|
|||||||
* then an AHB error is given (AN4760). To prevent this to happen, we
|
* then an AHB error is given (AN4760). To prevent this to happen, we
|
||||||
* configure the MPU to define the whole Quad-SPI addressable space as
|
* configure the MPU to define the whole Quad-SPI addressable space as
|
||||||
* strongly ordered, non-executable and not accessible. Plus, we define the
|
* strongly ordered, non-executable and not accessible. Plus, we define the
|
||||||
* Quad-SPI region corresponding to the Expternal Chip as executable and
|
* Quad-SPI region corresponding to the External Chip as executable and
|
||||||
* fully accessible (AN4861). */
|
* fully accessible (AN4861). */
|
||||||
MPU.RNR()->setREGION(sector++);
|
MPU.RNR()->setREGION(sector++);
|
||||||
MPU.RBAR()->setADDR(0x90000000);
|
MPU.RBAR()->setADDR(0x90000000);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ constexpr static double modulationDepth = 0.25; // Must be (0.25% <= md <= 2%)
|
|||||||
constexpr static uint32_t SSCG_INCSTEP = (32767*modulationDepth*PLL_N)/(1.0*100*5*SSCG_MODPER);
|
constexpr static uint32_t SSCG_INCSTEP = (32767*modulationDepth*PLL_N)/(1.0*100*5*SSCG_MODPER);
|
||||||
static_assert(SSCG_MODPER == 250, "SSCG_MODPER changed");
|
static_assert(SSCG_MODPER == 250, "SSCG_MODPER changed");
|
||||||
static_assert(SSCG_INCSTEP == 25, "SSCG_INCSTEP changed");
|
static_assert(SSCG_INCSTEP == 25, "SSCG_INCSTEP changed");
|
||||||
static_assert(SSCG_INCSTEP * SSCG_MODPER < 32767, "Wrong values for the Spread spectrun clock generator");
|
static_assert(SSCG_INCSTEP * SSCG_MODPER < 32767, "Wrong values for the Spread spectrum clock generator");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ SECTIONS {
|
|||||||
*(.text._ZN3Ion6Device9Backlight*)
|
*(.text._ZN3Ion6Device9Backlight*)
|
||||||
*(.text._ZN3Ion9Backlight*)
|
*(.text._ZN3Ion9Backlight*)
|
||||||
|
|
||||||
/* Rodata Truc Relou */
|
|
||||||
*(.text._ZNK10Statistics5Store6medianEi)
|
*(.text._ZNK10Statistics5Store6medianEi)
|
||||||
*(.text._ZNK10Regression5Store12meanOfColumnEiib)
|
*(.text._ZNK10Regression5Store12meanOfColumnEiib)
|
||||||
*(.text._ZNK6Shared15DoublePairStore11sumOfColumnEiib)
|
*(.text._ZNK6Shared15DoublePairStore11sumOfColumnEiib)
|
||||||
@@ -322,7 +321,7 @@ SECTIONS {
|
|||||||
/* The data section is written to Flash but linked as if it were in RAM.
|
/* The data section is written to Flash but linked as if it were in RAM.
|
||||||
*
|
*
|
||||||
* This is required because its initial value matters (so it has to be in
|
* This is required because its initial value matters (so it has to be in
|
||||||
* persistant memory in the first place), but it is a R/W area of memory
|
* persistent memory in the first place), but it is a R/W area of memory
|
||||||
* so it will have to live in RAM upon execution (in linker lingo, that
|
* so it will have to live in RAM upon execution (in linker lingo, that
|
||||||
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ SECTIONS {
|
|||||||
/* The data section is written to Flash but linked as if it were in RAM.
|
/* The data section is written to Flash but linked as if it were in RAM.
|
||||||
*
|
*
|
||||||
* This is required because its initial value matters (so it has to be in
|
* This is required because its initial value matters (so it has to be in
|
||||||
* persistant memory in the first place), but it is a R/W area of memory
|
* persistent memory in the first place), but it is a R/W area of memory
|
||||||
* so it will have to live in RAM upon execution (in linker lingo, that
|
* so it will have to live in RAM upon execution (in linker lingo, that
|
||||||
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
* translates to the data section having a LMA in Flash and a VMA in RAM).
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
/* To measure the battery voltage, we're using the internal ADC. The ADC works
|
/* To measure the battery voltage, we're using the internal ADC. The ADC works
|
||||||
* by comparing the input voltage to a reference voltage. The only fixed voltage
|
* by comparing the input voltage to a reference voltage. The only fixed voltage
|
||||||
* we have around is 2.8V, so that's the one we're using as a refrence. However,
|
* we have around is 2.8V, so that's the one we're using as a reference. However,
|
||||||
* and ADC can only measure voltage that is lower than the reference voltage. So
|
* and ADC can only measure voltage that is lower than the reference voltage. So
|
||||||
* we need to use a voltage divider before sampling Vbat.
|
* we need to use a voltage divider before sampling Vbat.
|
||||||
* To avoid draining the battery, we're using an high-impedence voltage divider,
|
* To avoid draining the battery, we're using a high-impedance voltage divider,
|
||||||
* so we need to be careful when sampling the ADC. See AN2834 for more info. */
|
* so we need to be careful when sampling the ADC. See AN2834 for more info. */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ bool waitForVBlank() {
|
|||||||
uint64_t startTime = Timing::millis();
|
uint64_t startTime = Timing::millis();
|
||||||
uint64_t timeout = startTime + timeoutDelta;
|
uint64_t timeout = startTime + timeoutDelta;
|
||||||
|
|
||||||
/* If current time is big enough, currentTime + timeout wraps aroud the
|
/* If current time is big enough, currentTime + timeout wraps around the
|
||||||
* uint64_t. We need to take this into account when computing the terminating
|
* uint64_t. We need to take this into account when computing the terminating
|
||||||
* event.
|
* event.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -51,28 +51,28 @@ size_t numberOfBitsAfterLeadingZeroes(int i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t * SignificantExamModeAddress() {
|
uint8_t * SignificantExamModeAddress() {
|
||||||
uint32_t * persitence_start_32 = (uint32_t *)&_exam_mode_buffer_start;
|
uint32_t * persistence_start_32 = (uint32_t *)&_exam_mode_buffer_start;
|
||||||
uint32_t * persitence_end_32 = (uint32_t *)&_exam_mode_buffer_end;
|
uint32_t * persistence_end_32 = (uint32_t *)&_exam_mode_buffer_end;
|
||||||
assert((persitence_end_32 - persitence_start_32) % 4 == 0);
|
assert((persistence_end_32 - persistence_start_32) % 4 == 0);
|
||||||
while (persitence_start_32 < persitence_end_32 && *persitence_start_32 == 0x0) {
|
while (persistence_start_32 < persistence_end_32 && *persistence_start_32 == 0x0) {
|
||||||
// Scan by groups of 32 bits to reach first non-zero bit
|
// Scan by groups of 32 bits to reach first non-zero bit
|
||||||
persitence_start_32++;
|
persistence_start_32++;
|
||||||
}
|
}
|
||||||
uint8_t * persitence_start_8 = (uint8_t *)persitence_start_32;
|
uint8_t * persistence_start_8 = (uint8_t *)persistence_start_32;
|
||||||
uint8_t * persitence_end_8 = (uint8_t *)persitence_end_32;
|
uint8_t * persistence_end_8 = (uint8_t *)persistence_end_32;
|
||||||
while (persitence_start_8 < persitence_end_8 && *persitence_start_8 == 0x0) {
|
while (persistence_start_8 < persistence_end_8 && *persistence_start_8 == 0x0) {
|
||||||
// Scan by groups of 8 bits to reach first non-zero bit
|
// Scan by groups of 8 bits to reach first non-zero bit
|
||||||
persitence_start_8++;
|
persistence_start_8++;
|
||||||
}
|
}
|
||||||
if (persitence_start_8 == persitence_end_8
|
if (persistence_start_8 == persistence_end_8
|
||||||
// we can't toggle from 0[3] to 2[3] when there is only one 1 bit in the whole sector
|
// we can't toggle from 0[3] to 2[3] when there is only one 1 bit in the whole sector
|
||||||
|| (persitence_start_8 + 1 == persitence_end_8 && *persitence_start_8 == 1)) {
|
|| (persistence_start_8 + 1 == persistence_end_8 && *persistence_start_8 == 1)) {
|
||||||
assert(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start) >= 0);
|
assert(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start) >= 0);
|
||||||
Ion::Device::Flash::EraseSector(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start));
|
Ion::Device::Flash::EraseSector(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start));
|
||||||
return (uint8_t *)&_exam_mode_buffer_start;
|
return (uint8_t *)&_exam_mode_buffer_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
return persitence_start_8;
|
return persistence_start_8;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t FetchExamMode() {
|
uint8_t FetchExamMode() {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void jump(uint32_t jumpIsrVectorAddress) {
|
|||||||
// Disable cache before reset
|
// Disable cache before reset
|
||||||
Ion::Device::Cache::disable();
|
Ion::Device::Cache::disable();
|
||||||
|
|
||||||
/* Shutdown all clocks and periherals to mimic a hardware reset. */
|
/* Shutdown all clocks and peripherals to mimic a hardware reset. */
|
||||||
Board::shutdownPeripherals();
|
Board::shutdownPeripherals();
|
||||||
internalFlashJump(jumpIsrVectorAddress);
|
internalFlashJump(jumpIsrVectorAddress);
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Device {
|
|||||||
namespace WakeUp {
|
namespace WakeUp {
|
||||||
|
|
||||||
/* All wakeup functions can be called together without overwriting the same
|
/* All wakeup functions can be called together without overwriting the same
|
||||||
* register. All togethed, they will set SYSCFG and EXTi registers as follow:
|
* register. All together, they will set SYSCFG and EXTi registers as follow:
|
||||||
*
|
*
|
||||||
* GPIO Pin Number|EXTI_EMR|EXTI_FTSR|EXTI_RTSR|EXTICR1|EXTICR2|EXTICR3| Wake up
|
* GPIO Pin Number|EXTI_EMR|EXTI_FTSR|EXTI_RTSR|EXTICR1|EXTICR2|EXTICR3| Wake up
|
||||||
* ---------------+--------+---------+---------+-------+-------+-------+-------------------------
|
* ---------------+--------+---------+---------+-------+-------+-------+-------------------------
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class CCMR : Register64 {
|
class CCMR : Register64 {
|
||||||
/* We're declaring CCMR as a 64 bits register. CCMR doesn't exsist per se,
|
/* We're declaring CCMR as a 64 bits register. CCMR doesn't exist per se,
|
||||||
* it is in fact the consolidation of CCMR1 and CCMR2. Both are 16 bits
|
* it is in fact the consolidation of CCMR1 and CCMR2. Both are 16 bits
|
||||||
* registers, so one could expect the consolidation to be 32 bits. However,
|
* registers, so one could expect the consolidation to be 32 bits. However,
|
||||||
* both CCMR1 and CCMR2 live on 32-bits boundaries, so the consolidation has
|
* both CCMR1 and CCMR2 live on 32-bits boundaries, so the consolidation has
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ private:
|
|||||||
ExtendedCompatIDDescriptor m_extendedCompatIdDescriptor;
|
ExtendedCompatIDDescriptor m_extendedCompatIdDescriptor;
|
||||||
|
|
||||||
Descriptor * m_descriptors[8];
|
Descriptor * m_descriptors[8];
|
||||||
/* m_descriptors contains only descriptors that sould be returned via the
|
/* m_descriptors contains only descriptors that should be returned via the
|
||||||
* method descriptor(uint8_t type, uint8_t index), so do not count descriptors
|
* method descriptor(uint8_t type, uint8_t index), so do not count descriptors
|
||||||
* included in other descriptors or returned by other functions. */
|
* included in other descriptors or returned by other functions. */
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* DFU transfers can serve two purposes:
|
/* DFU transfers can serve two purposes:
|
||||||
* - Transfering RAM data between the machine and the host, e.g. Python scripts
|
* - Transferring RAM data between the machine and the host, e.g. Python scripts
|
||||||
* - Upgrading the flash memory to perform a software update
|
* - Upgrading the flash memory to perform a software update
|
||||||
*
|
*
|
||||||
* The second case raises a huge issue: code cannot be executed from memory that
|
* The second case raises a huge issue: code cannot be executed from memory that
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ private:
|
|||||||
Unlock = 11
|
Unlock = 11
|
||||||
};
|
};
|
||||||
|
|
||||||
// DFU Download Commmand Codes
|
// DFU Download Command Codes
|
||||||
enum class DFUDownloadCommand {
|
enum class DFUDownloadCommand {
|
||||||
GetCommand = 0x00,
|
GetCommand = 0x00,
|
||||||
SetAddressPointer = 0x21,
|
SetAddressPointer = 0x21,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user