mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Merge branch 'omega-hotfix' into omega-dev
This commit is contained in:
@@ -2,8 +2,8 @@ CalculApp = "Számolás"
|
||||
CalculAppCapital = "SZÁMOLÁS"
|
||||
AdditionalResults = "További eredmények"
|
||||
DecimalBase = "Decimális"
|
||||
HexadecimalBase = "hexadecimális"
|
||||
BinaryBase = "Binary"
|
||||
HexadecimalBase = "Hexadecimális"
|
||||
BinaryBase = "Kétkomponensü"
|
||||
PrimeFactors = "Alapvetö tényezök"
|
||||
MixedFraction = "Vegyes frakció"
|
||||
EuclideanDivision = "Euklideszi osztás"
|
||||
|
||||
@@ -24,6 +24,13 @@ HistoryController::HistoryController(EditExpressionController * editExpressionCo
|
||||
}
|
||||
|
||||
void HistoryController::reload() {
|
||||
/* When reloading, we might not used anymore cell that hold previous layouts.
|
||||
* We clean them all before reloading their content to avoid taking extra
|
||||
* useless space in the Poincare pool. */
|
||||
for (int i = 0; i < k_maxNumberOfDisplayedRows; i++) {
|
||||
m_calculationHistory[i].resetMemoization();
|
||||
}
|
||||
|
||||
m_selectableTableView.reloadData();
|
||||
/* TODO
|
||||
* Replace the following by selectCellAtLocation in order to avoid laying out
|
||||
|
||||
@@ -200,6 +200,14 @@ bool HistoryViewCell::oneLine() {
|
||||
return outputSize.width() + inputSize.width() < bounds().width() - 6;
|
||||
}
|
||||
|
||||
void HistoryViewCell::resetMemoization() {
|
||||
// Clean the layouts to make room in the pool
|
||||
// TODO: maybe do this only when the layout won't change to avoid blinking
|
||||
m_inputView.setLayout(Poincare::Layout());
|
||||
m_scrollableOutputView.setLayouts(Poincare::Layout(), Poincare::Layout(), Poincare::Layout());
|
||||
m_calculationCRC32 = 0;
|
||||
}
|
||||
|
||||
void HistoryViewCell::setCalculation(Calculation * calculation, bool expanded) {
|
||||
uint32_t newCalculationCRC = Ion::crc32Byte((const uint8_t *)calculation, ((char *)calculation->next()) - ((char *) calculation));
|
||||
if (newCalculationCRC == m_calculationCRC32 && m_calculationExpanded == expanded) {
|
||||
@@ -207,10 +215,8 @@ void HistoryViewCell::setCalculation(Calculation * calculation, bool expanded) {
|
||||
}
|
||||
Poincare::Context * context = App::app()->localContext();
|
||||
|
||||
// Clean the layouts to make room in the pool
|
||||
// TODO: maybe do this only when the layout won't change to avoid blinking
|
||||
m_inputView.setLayout(Poincare::Layout());
|
||||
m_scrollableOutputView.setLayouts(Poincare::Layout(), Poincare::Layout(), Poincare::Layout());
|
||||
resetMemoization();
|
||||
|
||||
// Memoization
|
||||
m_calculationCRC32 = newCalculationCRC;
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
}
|
||||
Poincare::Layout layout() const override;
|
||||
KDColor backgroundColor() const override;
|
||||
void resetMemoization();
|
||||
void setCalculation(Calculation * calculation, bool expanded);
|
||||
int numberOfSubviews() const override;
|
||||
View * subviewAtIndex(int index) override;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Console = "Console d'execution"
|
||||
Console = "Konzol"
|
||||
AddScript = "Script hozzadáadása"
|
||||
ScriptOptions = "Script beállítások"
|
||||
ExecuteScript = "Script indítása"
|
||||
|
||||
@@ -37,7 +37,7 @@ PythonErf = "Hiba funkció"
|
||||
PythonErfc = "Kiegészítö hibafunkció"
|
||||
PythonEval = "Visszaadja az értékelt kifejezést"
|
||||
PythonExp = "Exponenciális függvény"
|
||||
PythonExpm1 = "Compute exp (x) -1"
|
||||
PythonExpm1 = "Számítsuk ki az exp (x) -1-et"
|
||||
PythonFabs = "Abszolút érték"
|
||||
PythonFillRect = "Töltsön meg egy téglalapot pixelnél (x, y)"
|
||||
PythonFloat = "x konvertálása float-ra"
|
||||
|
||||
@@ -134,7 +134,27 @@ const char * ConsoleController::inputText(const char * prompt) {
|
||||
|
||||
const char * previousPrompt = m_editCell.promptText();
|
||||
m_editCell.setPrompt(promptText);
|
||||
m_editCell.setText("");
|
||||
|
||||
/* The user will input some text that is stored in the edit cell. When the
|
||||
* input is finished, we want to clear that cell and return the input text.
|
||||
* We choose to shift the input in the edit cell and put a null char in first
|
||||
* position, so that the cell seems cleared but we can still use it to store
|
||||
* the input.
|
||||
* To do so, we need to reduce the cell buffer size by one, so that the input
|
||||
* can be shifted afterwards, even if it has maxSize.
|
||||
*
|
||||
* Illustration of a input sequence:
|
||||
* | | | | | | | | | <- the edit cell buffer
|
||||
* |0| | | | | | |X| <- clear and reduce the size
|
||||
* |a|0| | | | | |X| <- user input
|
||||
* |a|b|0| | | | |X| <- user input
|
||||
* |a|b|c|0| | | |X| <- user input
|
||||
* |a|b|c|d|0| | |X| <- last user input
|
||||
* | |a|b|c|d|0| | | <- increase the buffer size and shift the user input by one
|
||||
* |0|a|b|c|d|0| | | <- put a zero in first position: the edit cell seems empty
|
||||
*/
|
||||
|
||||
m_editCell.clearAndReduceSize();
|
||||
|
||||
// Reload the history
|
||||
m_selectableTableView.reloadData();
|
||||
@@ -147,16 +167,18 @@ const char * ConsoleController::inputText(const char * prompt) {
|
||||
return c->inputRunLoopActive();
|
||||
}, this);
|
||||
|
||||
// Handle the input text
|
||||
// Print the prompt and the input text
|
||||
if (promptText != nullptr) {
|
||||
printText(promptText, s - promptText);
|
||||
}
|
||||
const char * text = m_editCell.text();
|
||||
printText(text, strlen(text));
|
||||
size_t textSize = strlen(text);
|
||||
printText(text, textSize);
|
||||
flushOutputAccumulationBufferToStore();
|
||||
|
||||
// Clear the edit cell and return the input
|
||||
text = m_editCell.shiftCurrentTextAndClear();
|
||||
m_editCell.setPrompt(previousPrompt);
|
||||
m_editCell.setText("");
|
||||
refreshPrintOutput();
|
||||
|
||||
return text;
|
||||
@@ -394,21 +416,26 @@ void ConsoleController::printText(const char * text, size_t length) {
|
||||
/* If there is no new line in text, just append it to the output
|
||||
* accumulation buffer. */
|
||||
appendTextToOutputAccumulationBuffer(text, length);
|
||||
return;
|
||||
} else {
|
||||
if (textCutIndex < length - 1) {
|
||||
/* If there is a new line in the middle of the text, we have to store at
|
||||
* least two new console lines in the console store. */
|
||||
printText(text, textCutIndex + 1);
|
||||
printText(&text[textCutIndex+1], length - (textCutIndex + 1));
|
||||
return;
|
||||
}
|
||||
/* There is a new line at the end of the text, we have to store the line in
|
||||
* the console store. */
|
||||
assert(textCutIndex == length - 1);
|
||||
appendTextToOutputAccumulationBuffer(text, length-1);
|
||||
flushOutputAccumulationBufferToStore();
|
||||
micropython_port_vm_hook_refresh_print();
|
||||
}
|
||||
if (textCutIndex < length - 1) {
|
||||
/* If there is a new line in the middle of the text, we have to store at
|
||||
* least two new console lines in the console store. */
|
||||
printText(text, textCutIndex + 1);
|
||||
printText(&text[textCutIndex+1], length - (textCutIndex + 1));
|
||||
return;
|
||||
}
|
||||
/* There is a new line at the end of the text, we have to store the line in
|
||||
* the console store. */
|
||||
assert(textCutIndex == length - 1);
|
||||
appendTextToOutputAccumulationBuffer(text, length-1);
|
||||
flushOutputAccumulationBufferToStore();
|
||||
micropython_port_vm_hook_refresh_print();
|
||||
/* micropython_port_vm_hook_loop is not enough to detect user interruptions,
|
||||
* because it calls micropython_port_interrupt_if_needed every 20000
|
||||
* operations, and a print operation is quite long. We thus explicitely call
|
||||
* micropython_port_interrupt_if_needed here. */
|
||||
micropython_port_interrupt_if_needed();
|
||||
}
|
||||
|
||||
void ConsoleController::autoImportScript(Script script, bool force) {
|
||||
|
||||
@@ -55,4 +55,21 @@ bool ConsoleEditCell::insertText(const char * text) {
|
||||
return m_textField.handleEventWithText(text);
|
||||
}
|
||||
|
||||
void ConsoleEditCell::clearAndReduceSize() {
|
||||
setText("");
|
||||
size_t previousBufferSize = m_textField.draftTextBufferSize();
|
||||
assert(previousBufferSize > 1);
|
||||
m_textField.setDraftTextBufferSize(previousBufferSize - 1);
|
||||
}
|
||||
|
||||
const char * ConsoleEditCell::shiftCurrentTextAndClear() {
|
||||
size_t previousBufferSize = m_textField.draftTextBufferSize();
|
||||
m_textField.setDraftTextBufferSize(previousBufferSize + 1);
|
||||
char * textFieldBuffer = m_textField.draftTextBuffer();
|
||||
char * newTextPosition = textFieldBuffer + 1;
|
||||
strlcpy(newTextPosition, textFieldBuffer, previousBufferSize);
|
||||
textFieldBuffer[0] = 0;
|
||||
return newTextPosition;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
bool insertText(const char * text);
|
||||
void setPrompt(const char * prompt);
|
||||
const char * promptText() const { return m_promptView.text(); }
|
||||
void clearAndReduceSize();
|
||||
const char * shiftCurrentTextAndClear();
|
||||
private:
|
||||
PointerTextView m_promptView;
|
||||
TextField m_textField;
|
||||
|
||||
@@ -251,7 +251,6 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAbs, I18n::Message::PythonAbs),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAcos, I18n::Message::PythonAcos),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAcosh, I18n::Message::PythonAcosh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAppend, I18n::Message::PythonAppend, false, I18n::Message::PythonCommandAppendWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAsin, I18n::Message::PythonAsin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAsinh, I18n::Message::PythonAsinh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAtan, I18n::Message::PythonAtan),
|
||||
@@ -265,14 +264,12 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCeil, I18n::Message::PythonCeil),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandChoice, I18n::Message::PythonChoice),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandCircle, I18n::Message::PythonTurtleCircle),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandClear, I18n::Message::PythonClear, false, I18n::Message::PythonCommandClearWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCmathFunction, I18n::Message::PythonCmathFunction, false, I18n::Message::PythonCommandCmathFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColor, I18n::Message::PythonColor),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandComplex, I18n::Message::PythonComplex),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCopySign, I18n::Message::PythonCopySign),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCos, I18n::Message::PythonCos),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCosh, I18n::Message::PythonCosh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCount, I18n::Message::PythonCount, false, I18n::Message::PythonCommandCountWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDegrees, I18n::Message::PythonDegrees),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDivMod, I18n::Message::PythonDivMod),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawString, I18n::Message::PythonDrawString),
|
||||
@@ -312,9 +309,7 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportRandom, I18n::Message::PythonImportRandom, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTurtle, I18n::Message::PythonImportTurtle, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTime, I18n::Message::PythonImportTime, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIndex, I18n::Message::PythonIndex, false, I18n::Message::PythonCommandIndexWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandInput, I18n::Message::PythonInput),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandInsert, I18n::Message::PythonInsert, false, I18n::Message::PythonCommandInsertWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandInt, I18n::Message::PythonInt),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIonFunction, I18n::Message::PythonIonFunction, false, I18n::Message::PythonCommandIonFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandIsdown, I18n::Message::PythonTurtleIsdown, false),
|
||||
@@ -327,6 +322,15 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandLeft, I18n::Message::PythonTurtleLeft),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLength, I18n::Message::PythonLength),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLgamma, I18n::Message::PythonLgamma),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandAppend, I18n::Message::PythonAppend, false, I18n::Message::PythonCommandAppendWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandClear, I18n::Message::PythonClear, false, I18n::Message::PythonCommandClearWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCount, I18n::Message::PythonCount, false, I18n::Message::PythonCommandCountWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIndex, I18n::Message::PythonIndex, false, I18n::Message::PythonCommandIndexWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandInsert, I18n::Message::PythonInsert, false, I18n::Message::PythonCommandInsertWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPop, I18n::Message::PythonPop, false, I18n::Message::PythonCommandPopWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRemove, I18n::Message::PythonRemove, false, I18n::Message::PythonCommandRemoveWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandReverse, I18n::Message::PythonReverse, false, I18n::Message::PythonCommandReverseWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSort, I18n::Message::PythonSort, false, I18n::Message::PythonCommandSortWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLog, I18n::Message::PythonLog),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLog10, I18n::Message::PythonLog10),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLog2, I18n::Message::PythonLog2),
|
||||
@@ -344,7 +348,6 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandConstantPi, I18n::Message::PythonConstantPi, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandPink, I18n::Message::PythonTurtlePink, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPolar, I18n::Message::PythonPolar),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPop, I18n::Message::PythonPop, false, I18n::Message::PythonCommandPopWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandPosition, I18n::Message::PythonTurtlePosition, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPower, I18n::Message::PythonPower),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPrint, I18n::Message::PythonPrint),
|
||||
@@ -358,9 +361,7 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRangeStop, I18n::Message::PythonRangeStop),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRect, I18n::Message::PythonRect),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandRed, I18n::Message::PythonTurtleRed, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRemove, I18n::Message::PythonRemove, false, I18n::Message::PythonCommandRemoveWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandReset, I18n::Message::PythonTurtleReset, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandReverse, I18n::Message::PythonReverse, false, I18n::Message::PythonCommandReverseWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandRight, I18n::Message::PythonTurtleRight),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRound, I18n::Message::PythonRound),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandSetheading, I18n::Message::PythonTurtleSetheading),
|
||||
@@ -370,7 +371,6 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSin, I18n::Message::PythonSin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSinh, I18n::Message::PythonSinh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSleep, I18n::Message::PythonSleep),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSort, I18n::Message::PythonSort, false, I18n::Message::PythonCommandSortWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSorted, I18n::Message::PythonSort),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandSpeed, I18n::Message::PythonTurtleSpeed),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSqrt, I18n::Message::PythonSqrt),
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FunctionApp = "Funkciók"
|
||||
FunctionAppCapital = "FUNKCIÓK"
|
||||
FunctionTab = "Funkciók"
|
||||
AddFunction = "Add function"
|
||||
AddFunction = "Funkció hozzáadása"
|
||||
DeleteFunction = "Funkció törlése"
|
||||
CurveType = "Görbe típus"
|
||||
CartesianType = "Cartesian "
|
||||
PolarType = "Polar "
|
||||
ParametricType = "Parametric "
|
||||
CartesianType = "Kartéziánus "
|
||||
PolarType = "Poláris "
|
||||
ParametricType = "Parametrikus "
|
||||
IntervalT = "t intervallum"
|
||||
IntervalTheta = "θ intervallum"
|
||||
IntervalX = "x intervallum"
|
||||
@@ -17,7 +17,7 @@ NoActivatedFunction = "Nincs bekapcsolt funkció"
|
||||
PlotOptions = "Tervezési lehetöségek"
|
||||
Compute = "Számítás"
|
||||
Zeros = "Nullák"
|
||||
Tangent = "Tangent"
|
||||
Tangent = "Tangens"
|
||||
Intersection = "Keresztezés"
|
||||
Preimage = "Inverz kép"
|
||||
SelectLowerBound = "Alsó határ kiválasztása"
|
||||
|
||||
@@ -12,9 +12,9 @@ Covariance = "Kovariancia"
|
||||
Linear = "Lineáris"
|
||||
Quadratic = "Másodfokú"
|
||||
Cubic = "Kocka"
|
||||
Quartic = "Quartic"
|
||||
Quartic = "Kvartikus"
|
||||
Logarithmic = "Logaritmikus"
|
||||
Power = "Teljesítmény"
|
||||
Trigonometrical = "Trigonometrikus"
|
||||
Logistic = "Logistic"
|
||||
Logistic = "Logisztikai"
|
||||
DataNotSuitableForRegression = " Az adat nem megfelelö ehhez a regressziós modellhez"
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "Linear "
|
||||
Edition2D = "Natürlich "
|
||||
ComplexFormat = "Komplex"
|
||||
ExamMode = "Testmodus"
|
||||
ActivateExamMode = "Starten Testmodus"
|
||||
ExamModeActive = "Wieder starten Testmodus"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ToDeactivateExamMode1 = "Um den Testmodus auszuschalten,"
|
||||
ToDeactivateExamMode2 = "schließen Sie den Rechner an einen"
|
||||
ToDeactivateExamMode3 = "Computer oder eine Steckdose an."
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "Linear "
|
||||
Edition2D = "Natural "
|
||||
ComplexFormat = "Complex format"
|
||||
ExamMode = "Exam mode"
|
||||
ActivateExamMode = "Activate exam mode"
|
||||
ExamModeActive = "Reactivate exam mode"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ToDeactivateExamMode1 = "To deactivate the exam mode,"
|
||||
ToDeactivateExamMode2 = "plug the calculator to a computer"
|
||||
ToDeactivateExamMode3 = "or to a power socket."
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "En línea "
|
||||
Edition2D = "Natural "
|
||||
ComplexFormat = "Forma compleja"
|
||||
ExamMode = "Modo examen"
|
||||
ActivateExamMode = "Activar el modo examen"
|
||||
ExamModeActive = "Reactivar el modo examen"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ToDeactivateExamMode1 = "Para desactivar el modo examen,"
|
||||
ToDeactivateExamMode2 = "conecte la calculadora a un ordenador"
|
||||
ToDeactivateExamMode3 = "o a un enchufe eléctrico."
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "En ligne "
|
||||
Edition2D = "Naturelle "
|
||||
ComplexFormat = "Forme complexe"
|
||||
ExamMode = "Mode examen"
|
||||
ActivateExamMode = "Activer le mode examen"
|
||||
ExamModeActive = "Réactiver le mode examen"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ToDeactivateExamMode1 = "Pour désactiver le mode examen,"
|
||||
ToDeactivateExamMode2 = "brancher la calculatrice à un"
|
||||
ToDeactivateExamMode3 = "ordinateur ou à une prise de courant."
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "Lineáris"
|
||||
Edition2D = "Természetes"
|
||||
ComplexFormat = "Komplex formátum"
|
||||
ExamMode = "Vizsga mód"
|
||||
ActivateExamMode = "A vizsgálati mód aktiválása"
|
||||
ExamModeActive = "A vizsgamód újraaktiválása"
|
||||
ActivateDutchExamMode = "A holland vizsga mód aktiválása"
|
||||
ToDeactivateExamMode1 = "a vizsga mód kikapcsoláshoz"
|
||||
ToDeactivateExamMode2 = "csatlakoztassa a számológépet a számítógéphez"
|
||||
ToDeactivateExamMode3 = "vagy egy konnektorhoz."
|
||||
@@ -24,15 +22,15 @@ AboutWarning4 = "az esetleges károkért."
|
||||
# -----------------------------------------------------------------------------
|
||||
About = "Egyéb"
|
||||
Degrees = "Fokok "
|
||||
Gradians = "Gradians "
|
||||
Radian = "Radians "
|
||||
Gradians = "Gradiens "
|
||||
Radian = "Radián "
|
||||
Decimal = "Tizedes "
|
||||
Scientific = "Tudományos "
|
||||
Engineering = "Mérnöki "
|
||||
SignificantFigures = "Tizedes számok "
|
||||
Real = "Real "
|
||||
Cartesian = "Cartesian "
|
||||
Polar = "Polar "
|
||||
Real = "Valódi "
|
||||
Cartesian = "Kartéziánus "
|
||||
Polar = "Poláris "
|
||||
Brightness = "Fényerö"
|
||||
SoftwareVersion = "Epsilon verzió"
|
||||
CustomSoftwareVersion = "Omega verzió"
|
||||
@@ -51,7 +49,7 @@ LEDColor = "LED szín"
|
||||
ExamModeMode = "Üzemmód"
|
||||
ExamModeModeStandard = "Normál"
|
||||
ExamModeModeNoSym = "Nincs sym"
|
||||
ExamModeModeNoSymNoText = "No Symbolic no text "
|
||||
ExamModeModeNoSymNoText = "Nincs szimbolikus, nincs szöveg "
|
||||
ExamModeModeDutch = "Holland "
|
||||
ColorRed = "Piros "
|
||||
ColorWhite = "Fehér "
|
||||
|
||||
@@ -7,9 +7,7 @@ EditionLinear = "Em linha "
|
||||
Edition2D = "Natural "
|
||||
ComplexFormat = "Complexos"
|
||||
ExamMode = "Modo de exame"
|
||||
ActivateExamMode = "Activar o modo de exame"
|
||||
ExamModeActive = "Reactivar o modo de exame"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ToDeactivateExamMode1 = "Para desactivar o modo de exame,"
|
||||
ToDeactivateExamMode2 = "ligue a calculadora a um computador"
|
||||
ToDeactivateExamMode3 = "ou a uma tomada eléctrica."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Aktivieren/Deaktivieren"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ActivateExamMode = "Starten Testmodus"
|
||||
ActiveExamModeMessage1 = "Alle Ihre Daten werden "
|
||||
ActiveExamModeMessage2 = "gelöscht, wenn Sie den "
|
||||
ActiveExamModeMessage3 = "Testmodus einschalten."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Turn on/off"
|
||||
ActivateExamMode = "Activate exam mode"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ActiveExamModeMessage1 = "All your data will be "
|
||||
ActiveExamModeMessage2 = "deleted when you activate "
|
||||
ActiveExamModeMessage3 = "the exam mode."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Activar/Desactivar"
|
||||
ActivateExamMode = "Activar el modo examen"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ActiveExamModeMessage1 = "Todos sus datos se "
|
||||
ActiveExamModeMessage2 = "eliminaran al activar "
|
||||
ActiveExamModeMessage3 = "el modo examen."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Activer/Désactiver"
|
||||
ActivateExamMode = "Activer le mode examen"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ActiveExamModeMessage1 = "Toutes vos données seront "
|
||||
ActiveExamModeMessage2 = "supprimées si vous activez "
|
||||
ActiveExamModeMessage3 = "le mode examen."
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Ki/Be kapcsolás"
|
||||
ActivateExamMode = "A vizsgálati mód aktiválása"
|
||||
ActivateDutchExamMode = "A holland vizsga mód aktiválása"
|
||||
ActiveExamModeMessage1 = "Az összes adatod"
|
||||
ActiveExamModeMessage2 = "törölve lesz ha"
|
||||
ActiveExamModeMessage3 = "aktiválod a vizsga módot."
|
||||
@@ -24,7 +26,7 @@ Exponential = "Exponenciális"
|
||||
FillWithFormula = "Töltse ki egy képlettel"
|
||||
ForbiddenValue = "Tiltott érték"
|
||||
FunctionColumn = "0 (0) oszlop"
|
||||
FunctionOptions = "Function options"
|
||||
FunctionOptions = "Funkció opciók"
|
||||
Goto = "Menj ide"
|
||||
GraphTab = "Grafikon"
|
||||
HardwareTestLaunch1 = "Ön elindítja a hardvert"
|
||||
@@ -67,11 +69,11 @@ SyntaxError = "Szintaxis hiba"
|
||||
Sym = "sym"
|
||||
TEnd = "T vég"
|
||||
ThetaEnd = "θ vége"
|
||||
ThetaStart = "θ start"
|
||||
TStart = "T start"
|
||||
ThetaStart = "θ kezdete"
|
||||
TStart = "T kezdete"
|
||||
ToZoom = "Zoom:"
|
||||
Trigonometric = "Trigonometrikus"
|
||||
UndefinedValue = "Undefined value"
|
||||
UndefinedValue = "Nincs meghatározva érték"
|
||||
ValueNotReachedByFunction = "Az értéket a funkció nem érte el"
|
||||
ValuesTab = "Táblázat"
|
||||
Warning = "Figyelem"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
ActivateDeactivate = "Activar/Desactivar"
|
||||
ActivateExamMode = "Activar o modo de exame"
|
||||
ActivateDutchExamMode = "Activate Dutch exam mode"
|
||||
ActiveExamModeMessage1 = "Todos os seus dados serão "
|
||||
ActiveExamModeMessage2 = "apagados se você ligar "
|
||||
ActiveExamModeMessage3 = "o modo de exame."
|
||||
|
||||
@@ -24,13 +24,19 @@ ExpressionModel::ExpressionModel() :
|
||||
|
||||
void ExpressionModel::text(const Storage::Record * record, char * buffer, size_t bufferSize, CodePoint symbol) const {
|
||||
Expression e = expressionClone(record);
|
||||
if (e.isUninitialized() && bufferSize > 0) {
|
||||
buffer[0] = 0;
|
||||
} else {
|
||||
if (symbol != 0 && !e.isUninitialized()) {
|
||||
e = e.replaceSymbolWithExpression(Symbol::Builder(UCodePointUnknown), Symbol::Builder(symbol));
|
||||
if (e.isUninitialized()) {
|
||||
if (bufferSize > 0) {
|
||||
buffer[0] = 0;
|
||||
}
|
||||
e.serialize(buffer, bufferSize);
|
||||
return;
|
||||
}
|
||||
if (symbol != 0) {
|
||||
e = e.replaceSymbolWithExpression(Symbol::Builder(UCodePointUnknown), Symbol::Builder(symbol));
|
||||
}
|
||||
int serializedSize = e.serialize(buffer, bufferSize);
|
||||
if (serializedSize >= bufferSize - 1) {
|
||||
// It is very likely that the buffer is overflowed
|
||||
buffer[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
StatsApp = "Statisztika"
|
||||
StatsAppCapital = "STATISZTIKA"
|
||||
HistogramTab = "Histogram"
|
||||
BoxTab = "Box"
|
||||
HistogramTab = "Hisztogram"
|
||||
BoxTab = "Doboz"
|
||||
Values1 = "V1 értékek"
|
||||
Values2 = "V2 értékek"
|
||||
Values3 = "V3 értékek"
|
||||
@@ -14,7 +14,7 @@ Size = "Méret"
|
||||
Frequency = "Frekvencia"
|
||||
HistogramSet = "Hisztogram beállítások"
|
||||
RectangleWidth = "Tálca szélessége"
|
||||
BarStart = "X start"
|
||||
BarStart = "X kezdet"
|
||||
FirstQuartile = "Elsö kvartilis"
|
||||
Median = "Medián"
|
||||
ThirdQuartile = "Harmadik kvartilis"
|
||||
|
||||
@@ -12,33 +12,33 @@ UnitTimeWeek = "hét"
|
||||
UnitTimeMonth = "Hónap"
|
||||
UnitTimeYear = "Év"
|
||||
UnitDistanceMenu = "Távolság"
|
||||
UnitDistanceMeterMenu = "Meter"
|
||||
UnitDistanceMeterMenu = "Méter"
|
||||
UnitDistanceMeterKilo = "Kilométer"
|
||||
UnitDistanceMeter = "Meter"
|
||||
UnitDistanceMeter = "Méter"
|
||||
UnitDistanceMeterMilli = "Milliméter"
|
||||
UnitDistanceMeterMicro = "Mikrométer"
|
||||
UnitDistanceMeterNano = "Nanométer"
|
||||
UnitDistanceMeterPico = "Pikométer"
|
||||
UnitDistanceAstronomicalUnit = "Csillagászati egység"
|
||||
UnitDistanceLightYear = "Világos év"
|
||||
UnitDistanceLightYear = "Fény év"
|
||||
UnitDistanceParsec = "Parsec"
|
||||
UnitMassMenu = "Tömeg"
|
||||
UnitMassGramKilo = "Kilogramm"
|
||||
UnitMassGram = "Gramm"
|
||||
UnitMassGramMilli = "Milligram"
|
||||
UnitMassGramMicro = "Mikrogram"
|
||||
UnitMassGramNano = "Nanogram"
|
||||
UnitMassGramMilli = "Milligramm"
|
||||
UnitMassGramMicro = "Mikrogramm"
|
||||
UnitMassGramNano = "Nanogramm"
|
||||
UnitMassTonne = "Tonna"
|
||||
UnitCurrentMenu = "Elektromos áram"
|
||||
UnitCurrentAmpere = "Ampere"
|
||||
UnitCurrentAmpereMilli = "Milliampere"
|
||||
UnitCurrentAmpereMicro = "Microampere"
|
||||
UnitCurrentMenu = "Áram"
|
||||
UnitCurrentAmpere = "Amper"
|
||||
UnitCurrentAmpereMilli = "Milliamper"
|
||||
UnitCurrentAmpereMicro = "Mikroamper"
|
||||
UnitTemperatureMenu = "Hömérséklet"
|
||||
UnitTemperatureKelvin = "Kelvin"
|
||||
UnitAmountMenu = "Az anyag mennyisége"
|
||||
UnitAmountMole = "Mole"
|
||||
UnitAmountMole = "Mól"
|
||||
UnitAmountMoleMilli = "Millimól"
|
||||
UnitAmountMoleMicro = "Micromole"
|
||||
UnitAmountMoleMicro = "Mikromól"
|
||||
UnitLuminousIntensityMenu = "Fényerö"
|
||||
UnitLuminousIntensityCandela = "Candela"
|
||||
UnitFrequencyMenu = "Frekvencia"
|
||||
|
||||
@@ -19,3 +19,31 @@ $(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_ex
|
||||
sleep 2; \
|
||||
fi
|
||||
$(Q) $(PYTHON) build/device/dfu.py -u $(word 1,$^)
|
||||
|
||||
.PHONY: %.two_binaries
|
||||
%.two_binaries: %.elf
|
||||
@echo "Building an internal and an external binary for $<"
|
||||
$(Q) $(OBJCOPY) -O binary -j .text.external -j .rodata.external -j .exam_mode_buffer $(BUILD_DIR)/$< $(BUILD_DIR)/$(basename $<).external.bin
|
||||
$(Q) $(OBJCOPY) -O binary -R .text.external -R .rodata.external -R .exam_mode_buffer $(BUILD_DIR)/$< $(BUILD_DIR)/$(basename $<).internal.bin
|
||||
@echo "Padding $(basename $<).external.bin and $(basename $<).internal.bin"
|
||||
$(Q) printf "\xFF\xFF\xFF\xFF" >> $(basename $<).external.bin
|
||||
$(Q) printf "\xFF\xFF\xFF\xFF" >> $(basename $<).internal.bin
|
||||
|
||||
.PHONY: binpack
|
||||
binpack:
|
||||
rm -rf build/binpack
|
||||
mkdir -p build/binpack
|
||||
${MAKE} clean
|
||||
${MAKE} $(BUILD_DIR)/flasher.light.bin
|
||||
cp $(BUILD_DIR)/flasher.light.bin build/binpack
|
||||
${MAKE} clean
|
||||
${MAKE} $(BUILD_DIR)/bench.flash.bin
|
||||
${MAKE} $(BUILD_DIR)/bench.ram.bin
|
||||
cp $(BUILD_DIR)/bench.ram.bin $(BUILD_DIR)/bench.flash.bin build/binpack
|
||||
${MAKE} clean
|
||||
${MAKE} epsilon.onboarding.update.two_binaries
|
||||
cp $(BUILD_DIR)/epsilon.onboarding.update.internal.bin $(BUILD_DIR)/epsilon.onboarding.update.external.bin build/binpack
|
||||
${MAKE} clean
|
||||
cd build && for binary in flasher.light.bin bench.flash.bin bench.ram.bin epsilon.onboarding.internal.bin epsilon.onboarding.external.bin; do shasum -a 256 -b binpack/$${binary} > binpack/$${binary}.sha256;done
|
||||
cd build && tar cvfz binpack-`git rev-parse HEAD | head -c 7`.tgz binpack
|
||||
rm -rf build/binpack
|
||||
|
||||
@@ -6,9 +6,9 @@ $(BUILD_DIR)/epsilon.packed.js: $(call object_for,$(epsilon_src))
|
||||
|
||||
.PHONY: workshop_python_emulator
|
||||
workshop_python_emulator:
|
||||
make PLATFORM=simulator TARGET=web clean_for_apps_selection
|
||||
make PLATFORM=simulator TARGET=web EPSILON_APPS=code
|
||||
make PLATFORM=simulator TARGET=web clean_for_apps_selection
|
||||
$(MAKE) PLATFORM=simulator TARGET=web clean_for_apps_selection
|
||||
$(MAKE) PLATFORM=simulator TARGET=web EPSILON_APPS=code
|
||||
$(MAKE) PLATFORM=simulator TARGET=web clean_for_apps_selection
|
||||
|
||||
.PHONY: clean_for_apps_selection
|
||||
clean_for_apps_selection:
|
||||
|
||||
@@ -28,6 +28,8 @@ public:
|
||||
void reinitDraftTextBuffer() { m_contentView.reinitDraftTextBuffer(); }
|
||||
bool isEditing() const override;
|
||||
char * draftTextBuffer() const { return const_cast<char *>(m_contentView.editedText()); }
|
||||
void setDraftTextBufferSize(size_t size) { m_contentView.setDraftTextBufferSize(size); }
|
||||
size_t draftTextBufferSize() const { return m_contentView.draftTextBufferSize(); }
|
||||
size_t draftTextLength() const;
|
||||
void setText(const char * text);
|
||||
void setEditing(bool isEditing) override { m_contentView.setEditing(isEditing); }
|
||||
@@ -42,8 +44,19 @@ public:
|
||||
bool shouldFinishEditing(Ion::Events::Event event) override;
|
||||
const KDFont * font() const { return m_contentView.font(); }
|
||||
protected:
|
||||
|
||||
class ContentView : public TextInput::ContentView {
|
||||
public:
|
||||
/* In some app (ie Calculation), text fields record expression results whose
|
||||
* lengths can reach 70 (ie
|
||||
* [[1.234567e-123*e^(1.234567e-123*i), 1.234567e-123*e^(1.234567e-123*i)]]).
|
||||
* In order to be able to record those output text, k_maxBufferSize must be
|
||||
* over 70.
|
||||
* Furthermore, we want ot be able to write an adjacency matrix of size 10
|
||||
* so we need at least 2 brackets + 10 * (2 brackets + 10 digits + 9 commas)
|
||||
* = 212 characters. */
|
||||
constexpr static int k_maxBufferSize = 220;
|
||||
|
||||
ContentView(char * textBuffer, size_t textBufferSize, size_t draftTextBufferSize, const KDFont * font, float horizontalAlignment, float verticalAlignment, KDColor textColor, KDColor backgroundColor);
|
||||
void setBackgroundColor(KDColor backgroundColor);
|
||||
KDColor backgroundColor() const { return m_backgroundColor; }
|
||||
@@ -56,7 +69,8 @@ protected:
|
||||
void setText(const char * text);
|
||||
void setEditing(bool isEditing);
|
||||
void reinitDraftTextBuffer();
|
||||
void setDraftTextBufferSize(size_t size) { m_draftTextBufferSize = size; }
|
||||
void setDraftTextBufferSize(size_t size) { assert(size <= k_maxBufferSize); m_draftTextBufferSize = size; }
|
||||
size_t draftTextBufferSize() const { return m_draftTextBufferSize; }
|
||||
/* If the text to be appended is too long to be added without overflowing the
|
||||
* buffer, nothing is done (not even adding few letters from the text to reach
|
||||
* the maximum buffer capacity) and false is returned. */
|
||||
@@ -67,15 +81,6 @@ protected:
|
||||
void willModifyTextBuffer();
|
||||
void didModifyTextBuffer();
|
||||
size_t deleteSelection() override;
|
||||
/* In some app (ie Calculation), text fields record expression results whose
|
||||
* lengths can reach 70 (ie
|
||||
* [[1.234567e-123*e^(1.234567e-123*i), 1.234567e-123*e^(1.234567e-123*i)]]).
|
||||
* In order to be able to record those output text, k_maxBufferSize must be
|
||||
* over 70.
|
||||
* Furthermore, we want ot be able to write an adjacency matrix of size 10
|
||||
* so we need at least 2 brackets + 10 * (2 brackets + 10 digits + 9 commas)
|
||||
* = 212 characters. */
|
||||
constexpr static int k_maxBufferSize = 220;
|
||||
private:
|
||||
void layoutSubviews(bool force = false) override;
|
||||
KDRect glyphFrameAtPosition(const char * buffer, const char * position) const override;
|
||||
@@ -87,8 +92,10 @@ protected:
|
||||
KDColor m_textColor;
|
||||
KDColor m_backgroundColor;
|
||||
};
|
||||
|
||||
const ContentView * nonEditableContentView() const override { return &m_contentView; }
|
||||
ContentView m_contentView;
|
||||
|
||||
private:
|
||||
bool privateHandleEvent(Ion::Events::Event event);
|
||||
bool privateHandleMoveEvent(Ion::Events::Event event);
|
||||
|
||||
@@ -196,7 +196,9 @@ bool LayoutField::ContentView::selectionIsEmpty() const {
|
||||
}
|
||||
|
||||
void LayoutField::ContentView::deleteSelection() {
|
||||
assert(!selectionIsEmpty());
|
||||
if (selectionIsEmpty()) {
|
||||
return;
|
||||
}
|
||||
Layout selectionParent = m_selectionStart.parent();
|
||||
|
||||
/* If the selected layout is the upmost layout, it must be an horizontal
|
||||
@@ -318,9 +320,7 @@ bool LayoutField::handleEventWithText(const char * text, bool indentation, bool
|
||||
* - the result of a copy-paste. */
|
||||
|
||||
// Delete the selected layouts if needed
|
||||
if (!m_contentView.selectionIsEmpty()) {
|
||||
deleteSelection();
|
||||
}
|
||||
deleteSelection();
|
||||
|
||||
if (text[0] == 0) {
|
||||
// The text is empty
|
||||
@@ -493,8 +493,11 @@ bool LayoutField::privateHandleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (event == Ion::Events::Copy && isEditing()) {
|
||||
if ((event == Ion::Events::Copy || event == Ion::Events::Cut) && isEditing()) {
|
||||
m_contentView.copySelection(context());
|
||||
if (event == Ion::Events::Cut) {
|
||||
m_contentView.deleteSelection();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (event == Ion::Events::Clear && isEditing()) {
|
||||
|
||||
@@ -78,6 +78,12 @@ void TextField::ContentView::setText(const char * text) {
|
||||
maxBufferSize = m_draftTextBufferSize;
|
||||
buffer = s_draftTextBuffer;
|
||||
}
|
||||
if (textRealLength > maxBufferSize - 1) {
|
||||
// The text was too long to be copied
|
||||
// TODO Maybe add a warning for the user?
|
||||
buffer[0] = 0;
|
||||
return;
|
||||
}
|
||||
int textLength = minInt(textRealLength, maxBufferSize - 1);
|
||||
// Copy the text
|
||||
strlcpy(buffer, text, maxBufferSize);
|
||||
|
||||
Reference in New Issue
Block a user