Fix spelling (#128)

* Fix spelling in .cpp files

* Fix spelling in all files
This commit is contained in:
Yaya-Cout
2022-01-20 17:21:35 +01:00
committed by GitHub
parent e575ffc7ce
commit 169fb7404e
215 changed files with 424 additions and 425 deletions

View File

@@ -105,7 +105,7 @@ print-%:
@echo $*\'s origin is $(origin $*)
# 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).
# 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).

View File

@@ -19,7 +19,7 @@ Upsilon is a fork of Omega, an user-made OS that runs on the Numworks calculator
### Some new features
- Enhancements for the Kandinsky python module
- Support for wallpapers
- Exernal apps
- External apps
- A custom theme
- Operator overload for python
- Improvements for the Periodic table application
@@ -154,18 +154,18 @@ You need a windows version >= 1903.
```powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux all /norestart
```
This command activate WSL functionnalities.
This command activate WSL functionalities.
```powershell
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.
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
wsl --set-default-version 2
```
@@ -174,7 +174,7 @@ wsl --set-default-version 2
WSL is now installed.
### 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
1. In a WSL Ubuntu command prompt, type:
```bash
@@ -188,7 +188,7 @@ sudo visudo
`Defaults secure_path="/usr/lib/linux-tools/5.4.0-77-generic:/usr/local/sbin:..."`
#### 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
sudo apt install usbip hwdata usbutils
```
@@ -244,7 +244,7 @@ Now, run either:
```bash
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>
@@ -253,7 +253,7 @@ or:
```bash
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>
@@ -271,7 +271,7 @@ Now, run either:
```bash
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>
@@ -280,7 +280,7 @@ or:
```bash
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>

View File

@@ -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)))
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 update\n\n")
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
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)
i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N)))

View File

@@ -47,7 +47,7 @@ AppsContainer::AppsContainer() :
* poincareCircuitBreaker is run. This means either whitelisting all Epsilon
* (which makes bigger files to download and slower execution), or
* 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.
* 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
* (in App::willBecomeInactive for instance), we tidy them early on. */
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
* 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

View File

@@ -9,7 +9,7 @@ BacklightDimmingTimer::BacklightDimmingTimer() :
bool BacklightDimmingTimer::fire() {
if (m_dimerExecutions == 0) {
m_brightnessLevel = GlobalPreferences::sharedGlobalPreferences()->brightnessLevel();
m_dimerSteps = m_brightnessLevel / decreaseby;
m_dimerSteps = m_brightnessLevel / decreaseBy;
m_timeToSleep = decreasetime / m_dimerSteps;
m_period = m_timeToSleep / Timer::TickDuration;
if (m_period == 0) {

View File

@@ -10,7 +10,7 @@ public:
private:
constexpr static int k_idleBeforeDimmingDuration = 30*1000; // In miliseconds
constexpr static int k_dimBacklightBrightness = 0;
constexpr static int decreaseby = 15;
constexpr static int decreaseBy = 15;
constexpr static int decreasetime = 1*1000; // In miliseconds
int m_dimerExecutions = 0;
int m_brightnessLevel;

View File

@@ -25,7 +25,7 @@ CalculationStore::CalculationStore(char * buffer, int size) :
// Returns an expiring pointer to the calculation of index i
ExpiringPointer<Calculation> CalculationStore::calculationAtIndex(int i) {
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;
if (i != m_numberOfCalculations-1) {
// 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();
}
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
* 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();
if (!pushSerializeExpression(undef, beginingOfFreeSpace, &endOfFreeSpace)) {
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
* Equal expression appears. */
Expression e = mostRecentCalculation->exactOutput();
bool exactOuptutInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal;
if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOuptutInvolvesStoreEqual) {
bool exactOutputInvolvesStoreEqual = e.type() == ExpressionNode::Type::Store || e.type() == ExpressionNode::Type::Equal;
if (mostRecentCalculation->input().recursivelyMatches(Expression::IsApproximate, context) || exactOutputInvolvesStoreEqual) {
return mostRecentCalculation->approximateOutput(context, Calculation::NumberOfSignificantDigits::Maximal);
}
return mostRecentCalculation->exactOutput();

View File

@@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location"
PythonTurtleReset = "Reset the drawing"
PythonTurtleRight = "Turn right by a degrees"
PythonTurtleSetheading = "Set the orientation to a degrees"
PythonTurtleSetposition = "Positionne la tortue"
PythonTurtleSetposition = "Positioning the turtle"
PythonTurtleShowturtle = "Show the turtle"
PythonTurtleSpeed = "Drawing speed between 0 and 10"
PythonTurtleWrite = "Display a text"

View File

@@ -169,7 +169,7 @@ PythonTurtlePosition = "Return the current (x,y) location"
PythonTurtleReset = "Reset the drawing"
PythonTurtleRight = "Turn right by a degrees"
PythonTurtleSetheading = "Set the orientation to a degrees"
PythonTurtleSetposition = "Positionne la tortue"
PythonTurtleSetposition = "Colocar la tortuga"
PythonTurtleShowturtle = "Show the turtle"
PythonTurtleSpeed = "Drawing speed between 0 and 10"
PythonTurtleWrite = "Display a text"

View File

@@ -169,7 +169,7 @@ PythonTurtlePosition = "Devolve a posição atual (x,y)"
PythonTurtleReset = "Reiniciar o desenho"
PythonTurtleRight = "Virar à esquerda por a graus"
PythonTurtleSetheading = "Definir a orientação por a graus"
PythonTurtleSetposition = "Positionne la tortue"
PythonTurtleSetposition = "Posicionamento da tartaruga"
PythonTurtleShowturtle = "Mostrar o turtle"
PythonTurtleSpeed = "Velocidade do desenho entre 0 e 10"
PythonTurtleWrite = "Mostrar um texto"

View File

@@ -40,7 +40,7 @@ void assert_variables_are(const char * script, const char * nameToComplete, cons
&addParentheses,
i,
&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);
index++;
}

View File

@@ -516,7 +516,7 @@ void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, in
assert(sizeof(builtinNames) / sizeof(builtinNames[0]) == k_totalBuiltinNodesCount);
for (int i = 0; i < k_totalBuiltinNodesCount; i++) {
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. */
return;
}
@@ -575,7 +575,7 @@ void VariableBoxController::loadImportedVariablesInScript(const char * scriptCon
}
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
* 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
* will not have main structures of the wanted type.
* 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);
for (size_t i = 0; i < n; 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;
}
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
Script importedScript = ScriptStore::ScriptBaseNamed(sourceName);
if (importedScript.isNull()) {
return false;
}
*scriptFullName = importedScript.fullName();
if (retreivedScript != nullptr) {
*retreivedScript = importedScript;
if (retrievedScript != nullptr) {
*retrievedScript = importedScript;
}
return true;
}

View File

@@ -92,7 +92,7 @@ private:
bool addNodesFromImportMaybe(mp_parse_node_struct_t * parseNode, const char * textToAutocomplete, int textToAutocompleteLength, bool importFromModules = true);
const char * importationSourceNameFromNode(mp_parse_node_t & node);
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);
/* 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

View File

@@ -343,7 +343,7 @@ EvenOddBufferTextCell * ValuesController::floatCells(int j) {
/* 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.
* - type == 1: "[["
* - 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
char buffer[bufferSize];
int currentChar = 0;
currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, -1);
currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, -1);
assert(currentChar < bufferSize-1);
size_t semiColonPosition = UTF8Helper::CopyUntilCodePoint(buffer+currentChar, TextField::maxBufferSize() - currentChar, text+1, ';');
currentChar += semiColonPosition;
currentChar += writeMatrixBrakets(buffer + currentChar, bufferSize - currentChar, 0);
currentChar += writeMatrixBrackets(buffer + currentChar, bufferSize - currentChar, 0);
assert(currentChar < bufferSize-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);
buffer[currentChar] = 0;
Clipboard::sharedClipboard()->store(buffer);

View File

@@ -12,7 +12,7 @@ i18n_files += $(call i18n_without_universal_for,home/base)
# 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
SFLAGS += -I$(BUILD_DIR)

View File

@@ -1,4 +1,4 @@
Apps = "Anwendungen"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Diese Anwendung ist im"
ForbidenAppInExamMode2 = "Prüfungsmodus nicht erlaubt."
ForbiddenAppInExamMode1 = "Diese Anwendung ist im"
ForbiddenAppInExamMode2 = "Prüfungsmodus nicht erlaubt."

View File

@@ -1,4 +1,4 @@
Apps = "Applications"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "This application is"
ForbidenAppInExamMode2 = "forbidden in exam mode"
ForbiddenAppInExamMode1 = "This application is"
ForbiddenAppInExamMode2 = "forbidden in exam mode"

View File

@@ -1,4 +1,4 @@
Apps = "Aplicaciones"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Esta aplicación está prohibida"
ForbidenAppInExamMode2 = "en el modo de examen"
ForbiddenAppInExamMode1 = "Esta aplicación está prohibida"
ForbiddenAppInExamMode2 = "en el modo de examen"

View File

@@ -1,4 +1,4 @@
Apps = "Applications"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Cette application n'est"
ForbidenAppInExamMode2 = "pas autorisée en mode examen."
ForbiddenAppInExamMode1 = "Cette application n'est"
ForbiddenAppInExamMode2 = "pas autorisée en mode examen."

View File

@@ -1,4 +1,4 @@
Apps = "Alkalmazások"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Ez az alkalmazás"
ForbidenAppInExamMode2 = "tilos vizsga módban"
ForbiddenAppInExamMode1 = "Ez az alkalmazás"
ForbiddenAppInExamMode2 = "tilos vizsga módban"

View File

@@ -1,4 +1,4 @@
Apps = "Applicazioni"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Questa applicazione è"
ForbidenAppInExamMode2 = "proibita nella modalità d'esame"
ForbiddenAppInExamMode1 = "Questa applicazione è"
ForbiddenAppInExamMode2 = "proibita nella modalità d'esame"

View File

@@ -1,4 +1,4 @@
Apps = "Applicaties"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Deze applicatie is"
ForbidenAppInExamMode2 = "uitgesloten in examenstand"
ForbiddenAppInExamMode1 = "Deze applicatie is"
ForbiddenAppInExamMode2 = "uitgesloten in examenstand"

View File

@@ -1,4 +1,4 @@
Apps = "Aplicações"
AppsCapital = "UPSILON"
ForbidenAppInExamMode1 = "Esta aplicação é"
ForbidenAppInExamMode2 = "proibida no Modo de Exame"
ForbiddenAppInExamMode1 = "Esta aplicação é"
ForbiddenAppInExamMode2 = "proibida no Modo de Exame"

View File

@@ -94,7 +94,7 @@ bool Controller::handleEvent(Ion::Events::Event event) {
#ifdef HOME_DISPLAY_EXTERNALS
if (index >= container->numberOfApps()) {
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 {
External::Archive::File executable;
if (External::Archive::executableAtIndex(index - container->numberOfApps(), executable)) {
@@ -120,7 +120,7 @@ bool Controller::handleEvent(Ion::Events::Event event) {
#endif
::App::Snapshot * selectedSnapshot = container->appSnapshotAtIndex(index);
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 {
bool switched = container->switchTo(selectedSnapshot);
assert(switched);

View File

@@ -30,7 +30,7 @@ const ToolboxMessageTree calculChildren[] = {
const ToolboxMessageTree complexChildren[] = {
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::ImCommandWithArg, I18n::Message::ImaginaryPart),
ToolboxMessageTree::Leaf(I18n::Message::ConjCommandWithArg, I18n::Message::Conjugate)
@@ -252,7 +252,7 @@ const ToolboxMessageTree unitEnergyElectronVoltChildren[] = {
};
const ToolboxMessageTree unitEnergyChildren[] = {
ToolboxMessageTree::Node(I18n::Message::UnitEnergyJouleMenu, unitEnergyJouleChildren),
ToolboxMessageTree::Node(I18n::Message::UnitEnergyEletronVoltMenu, unitEnergyElectronVoltChildren)};
ToolboxMessageTree::Node(I18n::Message::UnitEnergyElectronVoltMenu, unitEnergyElectronVoltChildren)};
const ToolboxMessageTree unitPowerWattChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::UnitPowerWattMicroSymbol, I18n::Message::UnitPowerWattMicro),

View File

@@ -183,7 +183,7 @@ void CalculationController::willDisplayCellAtLocation(HighlightCell * cell, int
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
constexpr int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(precision);
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);
field->setText(buffer);
}

View File

@@ -134,7 +134,7 @@ double Distribution::cumulativeDistributiveInverseForProbabilityUsingIncreasingF
* 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)) {
/* 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. */
return *probability > 0.5 ? INFINITY : -INFINITY;
}

View File

@@ -33,7 +33,7 @@ double StudentDistribution::cumulativeDistributiveFunctionAtAbscissa(double x) c
if (std::isinf(x)) {
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.01 and P(x < 8400000) (for 41000000 it is around 0.6) */
const double k = m_parameter1;

View File

@@ -27,7 +27,7 @@ namespace Reader {
// List of available Function Commands that don't require a specific handling
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",
"ker", "lg", "lim", "liminf", "limsup", "ln", "log", "max",
"min", "Pr", "sec", "sin", "sinh", "sup", "tan", "tanh"

View File

@@ -67,7 +67,7 @@ bool GoToParameterController::confirmParameterAtIndex(int parameterIndex, double
} else {
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,
* 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)) {
Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue);
return false;

View File

@@ -45,7 +45,7 @@ protected:
Poincare::Layout m_layout;
private:
// 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;
// Levenberg-Marquardt

View File

@@ -190,7 +190,7 @@ QUIZ_CASE(power_regression) {
// 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
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};
@@ -214,7 +214,7 @@ QUIZ_CASE(trigonometric_regression1) {
int numberOfPoints = sizeof(x) / sizeof(double);
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) {
@@ -225,7 +225,7 @@ QUIZ_CASE(trigonometric_regression2) {
int numberOfPoints = sizeof(x) / sizeof(double);
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);
}

View File

@@ -17,7 +17,7 @@ TypeParameterController::TypeParameterController(Responder * parentResponder, Li
ViewController(parentResponder),
m_explicitCell(&m_selectableTableView, I18n::Message::Explicit, 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_selectableTableView(this),
m_record(),
@@ -100,7 +100,7 @@ int TypeParameterController::numberOfRows() const {
HighlightCell * TypeParameterController::reusableCell(int index) {
assert(index >= 0);
assert(index < k_totalNumberOfCell);
HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurenceCell};
HighlightCell * cells[] = {&m_explicitCell, &m_singleRecurrenceCell, &m_doubleRecurrenceCell};
return cells[index];
}

View File

@@ -36,7 +36,7 @@ private:
constexpr static int k_totalNumberOfCell = 3;
ExpressionTableCellWithPointer m_explicitCell;
ExpressionTableCellWithPointer m_singleRecurrenceCell;
ExpressionTableCellWithPointer m_doubleRecurenceCell;
ExpressionTableCellWithPointer m_doubleRecurrenceCell;
Poincare::Layout m_layouts[k_totalNumberOfCell];
SelectableTableView m_selectableTableView;
Ion::Storage::Record m_record;

View File

@@ -47,7 +47,7 @@ void check_sequences_defined_by(double result[MaxNumberOfSequences][10], Sequenc
}
}
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,
* we need to make sure that the pool is empty between quiz_cases. */
store->tidy();

View File

@@ -5,7 +5,7 @@ namespace Settings {
void AboutController::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 ----------------------
I18n::Message cautionMessages[] = {I18n::Message::AboutWarning1, I18n::Message::AboutWarning2, I18n::Message::AboutWarning3, I18n::Message::AboutWarning4};
// m_view.setMessages(cautionMessages, sizeof(cautionMessages)/sizeof(I18n::Message));

View File

@@ -63,15 +63,15 @@ void UsbInfoController::willDisplayCellForIndex(HighlightCell *cell, int index)
SwitchView *mySwitch = (SwitchView *)myCell->accessoryView();
mySwitch->setState(!GlobalPreferences::sharedGlobalPreferences()->dfuUnlocked());
} else if (index == 1) {
MessageTableCellWithChevronAndMessage *mcell = (MessageTableCellWithChevronAndMessage *)cell;
MessageTableCellWithChevronAndMessage *m_cell = (MessageTableCellWithChevronAndMessage *)cell;
int currentLevel = GlobalPreferences::sharedGlobalPreferences()->dfuLevel();
if (currentLevel == 0) {
mcell->setSubtitle(I18n::Message::USBDefaultLevelDesc);
m_cell->setSubtitle(I18n::Message::USBDefaultLevelDesc);
} else if (currentLevel == 1) {;
mcell->setSubtitle(I18n::Message::USBLowLevelDesc);
m_cell->setSubtitle(I18n::Message::USBLowLevelDesc);
} else {
assert(currentLevel == 2);
mcell->setSubtitle(I18n::Message::USBParanoidLevelDesc);
m_cell->setSubtitle(I18n::Message::USBParanoidLevelDesc);
}
}
}

View File

@@ -115,15 +115,15 @@ bool DoublePairStore::seriesNumberOfAbscissaeGreaterOrEqualTo(int series, int i)
if (count >= i) {
return true;
}
double currentAbsissa = m_data[series][0][j];
bool firstOccurence = true;
double currentAbscissa = m_data[series][0][j];
bool firstOccurrence = true;
for (int k = 0; k < j; k++) {
if (m_data[series][0][k] == currentAbsissa) {
firstOccurence = false;
if (m_data[series][0][k] == currentAbscissa) {
firstOccurrence = false;
break;
}
}
if (firstOccurence) {
if (firstOccurrence) {
count++;
}
}

View File

@@ -143,7 +143,7 @@ Ion::Storage::Record::ErrorStatus ExpressionModel::setExpressionContent(Ion::Sto
// Set the data with the right size
newData.size = newDataSize;
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);
/* Here we delete only the elements relative to the expression model kept in

View File

@@ -134,7 +134,7 @@ const Expression GlobalContext::ExpressionForSequence(const SymbolAbstract & sym
} else if (!std::isnan(unknownSymbolValue)) {
/* 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
* 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
* floor(x) = x while x is not integer.*/
rankIsInteger = std::floor(rankValue) == rankValue;

View File

@@ -62,7 +62,7 @@ public:
m_sequenceStore(sequenceStore) {}
/* expressionForSymbolAbstract & setExpressionForSymbolAbstractName directly call the parent
* 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. */
template<typename T> T valueOfCommonRankSequenceAtPreviousRank(int sequenceIndex, int rank) {
return static_cast<TemplatedSequenceContext<T>*>(helper<T>())->valueOfCommonRankSequenceAtPreviousRank(sequenceIndex, rank);

View File

@@ -232,7 +232,7 @@ bool StoreController::privateFillColumnWithFormula(Expression formula, Expressio
variables[0][0] = 0;
AppsContainer * appsContainer = AppsContainer::sharedAppsContainer();
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);
int numberOfValuesToCompute = -1;
int index = 0;

View File

@@ -232,12 +232,12 @@ void SumGraphController::LegendView::layoutSubviews(bool force) {
void SumGraphController::LegendView::layoutSubviews(Step step, bool force) {
KDCoordinate width = bounds().width();
KDCoordinate heigth = bounds().height();
KDCoordinate height = bounds().height();
KDSize legendSize = m_legend.minimalSizeForOptimalDisplay();
if (legendSize.width() > 0) {
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 {
m_sum.setFrame(bounds(), force);
m_legend.setFrame(KDRectZero, force);

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Es gibt zu viele Unbekannte"
NonLinearSystem = "Das System ist nicht linear"
Solution = "Lösung"
ApproximateSolution = "Ungefähre Lösung"
SearchInverval = "Lösungssuche Intervall"
SearchInterval = "Lösungssuche Intervall"
NoSolutionSystem = "Das System hat keine Lösung"
NoSolutionEquation = "Die Gleichung hat keine Lösung"
NoSolutionInterval = "Keine Lösung im Intervall gefunden"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "There are too many unknowns"
NonLinearSystem = "The system is not linear"
Solution = "Solution"
ApproximateSolution = "Approximate solution"
SearchInverval = "Search interval"
SearchInterval = "Search interval"
NoSolutionSystem = "The system has no solution"
NoSolutionEquation = "The equation has no solution"
NoSolutionInterval = "No solution found in the interval"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Hay demasiadas incógnitas"
NonLinearSystem = "El sistema no es lineal"
Solution = "Solución"
ApproximateSolution = "Solución aproximada"
SearchInverval = "Intervalo de búsqueda"
SearchInterval = "Intervalo de búsqueda"
NoSolutionSystem = "El sistema no tiene solución"
NoSolutionEquation = "La ecuación no tiene solución"
NoSolutionInterval = "Ninguna solución encontrada en el intervalo"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Le nombre d'inconnues est trop grand"
NonLinearSystem = "Le système n'est pas linéaire"
Solution = "Solution"
ApproximateSolution = "Solution approchée"
SearchInverval = "Intervalle de recherche"
SearchInterval = "Intervalle de recherche"
NoSolutionSystem = "Le système n'admet aucune solution"
NoSolutionEquation = "L'équation n'admet aucune solution"
NoSolutionInterval = "Aucune solution trouvée dans cet intervalle"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Túl sok ismeretlen van"
NonLinearSystem = "A rendszer nem lineáris"
Solution = "Megoldás"
ApproximateSolution = "Hozzávetöleges megoldás"
SearchInverval = "Keresési intervallum"
SearchInterval = "Keresési intervallum"
NoSolutionSystem = "A rendszernek nincs megoldása"
NoSolutionEquation = "Az egyenletnek nincs megoldása"
NoSolutionInterval = "Nincs megoldás ebben az intervallumban"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Il numero di incognite è troppo elevato"
NonLinearSystem = "Il sistema non è lineare"
Solution = "Soluzione"
ApproximateSolution = "Soluzione approssimata"
SearchInverval = "Intervallo di ricerca"
SearchInterval = "Intervallo di ricerca"
NoSolutionSystem = "Il sistema non ammette nessuna soluzione"
NoSolutionEquation = "L'equazione non ammette nessuna soluzione"
NoSolutionInterval = "Nessuna soluzione trovata dentro questo intervallo"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Er zijn te veel onbekenden"
NonLinearSystem = "Het stelsel is niet lineair"
Solution = "Oplossing"
ApproximateSolution = "Benaderde oplossing"
SearchInverval = "Intervalbepaling"
SearchInterval = "Intervalbepaling"
NoSolutionSystem = "Het stelsel heeft geen oplossing"
NoSolutionEquation = "De vergelijking heeft geen oplossing"
NoSolutionInterval = "Geen oplossing gevonden binnen het interval"

View File

@@ -11,7 +11,7 @@ TooManyVariables = "Existem muitas incógnitas"
NonLinearSystem = "O sistema não é linear"
Solution = "Solução"
ApproximateSolution = "Solução aproximada"
SearchInverval = "Intervalo de pesquisa"
SearchInterval = "Intervalo de pesquisa"
NoSolutionSystem = "O sistema não tem solução"
NoSolutionEquation = "A equação não tem solução"
NoSolutionInterval = "Nenhuma solução encontrada no intervalo"

View File

@@ -136,8 +136,8 @@ EquationStore::Error EquationStore::exactSolve(Poincare::Context * context, bool
* the exact answer is given to the user.
* 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
* with the undevelopped form of the equation. Therefore we set reductionTarget
* to SystemForApproximation. Solutions are then numericaly approximated
* with the undeveloped form of the equation. Therefore we set reductionTarget
* to SystemForApproximation. Solutions are then numerically approximated
* between the bounds provided by the user. */
EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * context, bool replaceFunctionsButNotSymbols) {
@@ -244,7 +244,7 @@ EquationStore::Error EquationStore::privateExactSolve(Poincare::Context * contex
if (degree == 2) {
// Polynomial degree <= 2
m_type = Type::PolynomialMonovariable;
error = oneDimensialPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context);
error = oneDimensionalPolynomialSolve(exactSolutions, exactSolutionsApproximations, polynomialCoefficients, degree, context);
} else {
// Step 4. Monovariable non-polynomial or polynomial with degree > 2
m_type = Type::Monovariable;
@@ -340,7 +340,7 @@ EquationStore::Error EquationStore::resolveLinearSystem(Expression exactSolution
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 */
assert(degree == 2);
// Compute delta = b*b-4ac
@@ -441,13 +441,13 @@ void EquationStore::tidySolution() {
Preferences::ComplexFormat EquationStore::updatedComplexFormat(Context * context) {
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 complexFormat;
}
bool EquationStore::isExplictlyComplex(Context * context) {
bool EquationStore::isExplicitlyComplex(Context * context) {
for (int i = 0; i < numberOfDefinedModels(); i++) {
if (modelForRecord(definedRecordAtIndex(i))->containsIComplex(context)) {
return true;

View File

@@ -100,9 +100,9 @@ private:
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 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();
bool isExplictlyComplex(Poincare::Context * context);
bool isExplicitlyComplex(Poincare::Context * context);
Poincare::Preferences::ComplexFormat updatedComplexFormat(Poincare::Context * context);
mutable Equation m_equations[k_maxNumberOfEquations];

View File

@@ -57,7 +57,7 @@ IntervalController::IntervalController(Responder * parentResponder, InputEventHa
}
const char * IntervalController::title() {
return I18n::translate(I18n::Message::SearchInverval);
return I18n::translate(I18n::Message::SearchInterval);
}
int IntervalController::numberOfRows() const {

View File

@@ -168,7 +168,7 @@ int SolutionsController::numberOfRows() const {
void SolutionsController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
const int rowOfUserVariablesMessage = userVariablesMessageRow();
if (j == rowOfUserVariablesMessage) {
// Predefined varaible used/ignored message
// Predefined variable used/ignored message
assert(i >= 0);
MessageCell * messageCell = static_cast<MessageCell *>(cell);
messageCell->setHorizontalAlignment(i == 0 ? 1.0f : 0.0f);

View File

@@ -102,7 +102,7 @@ View * TitleBarView::subviewAtIndex(int index) {
void TitleBarView::layoutSubviews(bool force) {
/* 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
* 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
* translate the frame of the title downwards.*/
m_titleView.setFrame(KDRect(0, 2, bounds().width(), bounds().height()-2), force);

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hektopascal"
UnitPressureAtm = "Atmosphere"
UnitEnergyMenu = "Energie"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMega = "Megaelectronvolt"
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
UnitEnergyElectronVolt = "Electronvolt"
@@ -116,7 +116,7 @@ Integral = "Integral"
Sum = "Summe"
Product = "Produkt"
ComplexAbsoluteValue = "Betrag"
Agument = "Argument"
Argument = "Argument"
RealPart = "Realteil"
ImaginaryPart = "Imaginärteil"
Conjugate = "Konjugiert"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosphere"
UnitEnergyMenu = "Energy"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMega = "Megaelectronvolt"
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
UnitEnergyElectronVolt = "Electronvolt"
@@ -116,7 +116,7 @@ Integral = "Integral"
Sum = "Sum"
Product = "Product"
ComplexAbsoluteValue = "Absolute value"
Agument = "Argument"
Argument = "Argument"
RealPart = "Real part"
ImaginaryPart = "Imaginary part"
Conjugate = "Conjugate"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosphere"
UnitEnergyMenu = "Energy"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMega = "Megaelectronvolt"
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
UnitEnergyElectronVolt = "Electronvolt"
@@ -116,7 +116,7 @@ Integral = "Integral"
Sum = "Suma"
Product = "Productorio"
ComplexAbsoluteValue = "Modulo"
Agument = "Argumento"
Argument = "Argumento"
RealPart = "Parte real"
ImaginaryPart = "Parte imaginaria"
Conjugate = "Conjugado"

View File

@@ -62,7 +62,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosphère"
UnitEnergyMenu = "Énergie"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Électronvolt"
UnitEnergyElectronVoltMenu = "Électronvolt"
UnitEnergyElectronVoltMega = "Mégaélectronvolt"
UnitEnergyElectronVoltKilo = "Kiloélectronvolt"
UnitEnergyElectronVolt = "Électronvolt"
@@ -120,7 +120,7 @@ Integral = "Intégrale de f sur [a;b]"
Sum = "Somme"
Product = "Produit"
ComplexAbsoluteValue = "Module"
Agument = "Argument"
Argument = "Argument"
RealPart = "Partie réelle"
ImaginaryPart = "Partie imaginaire"
Conjugate = "Conjugué"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Légkör"
UnitEnergyMenu = "Energia"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMega = "Megaelectronvolt"
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
UnitEnergyElectronVolt = "Electronvolt"
@@ -116,7 +116,7 @@ Integral = "Integral"
Sum = "Összeg"
Product = "Termék"
ComplexAbsoluteValue = "Abszolút érték"
Agument = "érv"
Argument = "érv"
RealPart = "Igazi rész"
ImaginaryPart = "Képzeletbeli rész"
Conjugate = "Konjugátum"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosfera"
UnitEnergyMenu = "Energia"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMenu = "Electronvolt"
UnitEnergyElectronVoltMega = "Megaelectronvolt"
UnitEnergyElectronVoltKilo = "Kiloelectronvolt"
UnitEnergyElectronVolt = "Electronvolt"
@@ -116,7 +116,7 @@ Integral = "Integrale"
Sum = "Somma"
Product = "Prodotto"
ComplexAbsoluteValue = "Modulo"
Agument = "Argomento"
Argument = "Argomento"
RealPart = "Parte reale"
ImaginaryPart = "Parte immaginaria"
Conjugate = "Coniugato"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosfeer"
UnitEnergyMenu = "Energie"
UnitEnergyJouleMilli = "Millijoule"
UnitEnergyEletronVoltMenu = "Elektronvolt"
UnitEnergyElectronVoltMenu = "Elektronvolt"
UnitEnergyElectronVoltMega = "Megaelektronvolt"
UnitEnergyElectronVoltKilo = "Kiloelektronvolt"
UnitEnergyElectronVolt = "Elektronvolt"
@@ -116,7 +116,7 @@ Integral = "Integraal"
Sum = "Som"
Product = "Product"
ComplexAbsoluteValue = "Absolute waarde"
Agument = "Argument"
Argument = "Argument"
RealPart = "Reëel deel"
ImaginaryPart = "Imaginair deel"
Conjugate = "Geconjugeerde"

View File

@@ -58,7 +58,7 @@ UnitPressurePascalHecto = "Hectopascal"
UnitPressureAtm = "Atmosfera"
UnitEnergyMenu = "Energia"
UnitEnergyJouleMilli = "Milijoule"
UnitEnergyEletronVoltMenu = "Eletrão-volt"
UnitEnergyElectronVoltMenu = "Eletrão-volt"
UnitEnergyElectronVoltMega = "Megaeletrão-volt"
UnitEnergyElectronVoltKilo = "Kiloeletrão-volt"
UnitEnergyElectronVolt = "Eletrão-volt"
@@ -116,7 +116,7 @@ Integral = "Integral"
Sum = "Somatório"
Product = "Produto"
ComplexAbsoluteValue = "Módulo"
Agument = "Argumento"
Argument = "Argumento"
RealPart = "Parte real"
ImaginaryPart = "Parte imaginária"
Conjugate = "Conjugado"

View File

@@ -9,7 +9,7 @@
"""This module implements enough functionality to program the STM32F4xx over
DFU, without requiring dfu-util.
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

View File

@@ -13,7 +13,7 @@ def parse_line(line):
readelf_output = subprocess.check_output([
"arm-none-eabi-readelf",
"-W", # Don't limit line lenght
"-W", # Don't limit line length
"-s", # Sizes
sys.argv[1]
]).decode('utf-8')

View File

@@ -55,7 +55,7 @@ def methodtrace(logger):
if not _enable_tracing:
return f
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():
fn = type(args[0]).__name__ + '.' + f.__name__
_trace_function_call(logger, fn, *args[1:], **named_args)
@@ -70,7 +70,7 @@ def functiontrace(logger):
if not _enable_tracing:
return f
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():
_trace_function_call(logger, f.__name__, *args, **named_args)
return f(*args, **named_args)

View File

@@ -35,7 +35,7 @@ This module exports:
IBackend - backend 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,
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,
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.
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.
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.
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.
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.
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
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
in miliseconds.
in milliseconds.
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
is the buffer to receive the data read, the length of the buffer
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.
"""
@@ -276,7 +276,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
of the interface containing the endpoint. The data parameter
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
in miliseconds.
in milliseconds.
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
is the buffer to receive the data read, the length of the buffer
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.
"""
@@ -306,7 +306,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
of the interface containing the endpoint. The data parameter
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
in miliseconds.
in milliseconds.
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
is buffer to receive the data read, the length of the buffer tells
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.
"""
@@ -347,7 +347,7 @@ class IBackend(_objfinalizer.AutoFinalizedObject):
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 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
read (for IN transfers), as an array.array object.

View File

@@ -300,7 +300,7 @@ def _setup_prototypes(lib):
# void libusb_exit (struct libusb_context *ctx)
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)
lib.libusb_get_device_list.argtypes = [
c_void_p,

View File

@@ -735,7 +735,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
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
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.
"""
@@ -961,7 +961,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
The data parameter should be a sequence like type convertible to
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.
"""
@@ -993,7 +993,7 @@ class Device(_objfinalizer.AutoFinalizedObject):
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).
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
method returns an array object with the data read. If the

View File

@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# 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
# could be handy for archiving the generated documentation or if some version

View File

@@ -22,7 +22,7 @@ endif
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)
DISPLAY_OS = Windows

View File

@@ -1,7 +1,7 @@
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
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.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))

View File

@@ -22,7 +22,7 @@
<path class="st4" d="M82.3 203h119.6v31.7H82.3z"/>
<path class="st1" d="M98.4 212.1h66.3v19.3H98.4z"/>
<text transform="translate(98.372 227.228)" class="st5 st6">
Esher
Escher
</text>
<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"/>

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

12
docs/build/index.md vendored
View File

@@ -2,7 +2,7 @@
title: Installing the SDK
breadcrumb: SDK
---
# Build and run your own version of Epsilon
# Build and run your own version of Upsilon
## Install the SDK
@@ -46,13 +46,13 @@ apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
## 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:
@@ -61,7 +61,7 @@ make PLATFORM=simulator clean
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.
@@ -71,4 +71,4 @@ make
make epsilon_flash
```
Congratulations, you're running your very own version of Epsilon!
Congratulations, you're running your very own version of Upsilon!

View File

@@ -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:
- 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 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
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

View File

@@ -4,7 +4,7 @@
*
* 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,
* 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. */
#include <stdio.h>

View File

@@ -60,7 +60,7 @@ protected:
class Position {
/* 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
* combining code points that do not fave a personnal glyph. */
* combining code points that do not fave a personal glyph. */
public:
Position(int column, int line) : m_column(column), m_line(line) {}
int column() const { return m_column; }

View File

@@ -8,7 +8,7 @@ extern "C" {
#include <stdint.h>
}
/* ViewControllers are reponsible for
/* ViewControllers are responsible for
* - Building the view hierarchy
* - Handling user input
*
@@ -23,7 +23,7 @@ extern "C" {
* - willExitResponderChain
* - 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.
*
* The method initView is called before setting a View (or often sets itself)

View File

@@ -37,7 +37,7 @@ int ButtonRowController::ContentView::numberOfSubviews() const {
}
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
* 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
@@ -217,7 +217,7 @@ void ButtonRowController::initView() {
void ButtonRowController::viewWillAppear() {
/* 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.mainViewController()->viewWillAppear();
}

View File

@@ -54,7 +54,7 @@ void IconView::drawRect(KDContext * ctx, KDRect rect) const {
//Then we push the rectangular part of the image
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, 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);

View File

@@ -93,7 +93,7 @@ bool SelectableTableView::selectCellAtLocation(int i, int j, bool setFirstRespon
* ExpressionModelListController needs to update its memoized cell before
* being able to scroll;
* - 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
* after scrolling.
*/

View File

@@ -155,7 +155,7 @@ bool TextField::ContentView::removePreviousGlyph() {
assert(m_isEditing);
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. */
reloadRectFromPosition(s_draftTextBuffer);
}
@@ -290,7 +290,7 @@ bool TextField::privateHandleEvent(Ion::Events::Event event) {
return true;
}
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.
* This will call textFieldDidAbortEditing if the textfield is still editing,
* which we do not want, as we are not really aborting edition, just

View File

@@ -18,7 +18,7 @@ include ion/src/$(PLATFORM)/Makefile
include ion/src/shared/tools/Makefile
# 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).
# Older versions of GCC are not conformant so we resort to an initializer list.
initializer_list = $(shell echo $(1) | sed "s/\(.\)/'\1',/g")0

View File

@@ -9,7 +9,7 @@ namespace Timing {
void usleep(uint32_t us);
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. */
uint64_t millis();

View File

@@ -19,17 +19,17 @@ private:
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);
/* 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. */
const char * CodePointSearch(const char * s, CodePoint c, const char * stoppingPosition = nullptr);
// Returns true if the text had the code point
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. */
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. */
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.
* Exemples :
* Examples :
* SlideStringByNumberOfChar("12345", 2, 7) gives "1212345"
* SlideStringByNumberOfChar("12345", 2, 5) gives "12123"
* SlideStringByNumberOfChar("12345", -2, 5) gives "34545"*/

View File

@@ -71,7 +71,7 @@ SECTIONS {
/* 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
* 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
* translates to the data section having a LMA in Flash and a VMA in RAM).
*

View File

@@ -42,7 +42,7 @@ void initMPU() {
/* This is needed for interfacing with the LCD
* 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
* writeable non-cachable, non-buffereable and non shareable. */
* writeable non-cacheable, non-buffereable and non shareable. */
int sector = 0;
MPU.RNR()->setREGION(sector++);
MPU.RBAR()->setADDR(0x60000000);
@@ -84,7 +84,7 @@ void initMPU() {
* 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
* 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). */
MPU.RNR()->setREGION(sector++);
MPU.RBAR()->setADDR(0x90000000);

View File

@@ -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);
static_assert(SSCG_MODPER == 250, "SSCG_MODPER 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");
}
}
}

View File

@@ -190,7 +190,6 @@ SECTIONS {
*(.text._ZN3Ion6Device9Backlight*)
*(.text._ZN3Ion9Backlight*)
/* Rodata Truc Relou */
*(.text._ZNK10Statistics5Store6medianEi)
*(.text._ZNK10Regression5Store12meanOfColumnEiib)
*(.text._ZNK6Shared15DoublePairStore11sumOfColumnEiib)
@@ -322,7 +321,7 @@ SECTIONS {
/* 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
* 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
* translates to the data section having a LMA in Flash and a VMA in RAM).
*

View File

@@ -52,7 +52,7 @@ SECTIONS {
/* 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
* 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
* translates to the data section having a LMA in Flash and a VMA in RAM).
*

View File

@@ -4,10 +4,10 @@
/* 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
* 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
* 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. */

View File

@@ -51,7 +51,7 @@ bool waitForVBlank() {
uint64_t startTime = Timing::millis();
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
* event.
*

View File

@@ -51,28 +51,28 @@ size_t numberOfBitsAfterLeadingZeroes(int i) {
}
uint8_t * SignificantExamModeAddress() {
uint32_t * persitence_start_32 = (uint32_t *)&_exam_mode_buffer_start;
uint32_t * persitence_end_32 = (uint32_t *)&_exam_mode_buffer_end;
assert((persitence_end_32 - persitence_start_32) % 4 == 0);
while (persitence_start_32 < persitence_end_32 && *persitence_start_32 == 0x0) {
uint32_t * persistence_start_32 = (uint32_t *)&_exam_mode_buffer_start;
uint32_t * persistence_end_32 = (uint32_t *)&_exam_mode_buffer_end;
assert((persistence_end_32 - persistence_start_32) % 4 == 0);
while (persistence_start_32 < persistence_end_32 && *persistence_start_32 == 0x0) {
// 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 * persitence_end_8 = (uint8_t *)persitence_end_32;
while (persitence_start_8 < persitence_end_8 && *persitence_start_8 == 0x0) {
uint8_t * persistence_start_8 = (uint8_t *)persistence_start_32;
uint8_t * persistence_end_8 = (uint8_t *)persistence_end_32;
while (persistence_start_8 < persistence_end_8 && *persistence_start_8 == 0x0) {
// 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
|| (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);
Ion::Device::Flash::EraseSector(Ion::Device::Flash::SectorAtAddress((uint32_t)&_exam_mode_buffer_start));
return (uint8_t *)&_exam_mode_buffer_start;
}
return persitence_start_8;
return persistence_start_8;
}
uint8_t FetchExamMode() {

View File

@@ -49,7 +49,7 @@ void jump(uint32_t jumpIsrVectorAddress) {
// Disable cache before reset
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();
internalFlashJump(jumpIsrVectorAddress);

View File

@@ -8,7 +8,7 @@ namespace Device {
namespace WakeUp {
/* 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
* ---------------+--------+---------+---------+-------+-------+-------+-------------------------

View File

@@ -17,7 +17,7 @@ public:
};
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
* 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

View File

@@ -154,7 +154,7 @@ private:
ExtendedCompatIDDescriptor m_extendedCompatIdDescriptor;
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
* included in other descriptors or returned by other functions. */

View File

@@ -1,5 +1,5 @@
/* 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
*
* The second case raises a huge issue: code cannot be executed from memory that

View File

@@ -74,7 +74,7 @@ private:
Unlock = 11
};
// DFU Download Commmand Codes
// DFU Download Command Codes
enum class DFUDownloadCommand {
GetCommand = 0x00,
SetAddressPointer = 0x21,

Some files were not shown because too many files have changed in this diff Show More