Merge branch 'upsilon-dev' into logic-toolbox

This commit is contained in:
Yaya-Cout
2025-11-05 15:01:45 +00:00
committed by GitHub
265 changed files with 7400 additions and 1056 deletions

View File

@@ -50,6 +50,7 @@ apps_src += $(addprefix apps/,\
exam_mode_configuration_official.cpp:+official \
exam_mode_configuration_non_official.cpp:-official \
global_preferences.cpp \
host_filemanager.cpp \
i18n.py \
lock_view.cpp \
main.cpp \

View File

@@ -37,7 +37,8 @@ AppsContainer::AppsContainer() :
m_homeSnapshot(),
m_onBoardingSnapshot(),
m_hardwareTestSnapshot(),
m_usbConnectedSnapshot()
m_usbConnectedSnapshot(),
m_startAppSnapshot()
{
m_emptyBatteryWindow.setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height), false);
// #if __EMSCRIPTEN__
@@ -151,7 +152,10 @@ bool AppsContainer::dispatchEvent(Ion::Events::Event event) {
* We do it before switching to USB application to redraw the battery
* pictogram. */
updateBatteryState();
if (switchTo(usbConnectedAppSnapshot())) {
if (GlobalPreferences::sharedGlobalPreferences()->isInExamMode()) {
// If we are in exam mode, we don't switch to usb connected app
didProcessEvent = true;
} else if (switchTo(usbConnectedAppSnapshot())) {
Ion::USB::DFU(true);
// Update LED when exiting DFU mode
Ion::LED::updateColorWithPlugAndCharge();
@@ -346,7 +350,13 @@ void AppsContainer::run() {
/* Normal execution. The exception checkpoint must be created before
* switching to the first app, because the first app might create nodes on
* the pool. */
bool switched = switchTo(initialAppSnapshot());
bool switched;
if (m_startAppSnapshot != nullptr) {
switched = switchTo(m_startAppSnapshot);
} else {
switched = switchTo(initialAppSnapshot());
}
assert(switched);
(void) switched; // Silence compilation warning about unused variable.
} else {

View File

@@ -59,6 +59,9 @@ public:
// Ion::StorageDelegate
void storageDidChangeForRecord(const Ion::Storage::Record record) override;
void storageIsFull() override;
#ifdef EPSILON_GETOPT
void setStartApp(App::Snapshot * snapshot) { m_startAppSnapshot = snapshot; }
#endif
protected:
Home::App::Snapshot * homeAppSnapshot() { return &m_homeSnapshot; }
private:
@@ -89,6 +92,9 @@ private:
HardwareTest::App::Snapshot m_hardwareTestSnapshot;
USB::App::Snapshot m_usbConnectedSnapshot;
XNTLoop m_XNTLoop;
#ifdef EPSILON_GETOPT
App::Snapshot * m_startAppSnapshot;
#endif
};
#endif

View File

@@ -34,6 +34,11 @@ App::Snapshot * AppsContainerStorage::appSnapshotAtIndex(int index) {
};
assert(sizeof(snapshots)/sizeof(snapshots[0]) == k_numberOfCommonApps);
assert(index >= 0 && index < k_numberOfCommonApps);
// To avoid crashes, we return the home app snapshot if the index is out of
// bounds. (no crash in release mode, but an assert in debug mode)
if (index >= k_numberOfCommonApps) {
return snapshots[0];
}
return snapshots[index];
}
@@ -49,7 +54,5 @@ int AppsContainerStorage::appIndexFromSnapshot(App::Snapshot * snapshot) {
return i;
}
}
// Achievement unlock : how did you get here ?
assert(false);
return NULL;
}

View File

@@ -24,7 +24,12 @@ bool UnitListController::handleEvent(Ion::Events::Event event) {
if (selectedRow() == 0 && (event == Ion::Events::OK || event == Ion::Events::EXE)) {
return true;
}
return ListController::handleEvent(event);
// HACK: Change the selected row (prevent some bugs when OK is pressed)
selectRow(selectedRow() - 1);
bool value = ListController::handleEvent(event);
selectRow(selectedRow() + 1);
return value;
}
void UnitListController::setExpression(Poincare::Expression e) {

View File

@@ -18,27 +18,3 @@ Discriminant = "Diskriminante"
OnlyRoot = "Wurzel"
FirstRoot = "Erste Wurzel"
SecondRoot = "Zweite Wurzel"
TimeDimension = "Zeit"
DistanceDimension = "Distanz"
MassDimension = "Masse"
CurrentDimension = "Betrieb"
TemperatureDimension = "Temperatur"
AmountOfSubstanceDimension = "Quantität der Materie"
LuminousIntensityDimension = "Lichtintensität"
FrequencyDimension = "Frequenz"
ForceDimension = "Stärke"
PressureDimension = "Druck"
EnergyDimension = "Energie"
PowerDimension = "Mächtig"
ElectricChargeDimension = "Elektrische Ladung"
ElectricPotentialDimension = "Elektrisches Potenzial"
ElectricCapacitanceDimension = "Elektrische Kapazität"
ElectricResistanceDimension = "Elektrischer Wiederstand"
ElectricConductanceDimension = "elektrische Leitfähigkeit"
MagneticFluxDimension = "magnetischer Fluss"
MagneticFieldDimension = "Magnetfeld"
InductanceDimension = "Induktivität"
CatalyticActivityDimension = "Katalytische Aktivität"
SurfaceDimension = "Auftauchen"
VolumeDimension = "Volumen"
SpeedDimension = "Geschwindigkeit"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminant"
OnlyRoot = "Root"
FirstRoot = "First root"
SecondRoot = "Second root"
TimeDimension = "Time"
DistanceDimension = "Distance"
MassDimension = "Mass"
CurrentDimension = "Running"
TemperatureDimension = "Temperature"
AmountOfSubstanceDimension = "Quantity of matter"
LuminousIntensityDimension = "Light intensity"
FrequencyDimension = "Frequency"
ForceDimension = "Strength"
PressureDimension = "Pressure"
EnergyDimension = "Energy"
PowerDimension = "Powerful"
ElectricChargeDimension = "Electrical charge"
ElectricPotentialDimension = "Electric potential"
ElectricCapacitanceDimension = "Electrical capacity"
ElectricResistanceDimension = "Electrical resistance"
ElectricConductanceDimension = "electrical conductance"
MagneticFluxDimension = "magnetic flux"
MagneticFieldDimension = "Magnetic field"
InductanceDimension = "Inductance"
CatalyticActivityDimension = "Catalytic activity"
SurfaceDimension = "Surface"
VolumeDimension = "Volume"
SpeedDimension = "Speed"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminante"
OnlyRoot = "Raíz"
FirstRoot = "Primera raíz"
SecondRoot = "Segunda raíz"
TimeDimension = "Tiempo"
DistanceDimension = "Distancia"
MassDimension = "Masa"
CurrentDimension = "Correr"
TemperatureDimension = "La temperatura"
AmountOfSubstanceDimension = "cantidad de materia"
LuminousIntensityDimension = "Intensidad de luz"
FrequencyDimension = "Frecuencia"
ForceDimension = "Fuerza"
PressureDimension = "Presión"
EnergyDimension = "Energía"
PowerDimension = "Potencia"
ElectricChargeDimension = "Carga eléctrica"
ElectricPotentialDimension = "Potencial eléctrico"
ElectricCapacitanceDimension = "Capacidad eléctrica"
ElectricResistanceDimension = "Resistencia eléctrica"
ElectricConductanceDimension = "conductancia eléctrica"
MagneticFluxDimension = "flujo magnético"
MagneticFieldDimension = "Campo magnético"
InductanceDimension = "Inductancia"
CatalyticActivityDimension = "Actividad catalítica"
SurfaceDimension = "Superficie"
VolumeDimension = "Volumen"
SpeedDimension = "Velocidad"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminant"
OnlyRoot = "Racine"
FirstRoot = "Première racine"
SecondRoot = "Seconde racine"
TimeDimension = "Temps"
DistanceDimension = "Distance"
MassDimension = "Masse"
CurrentDimension = "Courant"
TemperatureDimension = "Température"
AmountOfSubstanceDimension = "Quantité de matière"
LuminousIntensityDimension = "Intensité lumineuse"
FrequencyDimension = "Fréquence"
ForceDimension = "Force"
PressureDimension = "Pression"
EnergyDimension = "Énergie"
PowerDimension = "Puissance"
ElectricChargeDimension = "Charge électrique"
ElectricPotentialDimension = "Potentiel électrique"
ElectricCapacitanceDimension = "Capacité électrique"
ElectricResistanceDimension = "Résistance électrique"
ElectricConductanceDimension = "Conductance électrique"
MagneticFluxDimension = "Flux magnétique"
MagneticFieldDimension = "Champ magnétique"
InductanceDimension = "Inductance"
CatalyticActivityDimension = "Activité catalytique"
SurfaceDimension = "Surface"
VolumeDimension = "Volume"
SpeedDimension = "Vitesse"

View File

@@ -1,44 +1,20 @@
CalculApp = "Számolás"
CalculAppCapital = "SZÁMOLÁS"
AdditionalResults = "További eredmények"
DecimalBase = "Decimális"
HexadecimalBase = "Hexadecimális"
BinaryBase = "Bináris"
PrimeFactors = "Alapvetö tényezök"
MixedFraction = "Vegyes frakció"
EuclideanDivision = "Euklideszi osztás"
AdditionalDeterminant = "Meghatározó"
AdditionalInverse = "inverz"
AdditionalRowEchelonForm = "Sor echelon forma"
AdditionalReducedRowEchelonForm = "Csökkentett sorú Echelon forma"
AdditionalTrace = "Nyomkövetés"
CanonicalForm = "Kanonikus forma"
FactorizedForm = "Factorizált forma"
Discriminant = "Discriminant"
OnlyRoot = "Gyökér"
FirstRoot = "Első gyökér"
CalculApp = "Számolás"
CalculAppCapital = "SZÁMOLÁS"
AdditionalResults = "További eredmények"
DecimalBase = "Decimális"
HexadecimalBase = "Hexadecimális"
BinaryBase = "Bináris"
PrimeFactors = "Alapvetö tényezök"
MixedFraction = "Vegyes frakció"
EuclideanDivision = "Euklideszi osztás"
AdditionalDeterminant = "Meghatározó"
AdditionalInverse = "inverz"
AdditionalRowEchelonForm = "Sor echelon forma"
AdditionalReducedRowEchelonForm = "Csökkentett sorú Echelon forma"
AdditionalTrace = "Nyomkövetés"
CanonicalForm = "Kanonikus forma"
FactorizedForm = "Factorizált forma"
Discriminant = "Discriminant"
OnlyRoot = "Gyökér"
FirstRoot = "Első gyökér"
SecondRoot = "Második gyökér"
TimeDimension = "Idő"
DistanceDimension = "Távolság"
MassDimension = "Tömeg"
CurrentDimension = "Futó"
TemperatureDimension = "Hőfok"
AmountOfSubstanceDimension = "Az anyag mennyisége"
LuminousIntensityDimension = "Fény intenzitása"
FrequencyDimension = "Frekvencia"
ForceDimension = "Erő"
PressureDimension = "Nyomás"
EnergyDimension = "Energia"
PowerDimension = "Erős"
ElectricChargeDimension = "Elektromos töltő"
ElectricPotentialDimension = "Elektromos potenciál"
ElectricCapacitanceDimension = "Elektromos kapacitás"
ElectricResistanceDimension = "Elektromos ellenállás"
ElectricConductanceDimension = "elektromos vezetőképesség"
MagneticFluxDimension = "mágneses fluxus"
MagneticFieldDimension = "Mágneses mező"
InductanceDimension = "Induktivitás"
CatalyticActivityDimension = "Katalitikus aktivitás"
SurfaceDimension = "Felület"
VolumeDimension = "Hangerő"
SpeedDimension = "Sebesség"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminante"
OnlyRoot = "Radice"
FirstRoot = "Prima radice"
SecondRoot = "Seconda radice"
TimeDimension = "Volta"
DistanceDimension = "Distanza"
MassDimension = "Messa"
CurrentDimension = "In esecuzione"
TemperatureDimension = "Temperatura"
AmountOfSubstanceDimension = "Quantità di materia"
LuminousIntensityDimension = "Intensità luminosa"
FrequencyDimension = "Frequenza"
ForceDimension = "Forza"
PressureDimension = "Pressione"
EnergyDimension = "Energia"
PowerDimension = "Potere"
ElectricChargeDimension = "Carica elettrica"
ElectricPotentialDimension = "Potenziale elettrico"
ElectricCapacitanceDimension = "Capacità elettrica"
ElectricResistanceDimension = "Resistenza elettrica"
ElectricConductanceDimension = "conduttanza elettrica"
MagneticFluxDimension = "flusso magnetico"
MagneticFieldDimension = "Campo magnetico"
InductanceDimension = "Induttanza"
CatalyticActivityDimension = "Attività catalitica"
SurfaceDimension = "Superficie"
VolumeDimension = "Volume"
SpeedDimension = "Velocità"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminant"
OnlyRoot = "Wortel"
FirstRoot = "Eerste wortel"
SecondRoot = "Tweede wortel"
TimeDimension = "Tijd"
DistanceDimension = "Afstand"
MassDimension = "Massa"
CurrentDimension = "Rennen"
TemperatureDimension = "Temperatuur"
AmountOfSubstanceDimension = "Hoeveelheid materie"
LuminousIntensityDimension = "Lichtsterkte"
FrequencyDimension = "Frequentie"
ForceDimension = "Kracht"
PressureDimension = "Druk"
EnergyDimension = "Energie"
PowerDimension = "Kracht"
ElectricChargeDimension = "Elektrische lading"
ElectricPotentialDimension = "elektrische potentiaal"
ElectricCapacitanceDimension = "elektrische capaciteit:"
ElectricResistanceDimension = "Elektrische weerstand"
ElectricConductanceDimension = "elektrische geleiding:"
MagneticFluxDimension = "magnetische flux"
MagneticFieldDimension = "Magnetisch veld"
InductanceDimension = "Inductie"
CatalyticActivityDimension = "Katalytische activiteit"
SurfaceDimension = "Oppervlak"
VolumeDimension = "Volume"
SpeedDimension = "Snelheid"

View File

@@ -18,27 +18,3 @@ Discriminant = "Discriminante"
OnlyRoot = "Raiz"
FirstRoot = "Primeira raiz"
SecondRoot = "Segunda raiz"
TimeDimension = "Tempo"
DistanceDimension = "Distância"
MassDimension = "Massa"
CurrentDimension = "Corrida"
TemperatureDimension = "Temperatura"
AmountOfSubstanceDimension = "Quantidade de matéria"
LuminousIntensityDimension = "Intensidade da luz"
FrequencyDimension = "Frequência"
ForceDimension = "Força"
PressureDimension = "Pressão"
EnergyDimension = "Energia"
PowerDimension = "Poderoso"
ElectricChargeDimension = "Carga elétrica"
ElectricPotentialDimension = "Potencial elétrico"
ElectricCapacitanceDimension = "Capacidade elétrica"
ElectricResistanceDimension = "Resistência elétrica"
ElectricConductanceDimension = "condutância elétrica"
MagneticFluxDimension = "fluxo magnético"
MagneticFieldDimension = "Campo magnético"
InductanceDimension = "Indutância"
CatalyticActivityDimension = "Atividade catalítica"
SurfaceDimension = "Superfície"
VolumeDimension = "Volume"
SpeedDimension = "Velocidade"

View File

@@ -7,6 +7,39 @@
#include "../exam_mode_configuration.h"
#include <assert.h>
#if defined _FXCG || defined NSPIRE_NEWLIB
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <apps/shared/global_context.h>
static KDCoordinate dummyHeight(::Calculation::Calculation * c, bool expanded) {
bool b;
Poincare::Layout l = c->createExactOutputLayout(&b);
if (!b) {
l=c->createInputLayout();
}
KDSize s = l.layoutSize();
const int bordersize = 10;
int h = s.height() + bordersize;
const int maxheight = 64;
if (h > maxheight) {
return maxheight;
}
return h;
}
extern void * last_calculation_history;
void * last_calculation_history = 0;
const char * retrieve_calc_history();
#endif
using namespace Poincare;
using namespace Shared;
@@ -21,10 +54,39 @@ CalculationStore::CalculationStore(char * buffer, int size) :
{
assert(m_buffer != nullptr);
assert(m_bufferSize > 0);
#if defined _FXCG || defined NSPIRE_NEWLIB
if (last_calculation_history == 0){
// Restore from scriptstore
const char * buf=retrieve_calc_history();
if (buf) {
Shared::GlobalContext globalContext;
char * ptr=(char *)buf;
for (;*ptr;) {
for (;*ptr;++ptr) {
if (*ptr=='\n') {
break;
}
}
char c = *ptr;
*ptr=0;
if (ptr > buf) {
push(buf,&globalContext, dummyHeight);
}
*ptr = c;
++ptr;
buf = ptr;
}
}
last_calculation_history = (void *) this;
}
#endif
}
// Returns an expiring pointer to the calculation of index i, and ignore the trash
ExpiringPointer<Calculation> CalculationStore::calculationAtIndex(int i) {
#if defined _FXCG || defined NSPIRE_NEWLIB
last_calculation_history = (void *) this;
#endif
if (m_trashIndex == -1 || i < m_trashIndex) {
return realCalculationAtIndex(i);
} else {

View File

@@ -1,6 +1,9 @@
#include "expression_field.h"
#include <poincare/symbol.h>
#include <poincare/horizontal_layout.h>
#include <poincare/code_point_layout.h>
using namespace Poincare;
namespace Calculation {
bool ExpressionField::handleEvent(Ion::Events::Event event) {
@@ -21,7 +24,30 @@ bool ExpressionField::handleEvent(Ion::Events::Event event) {
event == Ion::Events::EE)) {
handleEventWithText(Poincare::Symbol::k_ans);
}
return(::ExpressionField::handleEvent(event));
if (event == Ion::Events::Minus
&& isEditing()
&& fieldHasOnlyAMinus()) {
setText(Poincare::Symbol::k_ans);
}
return (::ExpressionField::handleEvent(event));
}
bool ExpressionField::fieldHasOnlyAMinus() const {
if (editionIsInTextField()) {
const char *inputBuffer = m_textField.draftTextBuffer();
return (inputBuffer[0] == '-' && inputBuffer[1] == '\0');
}
Layout layout = m_layoutField.layout();
if (layout.type() == LayoutNode::Type::HorizontalLayout && layout.numberOfChildren() == 1) {
Layout child = layout.childAtIndex(0);
if (child.type() == LayoutNode::Type::CodePointLayout) {
CodePointLayout &codePointLayout = static_cast<CodePointLayout &>(child);
if (codePointLayout.codePoint() == '-'){
return true;
}
}
}
return false;
}
}

View File

@@ -13,6 +13,8 @@ public:
}
protected:
bool handleEvent(Ion::Events::Event event) override;
private:
bool fieldHasOnlyAMinus() const;
};
}

View File

@@ -5,6 +5,12 @@
#include <ion/unicode/utf8_helper.h>
#include <apps/apps_container.h>
#if defined _FXCG || defined NSPIRE_NEWLIB
extern "C" int calculator;
extern "C" const int prizm_heap_size;
extern "C" char prizm_heap[];
#endif
namespace Code {
I18n::Message App::Descriptor::name() {
@@ -150,7 +156,17 @@ bool App::textInputDidReceiveEvent(InputEventHandler * textInput, Ion::Events::E
void App::initPythonWithUser(const void * pythonUser) {
if (!m_pythonUser) {
MicroPython::init(m_pythonHeap, m_pythonHeap + k_pythonHeapSize);
#if defined _FXCG || defined NSPIRE_NEWLIB
if (calculator == 1) { // fxcg50
MicroPython::init( (void *) 0x8c200000, (void *)(0x8c200000+ 0x2e0000));
} else if (calculator >= 1 && calculator <=4 ) {
MicroPython::init( prizm_heap, prizm_heap+prizm_heap_size);
} else {
#endif
MicroPython::init(m_pythonHeap, m_pythonHeap + k_pythonHeapSize);
#if defined _FXCG || defined NSPIRE_NEWLIB
}
#endif
}
m_pythonUser = pythonUser;
}

View File

@@ -1,5 +1,11 @@
PythonPound = "Kommentar"
PythonPercent = "Modulo"
PythonColon = "Doppelpunkt"
PythonSemicon = "Semikolon"
PythonExclamationMark = "Ausrufezeichen"
PythonLessThan = "Kleiner als"
PythonGreaterThan = "Größer als"
PythonQuestionMark = "Fragezeichen"
Python1J = "Imaginäres i"
PythonLF = "Zeilenvorschub"
PythonTab = "Tabulator"
@@ -256,3 +262,4 @@ PythonFileReadable = "Kann Datei gelesen werden?"
PythonFileWritable = "Kann Datei geschrieben werden?"
PythonImportUtils = "Importieren von ulab.utils"
PythonUtilsFunction = "Funktionspräfix des utils-Moduls"
PythonTurtleBgcolor = "Ändern Sie die Hintergrundfarbe"

View File

@@ -1,5 +1,11 @@
PythonPound = "Comment"
PythonPercent = "Modulo"
PythonColon = "Colon"
PythonSemicon = "Semicolon"
PythonExclamationMark = "Exclamation mark"
PythonLessThan = "Less than"
PythonGreaterThan = "Greater than"
PythonQuestionMark = "Question mark"
Python1J = "Imaginary i"
PythonLF = "Line feed"
PythonTab = "Tabulation"
@@ -256,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file"
PythonFileWritable = "Tells if write can be used on a file"
PythonImportUtils = "Importing ulab.utils"
PythonUtilsFunction = "utils module function prefix"
PythonTurtleBgcolor = "Change the background color"

View File

@@ -1,5 +1,11 @@
PythonPound = "Comment"
PythonPercent = "Modulo"
PythonColon = "Colon"
PythonSemicon = "Semicolon"
PythonExclamationMark = "Exclamation mark"
PythonLessThan = "Less than"
PythonGreaterThan = "Greater than"
PythonQuestionMark = "Question mark"
Python1J = "Imaginary i"
PythonLF = "Line feed"
PythonTab = "Tabulation"
@@ -256,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file"
PythonFileWritable = "Tells if write can be used on a file"
PythonImportUtils = "Importando ulab.utils"
PythonUtilsFunction = "prefijo de función del módulo utils"
PythonTurtleBgcolor = "Cambiar el color de fondo"

View File

@@ -1,5 +1,11 @@
PythonPound = "Commentaire"
PythonPercent = "Modulo"
PythonColon = "Deux-points"
PythonSemicon = "Point-virgule"
PythonExclamationMark = "Point d'exclamation"
PythonLessThan = "Inférieur à"
PythonGreaterThan = "Supérieur à"
PythonQuestionMark = "Point d'interrogation"
Python1J = "i complexe"
PythonLF = "Saut à la ligne"
PythonTab = "Tabulation"
@@ -206,6 +212,7 @@ PythonTurtleBackward = "Recule de x pixels"
PythonTurtleCircle = "Cercle de rayon r pixels"
PythonTurtleColor = "Modifie la couleur du tracé"
PythonTurtleColorMode = "Met le mode de couleur à 1.0 ou 255"
PythonTurtleBgcolor = "Modifie la couleur du fond"
PythonTurtleForward = "Avance de x pixels"
PythonTurtleFunction = "Préfixe fonction du module turtle"
PythonTurtleGoto = "Va au point de coordonnées (x,y)"

View File

@@ -1,5 +1,11 @@
PythonPound = "Megjegyzés"
PythonPercent = "Modulo"
PythonColon = "Kettőspont"
PythonSemicon = "Pontosvessző"
PythonExclamationMark = "Felkiáltójel"
PythonLessThan = "Kisebb mint"
PythonGreaterThan = "Nagyobb mint"
PythonQuestionMark = "Kérdőjel"
Python1J = "Képzeletbeli i"
PythonLF = "Enter"
PythonTab = "Táblázat"
@@ -256,3 +262,4 @@ PythonKeyAns = "ANS kulcs"
PythonKeyExe = "EXE kulcs"
PythonImportUtils = "Az ulab.utils importálása"
PythonUtilsFunction = "utils modul függvény előtagja"
PythonTurtleBgcolor = "Módosítsa a háttérszínt"

View File

@@ -1,5 +1,11 @@
PythonPound = "Commento"
PythonPercent = "Modulo"
PythonColon = "Due punti"
PythonSemicon = "Punto e virgola"
PythonExclamationMark = "Punto esclamativo"
PythonLessThan = "Minore di"
PythonGreaterThan = "Maggiore di"
PythonQuestionMark = "Punto interrogativo"
Python1J = "Unità immaginaria"
PythonLF = "Nuova riga"
PythonTab = "Tabulazione"
@@ -25,7 +31,7 @@ PythonBin = "Converte un intero in binario"
PythonCeil = "Parte intera superiore"
PythonChoice = "Numero aleatorio nella lista"
PythonClear = "Svuota la lista"
PythonCmathFunction = "Funz. prefissata modulo cmath"
PythonCmathFunction = "Prefisso funzione del modulo cmath"
PythonColor = "Definisci un colore rvb"
PythonColorBlack = "Colore nero"
PythonColorBlue = "Colore blu"
@@ -63,7 +69,7 @@ PythonFloor = "Parte intera"
PythonFmod = "a modulo b"
PythonFrExp = "Mantissa ed esponente di x : (m,e)"
PythonGamma = "Funzione gamma"
PythonGetKeys = "Premere i tasti"
PythonGetKeys = "Ottieni i tasti premuti"
PythonGetPalette = "Ottieni la tavolozza del tema"
PythonGetPixel = "Restituisce colore del pixel(x,y)"
PythonGetrandbits = "Numero aleatorio con k bit"
@@ -82,25 +88,25 @@ PythonImportTurtle = "Importa del modulo turtle"
PythonImportTime = "Importa del modulo time"
PythonImportOs = "Importa modulo os"
PythonOsUname = "Ottieni informazioni sul sistema"
PythonOsGetlogin = "Get username"
PythonOsGetlogin = "Ottieni username"
PythonOsRemove = "Rimuovere un file"
PythonOsRename = "Rinomina file"
PythonOsListdir = "Elenca file"
PythonImportSys = "Importa modulo sys"
PythonSysExit = "Terminate current program"
PythonSysPrintexception = "Print exception"
PythonSysByteorder = "The byte order of the system"
PythonSysImplementation = "Information about Python"
PythonSysModules = "Dictionary of loaded modules"
PythonSysVersion = "Python language version (string)"
PythonSysVersioninfo = "Python language version (tuple)"
PythonSysExit = "Termina programma corrente"
PythonSysPrintexception = "Stampa eccezione"
PythonSysByteorder = "Ordine di byte del sistema"
PythonSysImplementation = "Informazioni su Python"
PythonSysModules = "Dizionario dei moduli caricati"
PythonSysVersion = "Versione linguaggio Python (stringa)"
PythonSysVersioninfo = "Versione linguaggio Python (tupla)"
PythonIndex = "Indice prima occorrenza di x"
PythonInput = "Inserire un valore"
PythonInsert = "Inserire x in posizione i-esima"
PythonInt = "Conversione in intero"
PythonIonFunction = "Prefisso di funzione modulo ion"
PythonIsFinite = "Testa se x è finito"
PythonIsInfinite = "Testa se x est infinito"
PythonIsInfinite = "Testa se x è infinito"
PythonIsKeyDown = "Restituisce True premendo tasto k"
PythonBattery = "Restituisce la tensione della batteria"
PythonBatteryLevel = "Restituisce il livello della batteria"
@@ -236,23 +242,24 @@ PythonTurtleShowturtle = "Mostra la tartaruga"
PythonTurtleSpeed = "Velocità di disegno (x tra 0 e 10)"
PythonTurtleWrite = "Mostra un testo"
PythonUniform = "Numero decimale tra [a,b]"
PythonImportTime = "Import time module"
PythonMonotonic = "Return monotonic time"
PythonFileOpen = "Opens a file"
PythonFileSeekable = "Tells if seek can be used on a file"
PythonFileSeek = "Move file's cursor"
PythonFileTell = "Get file's cursor location"
PythonFileClose = "Closes a file"
PythonFileClosed = "True if file was closed"
PythonFileRead = "Read up to size bytes"
PythonFileWrite = "Write b into file"
PythonFileReadline = "Reads a line or up to size bytes"
PythonFileReadlines = "Reads a list of lines"
PythonFileTruncate = "Resize the file to size"
PythonFileWritelines = "Writes a list of lines"
PythonFileName = "Contains file's name"
PythonFileMode = "Contains file's open mode"
PythonFileReadable = "Tells if read can be used on a file"
PythonFileWritable = "Tells if write can be used on a file"
PythonImportTime = "Importa modulo time"
PythonMonotonic = "Restituisce tempo monotonico"
PythonFileOpen = "Apre un file"
PythonFileSeekable = "Dice se si può usare il cursore su un file"
PythonFileSeek = "Sposta cursore di un file"
PythonFileTell = "Ottieni posizione del cursore del file"
PythonFileClose = "Chiude un file"
PythonFileClosed = "True se un file è stato chiuso"
PythonFileRead = "Legge fino ai byte di un file"
PythonFileWrite = "Scrive b in un file"
PythonFileReadline = "Legge una riga o fino ai byte di un file"
PythonFileReadlines = "Legge una lista di linee di un file"
PythonFileTruncate = "Ridimensiona il file"
PythonFileWritelines = "Scrive una lista di linee su file"
PythonFileName = "Contiene il nome del file"
PythonFileMode = "Contiene la modalità di apertura del file"
PythonFileReadable = "Dice se si può leggere sul file"
PythonFileWritable = "Dice se si può scrivere sul file"
PythonImportUtils = "Importazione di ulab.utils"
PythonUtilsFunction = "prefisso della funzione del modulo utils"
PythonUtilsFunction = "Prefisso funzione del modulo utils"
PythonTurtleBgcolor = "Cambia il colore dello sfondo"

View File

@@ -1,5 +1,11 @@
PythonPound = "Opmerkingen"
PythonPercent = "Modulo"
PythonColon = "Dubbele punt"
PythonSemicon = "Puntkomma"
PythonExclamationMark = "Uitroepteken"
PythonLessThan = "Kleiner dan"
PythonGreaterThan = "Groter dan"
PythonQuestionMark = "Vraagteken"
Python1J = "Imaginaire i"
PythonLF = "Nieuwe regel"
PythonTab = "Tabulatie"
@@ -257,3 +263,4 @@ PythonFileReadable = "Tells if read can be used on a file"
PythonFileWritable = "Tells if write can be used on a file"
PythonImportUtils = "Ulab.utils importeren"
PythonUtilsFunction = "utils module functie prefix"
PythonTurtleBgcolor = "Verander de achtergrondkleur"

View File

@@ -1,5 +1,11 @@
PythonPound = "Comentário"
PythonPercent = "Módulo"
PythonColon = "Dois pontos"
PythonSemicon = "Ponto e vírgula"
PythonExclamationMark = "Ponto de exclamação"
PythonLessThan = "Menor que"
PythonGreaterThan = "Maior que"
PythonQuestionMark = "Ponto de interrogação"
Python1J = "i Complexo"
PythonLF = "Nova linha"
PythonTab = "Tabulação"
@@ -256,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file"
PythonFileWritable = "Tells if write can be used on a file"
PythonImportUtils = "Importando ulab.utils"
PythonUtilsFunction = "prefixo de função do módulo utils"
PythonTurtleBgcolor = "Alterar a cor de fundo"

View File

@@ -1,6 +1,12 @@
PythonCommandAmpersand = "&"
PythonCommandLF = "\\n"
PythonCommandPercent = "%"
PythonCommandColon = ":"
PythonCommandSemicon = ";"
PythonCommandExclamationMark = "!"
PythonCommandLessThan = "<"
PythonCommandGreaterThan = ">"
PythonCommandQuestionMark = "?"
PythonCommandPound = "#"
PythonCommandSingleQuote = "'x'"
PythonCommandSymbolExp = "^"
@@ -398,6 +404,7 @@ PythonTurtleCommandBackward = "backward(x)"
PythonTurtleCommandCircle = "circle(r)"
PythonTurtleCommandColor = "color('c')"
PythonTurtleCommandColorMode = "colormode(x)"
PythonTurtleCommandBgcolor = "bgcolor('c')"
PythonTurtleCommandForward = "forward(x)"
PythonTurtleCommandGoto = "goto(x,y)"
PythonTurtleCommandHeading = "heading()"

View File

@@ -19,7 +19,7 @@ void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::setLine(Consol
void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::drawRect(KDContext * ctx, KDRect rect) const {
ctx->fillRect(bounds(), Palette::CodeBackground);
ctx->drawString(m_line->text(), KDPointZero, GlobalPreferences::sharedGlobalPreferences()->font(), textColor(m_line), isHighlighted()? Palette::Select : Palette::BackgroundApps);
ctx->drawString(m_line->text(), KDPointZero, GlobalPreferences::sharedGlobalPreferences()->font(), textColor(m_line), isHighlighted()? Palette::Select : Palette::CodeBackground);
}
KDSize ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::minimalSizeForOptimalDisplay() const {

View File

@@ -338,6 +338,7 @@ const ToolboxMessageTree TurtleModuleChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandHideturtle, I18n::Message::PythonTurtleHideturtle, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColor, I18n::Message::PythonTurtleColor),
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColorMode, I18n::Message::PythonTurtleColorMode),
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandBgcolor, I18n::Message::PythonTurtleBgcolor),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorBlue, I18n::Message::PythonColorBlue, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorRed, I18n::Message::PythonColorRed, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorGreen, I18n::Message::PythonColorGreen, false),
@@ -503,6 +504,15 @@ const ToolboxMessageTree modulesChildren[] = {
const ToolboxMessageTree catalogChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPound, I18n::Message::PythonPound, false),
#ifdef _FXCG
// There is no question mark button on the fx-CG calculators
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColon, I18n::Message::PythonColon, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSemicon, I18n::Message::PythonSemicon, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandExclamationMark, I18n::Message::PythonExclamationMark, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLessThan, I18n::Message::PythonLessThan, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGreaterThan, I18n::Message::PythonGreaterThan, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandQuestionMark, I18n::Message::PythonQuestionMark, false),
#endif
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandPercent, I18n::Message::PythonPercent, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommand1J, I18n::Message::Python1J, false),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLF, I18n::Message::PythonLF, false),
@@ -533,6 +543,7 @@ const ToolboxMessageTree catalogChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCmathFunction, I18n::Message::PythonCmathFunction, false, I18n::Message::PythonCommandCmathFunctionWithoutArg),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColor, I18n::Message::PythonColor),
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColorMode, I18n::Message::PythonTurtleColorMode),
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandBgcolor, I18n::Message::PythonTurtleBgcolor),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandComplex, I18n::Message::PythonComplex),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCopySign, I18n::Message::PythonCopySign),
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCos, I18n::Message::PythonCos),

View File

@@ -10,7 +10,7 @@ public:
constexpr ScriptTemplate(const char * name, const char * value) : m_name(name), m_value(value) {}
static const ScriptTemplate * Empty();
const char * name() const { return m_name; }
const char * content() const { return m_value;}
const char * content() const { return m_value + Script::StatusSize(); }
const char * value() const { return m_value; }
private:
const char * m_name;

View File

@@ -2,9 +2,9 @@ Functions = "Funzioni"
Catalog = "Catalogo"
Modules = "Moduli"
LoopsAndTests = "Cicli e test"
Files = "Files"
Exceptions = "Exceptions"
Files = "File"
Exceptions = "Eccezioni"
UlabDocumentation = "Documentazione"
IonSelector = "Selettore a chiave"
IonSelector = "Selettore tasti"
PressAKey = "Premi un tasto"
IonKeyList = "Elenco delle chiavi"
IonKeyList = "Elenco dei tasti"

View File

@@ -1,6 +1,15 @@
#include <extapp_api.h>
#if defined _FXCG || defined NSPIRE_NEWLIB
// On the port, we use the Built-in file manager to import files.
void host_filemanager();
void extapp_main() {
host_filemanager();
}
#else
// Elsewhere, just draw a rectangle to test the extapp API.
void extapp_main() {
extapp_pushRectUniform(10, 10, LCD_WIDTH-20, LCD_HEIGHT-20, 0);
extapp_msleep(1000);
}
#endif

View File

@@ -1,9 +1,9 @@
ExternalApp = "External"
ExternalAppCapital = "EXTERNAL"
ExternalAppApiMismatch = "API mismatch"
ExternalAppExecError = "Cannot execute file"
ExternalNotCompatible = "External is not compatible"
WithSimulator = "with the simulator"
WithN0100 = "with n0100"
GetMoreAppsAt = "Get more apps at"
NoAppsInstalled = "No apps installed"
ExternalApp = "Esterna"
ExternalAppCapital = "ESTERNA"
ExternalAppApiMismatch = "Discordanza di API"
ExternalAppExecError = "Impossibile eseguire file"
ExternalNotCompatible = "Esterna non compatibile"
WithSimulator = "con il simulatore"
WithN0100 = "con n0100"
GetMoreAppsAt = "Ottieni altre app a"
NoAppsInstalled = "Nessuna app installata"

View File

@@ -27,7 +27,7 @@
#define SCANCODE_OK ((uint64_t)1 << 4)
#define SCANCODE_Back ((uint64_t)1 << 5)
#define SCANCODE_Home ((uint64_t)1 << 6)
#define SCANCODE_OnOff (((uint64_t)1 << 7) || ((uint64_t)1 << 8))
#define SCANCODE_OnOff (((uint64_t)1 << 7) | ((uint64_t)1 << 8))
#define SCANCODE_Shift ((uint64_t)1 << 12)
#define SCANCODE_Alpha ((uint64_t)1 << 13)
#define SCANCODE_XNT ((uint64_t)1 << 14)

View File

@@ -36,6 +36,8 @@ public:
void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; }
bool syntaxhighlighting() const { return m_syntaxhighlighting; }
void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; }
bool clearShift() const { return m_clearshift; }
void setClearShift(bool clearalphashift) { m_clearshift = clearalphashift; }
int brightnessLevel() const { return m_brightnessLevel; }
void setBrightnessLevel(int brightnessLevel);
const KDFont * font() const { return m_font; }
@@ -63,6 +65,7 @@ private:
m_dfuUnlocked(false),
m_autoComplete(true),
m_syntaxhighlighting(true),
m_clearshift(true),
m_brightnessLevel(Ion::Backlight::MaxBrightness),
m_idleBeforeSuspendSeconds(55),
m_idleBeforeDimmingSeconds(45),
@@ -80,6 +83,7 @@ private:
bool m_dfuUnlocked;
bool m_autoComplete;
bool m_syntaxhighlighting;
bool m_clearshift;
int m_brightnessLevel;
int m_idleBeforeSuspendSeconds;
int m_idleBeforeDimmingSeconds;

View File

@@ -18,7 +18,13 @@ public:
* 10.0938275501223 which are hopefully rare enough.
* TODO: The drawCurve algorithm should use the derivative function to know
* how fast the function moves... */
#ifndef _FXCG
static constexpr float k_graphStepDenominator = 10.0938275501223f;
#else
// This value rounded down has to be a factor of the horizontal resolution / 2
// On the Casio calculator the resolution is 396 pixels, so 11 is close but works
static constexpr float k_graphStepDenominator = 11.0938275501223f;
#endif
GraphView(Shared::InteractiveCurveViewRange * graphRange,
Shared::CurveViewCursor * cursor, Shared::BannerView * bannerView, Shared::CursorView * cursorView);

View File

@@ -17,12 +17,13 @@ i18n_files += $(call i18n_without_universal_for,home/base)
SFLAGS += -I$(BUILD_DIR)
apps_layout = apps/home/apps_layout.csv
apps_layout_list = $(foreach i, $${EPSILON_APPS}, $(if $(filter external, $(i)),,"$(i),"))
$(eval $(call rule_for, \
APPS_LAYOUT, \
apps/home/apps_layout.cpp, \
, \
$$(PYTHON) apps/home/apps_layout.py --layouts $(apps_layout) --header $$(subst .cpp,.h,$$@) --implementation $$@ --apps $$(EPSILON_APPS), \
$$(PYTHON) apps/home/apps_layout.py --layouts $(apps_layout) --header $$(subst .cpp,.h,$$@) --implementation $$@ --apps $$(EPSILON_APPS) --apps_layout $(apps_layout_list), \
global \
))

View File

@@ -12,9 +12,18 @@ parser.add_argument('--header', help='the .h file to generate')
parser.add_argument('--implementation', help='the .cpp file to generate')
parser.add_argument('--apps', nargs='+', help='apps that are actually compiled')
parser.add_argument('--layouts', help='the apps_layout.csv file')
parser.add_argument('--apps_layout', help='the apps_layout from the make command')
args = parser.parse_args()
with io.open(args.layouts, "w", encoding="utf-8") as f:
ordered = args.apps_layout.split()
line1 = 'Default,'+','.join(ordered)+'\n'
line2 = 'HidePython,'+','.join(ordered)+'\n'
after = line1 + line2
f.truncate()
f.write(after)
def build_permutation(apps, appsOrdered):
res = [0] * len(apps)
i = 0
@@ -29,6 +38,8 @@ def parse_config_file(layouts, apps):
with io.open(layouts, "r", encoding="utf-8") as f:
csvreader = csv.reader(f, delimiter=',')
for row in csvreader:
for stg in row:
stg.strip()
res['styles'].append(row[0])
res['permutations'].append(build_permutation(apps, row[1:]))
return res

View File

@@ -75,7 +75,7 @@ Controller::Controller(Responder * parentResponder, SelectableTableViewDataSourc
m_view.backgroundView()->setDefaultColor(Palette::HomeBackground);
#ifdef HOME_DISPLAY_EXTERNALS
int index = External::Archive::indexFromName("wallpaper.obm");
if(index > -1) {
@@ -86,6 +86,13 @@ Controller::Controller(Responder * parentResponder, SelectableTableViewDataSourc
#endif
}
static constexpr Ion::Events::Event home_fast_navigation_events[] = {
Ion::Events::Seven, Ion::Events::Eight, Ion::Events::Nine,
Ion::Events::Four, Ion::Events::Five, Ion::Events::Six,
Ion::Events::One, Ion::Events::Two, Ion::Events::Three,
Ion::Events::Zero, Ion::Events::Dot, Ion::Events::EE
};
bool Controller::handleEvent(Ion::Events::Event event) {
if (event == Ion::Events::OK || event == Ion::Events::EXE) {
AppsContainer * container = AppsContainer::sharedAppsContainer();
@@ -143,6 +150,21 @@ bool Controller::handleEvent(Ion::Events::Event event) {
return m_view.selectableTableView()->selectCellAtLocation(numberOfColumns() - 1, selectionDataSource()->selectedRow() - 1);
}
// Handle fast home navigation
for(int i = 0; i < std::min((int) (sizeof(home_fast_navigation_events) / sizeof(Ion::Events::Event)), this->numberOfIcons()); i++) {
if (event == home_fast_navigation_events[i]) {
int row = i / k_numberOfColumns;
int column = i % k_numberOfColumns;
// Get if app is already selected
if (selectionDataSource()->selectedRow() == row && selectionDataSource()->selectedColumn() == column) {
// If app is already selected, launch it
return handleEvent(Ion::Events::OK);
}
// Else, select the app
return m_view.selectableTableView()->selectCellAtLocation(column, row);
}
}
return false;
}
@@ -254,7 +276,7 @@ void Controller::tableViewDidChangeSelection(SelectableTableView * t, int previo
* (so the previous one is always visible). */
int appIndex = (t->selectedColumn()+t->selectedRow()*k_numberOfColumns)+1;
if (appIndex >= this->numberOfIcons()+1) {
t->selectCellAtLocation((this->numberOfIcons()%3)-1, (this->numberOfIcons() / k_numberOfColumns));
t->selectCellAtLocation((this->numberOfIcons()%k_numberOfColumns)-1, (this->numberOfIcons() / k_numberOfColumns));
}
}

View File

@@ -47,10 +47,19 @@ private:
static constexpr KDCoordinate k_sideMargin = 4;
static constexpr KDCoordinate k_bottomMargin = 14;
static constexpr KDCoordinate k_indicatorMargin = 61;
#ifndef _FXCG
static constexpr int k_numberOfColumns = 3;
static constexpr int k_maxNumberOfCells = 16;
static constexpr int k_cellHeight = 104;
static constexpr int k_cellWidth = 104;
#else
// A different screen resolution so different dimensions
static constexpr int k_numberOfColumns = 4;
static constexpr int k_cellHeight = 96;
static constexpr int k_cellWidth = 97;
#endif
static constexpr int k_maxNumberOfCells = 16;
ContentView m_view;
AppCell m_cells[k_maxNumberOfCells];
App * m_app;

859
apps/host_filemanager.cpp Normal file
View File

@@ -0,0 +1,859 @@
// #include <apps/home/apps_layout.h>
// // #include "../apps_container.h"
// #include "stddef.h"
// #include "string.h"
// #include "math.h"
// #include "app.h"
#include <apps/home/apps_layout.h>
#include "apps_container.h"
#include "global_preferences.h"
// #include "../exam_mode_configuration.h"
extern "C" {
#include <assert.h>
}
#ifdef NSPIRE_NEWLIB
const char * storage_name="/documents/nwstore.nws.tns";
#else
const char * storage_name="nwstore.nws";
#endif
const char * calc_storage_name="nwcalc.txt";
void * storage_address(); // ion/src/simulator/shared/platform_info.cpp
const char * retrieve_calc_history();
#if defined _FXCG || defined NSPIRE_NEWLIB
bool save_calc_history();
void display_host_help();
int load_state(const char * fname);
#endif
// Additional code by B. Parisse for host file system support and persistence
// on Casio Graph 90/FXCG50 and TI Nspire
void erase_record(const char * name){
unsigned char * ptr=(unsigned char *)storage_address();
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
if (L==0) return;
if (strcmp((const char *)ptr+2,name)==0){
unsigned char * newptr=ptr;
int S=0,erased=L;
ptr+=L;
for (;;){
L=ptr[1]*256+ptr[0];
if (L==0){
for (int i=0;i<erased;++i)
newptr[S+i]=0;
break;
}
// if (ptr>newptr+S)
memmove(newptr+S,ptr,L);
S+=L;
ptr+=L;
}
return;
}
ptr+=L;
}
}
// record filtering on read
void filter(unsigned char * ptr){
unsigned char * newptr=ptr;
int S; ptr+=4;
for (S=4;;){
size_t L=ptr[1]*256+ptr[0];
if (L==0) break;
int l=strlen((const char *)ptr+2);
// filter py records
if (l>3 && strncmp((const char *)ptr+2+l-3,".py",3)==0){
// if (ptr>newptr+S)
memmove(newptr+S,ptr,L);
S+=L;
}
#if 0 // def STRING_STORAGE
if (l>5 && strncmp((const char *)ptr+2+l-5,".func",5)==0){
int shift=l+4+13;
Ion::Storage::Record * record=(Ion::Storage::Record *)malloc(1024);
memcpy(record,ptr,L);
//ExpressionModelHandle
Poincare::Expression e=Poincare::Expression::Parse((const char *)ptr+shift,NULL);
//ExpressionModel::setContent(Ion::Storage::Record * record, const char * c, Context * context, CodePoint symbol);
Shared::ExpressionModel md;
Ion::Storage::Record::ErrorStatus err=md.setExpressionContent(record, e);
if (1){
// if (ptr>newptr+S)
int newL=record->value().size;
memmove(newptr+S,record,newL);
S+=newL;
}
free(record);
}
#endif
ptr+=L;
}
}
#ifdef NSPIRE_NEWLIB
#include "../../ion/src/simulator/fxcg/platform.h"
#include "../../ion/src/simulator/fxcg/menuHandler.h"
#include <ion/storage.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <vector>
#include <string>
#include <ion.h>
#include <ion/events.h>
#include "../../ion/src/simulator/nspire/k_csdk.h"
#include "../calculation/calculation_store.h"
#define C_WHITE SDK_WHITE
#define C_BLACK SDK_BLACK
#define C_RED (31<<11)
int do_getkey(){
os_wait_1ms(50);
return getkey(0);
}
void dtext(int x,int y,int fg,const char * s){
os_draw_string_medium(x,y,fg,SDK_WHITE,s);
}
void dclear(int c){
os_fill_rect(0,0,LCD_WIDTH_PX,LCD_HEIGHT_PX,c);
}
void dupdate(){
sync_screen();
}
const int storage_length=60000; // 60000 in Upsilon, 32768 in Epsilon
// k_storageSize = 60000; in ion/include/ion/internal_storage.h
extern void * last_calculation_history;
int load_state(const char * fname){
FILE * f=fopen(fname,"rb");
if (f){
unsigned char * ptr=(unsigned char *)storage_address();
fread(ptr,1,storage_length,f);
fclose(f);
#ifdef FILTER_STORE
filter(ptr);
#endif
return 1;
}
return 0;
}
int save_state(const char * fname){
save_calc_history();
if (1 || Ion::Storage::sharedStorage()->numberOfRecords()){
const unsigned char * ptr=(const unsigned char *)storage_address();
// find store size
int S=4;
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
ptr+=L;
S+=L;
if (L==0) break;
}
S = ((S+1023)/1024)*1024;
#ifdef FILTER_STORE
// keep only python scripts
unsigned char * newptr=(unsigned char *) malloc(S);
bzero(newptr,S);
ptr=(const unsigned char *) storage_address();
memcpy(newptr,ptr,4); ptr+=4;
for (S=4;;){
size_t L=ptr[1]*256+ptr[0];
if (L==0) break;
int l=strlen((const char *)ptr+2);
if (l>3 && strncmp((const char *)ptr+2+l-3,".py",3)==0){
memcpy(newptr+S,ptr,L);
S+=L;
}
ptr+=L;
}
S = ((S+1023)/1024)*1024;
FILE * f;
f=fopen(fname,"wb");
if (f){
fwrite(newptr,S,1,f);
//fwrite(ptr+4,1,S-4,f);
fclose(f);
free(newptr);
return S;
}
free(newptr);
return 0;
#else
ptr=(const unsigned char *)storage_address();
FILE * f;
f=fopen(fname,"wb");
if (f){
fwrite(ptr,S,1,f);
//fwrite(ptr+4,1,S-4,f);
fclose(f);
return S;
}
return 0;
#endif
}
return 2;
}
#endif // NSPIRE_NEWLIB
#ifdef _FXCG
#include "../../ion/src/simulator/fxcg/platform.h"
#include "../../ion/src/simulator/fxcg/menuHandler.h"
#include "../calculation/calculation_store.h"
#include <ion/storage.h>
#include <gint/bfile.h>
#include <gint/display-cg.h>
#include <gint/gint.h>
#include <gint/display.h>
#include <gint/keyboard.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <vector>
#include <string>
#include <ion.h>
#include <ion/events.h>
#define KEY_CTRL_OK KEY_EXE
int do_getkey(){
return getkey().key;
}
const int storage_length=60000; // 60000 in Upsilon, 32768 in Epsilon
// k_storageSize = 60000; in ion/include/ion/internal_storage.h
extern void * last_calculation_history;
int load_state(const char * fname){
FILE * f=fopen(fname,"rb");
if (f){
unsigned char * ptr=(unsigned char *)storage_address();
ptr[3]=fgetc(f);
ptr[2]=fgetc(f);
ptr[1]=fgetc(f);
ptr[0]=fgetc(f);
fread(ptr+4,1,storage_length-4,f);
fclose(f);
return 1;
}
return 0;
}
int save_state(const char * fname){
save_calc_history();
if (Ion::Storage::sharedStorage()->numberOfRecords()){
#if 0
unsigned short pFile[512];
convert(fname,pFile);
int hf = BFile_Open(pFile, BFile_WriteOnly); // Get handle
// cout << hf << endl << "f:" << filename << endl; Console_Disp();
if (hf<0){
int l=storage_length;
BFile_Create(pFile,0,&l);
hf = BFile_Open(pFile, BFile_WriteOnly);
}
if (hf < 0)
return 0;
int l=BFile_Write(hf,storage_address(),storage_length);
BFile_Close(hf);
if (l==storage_length)
return 1;
return -1;
#else
const unsigned char * ptr=(const unsigned char *)storage_address();
// find store size
int S=4;
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
ptr+=L;
S+=L;
if (L==0) break;
}
S = ((S+1023)/1024)*1024;
FILE * f=fopen(fname,"wb");
if (f){
ptr=(const unsigned char *) storage_address();
fputc(ptr[3],f);
fputc(ptr[2],f);
fputc(ptr[1],f);
fputc(ptr[0],f);
//fwrite(ptr+4,1,S-4,f);
fwrite(ptr+4,S-4,1,f);
fclose(f);
return S;
}
return 0;
#endif
}
return 2;
}
#endif // _FXCG
const char * retrieve_calc_history(){
#if defined _FXCG || defined NSPIRE_NEWLIB
static bool firstrun=true;
if (firstrun){
#ifdef _FXCG
int l=gint_world_switch(GINT_CALL(load_state,storage_name));
#else
int l=load_state(storage_name);
#endif
if (l==0){
display_host_help();
// ((App*)m_app)->redraw();
}
firstrun=false;
}
#endif
unsigned char * ptr=(unsigned char *)storage_address();
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
if (L==0) return 0;
if (strcmp((const char *)ptr+2,calc_storage_name)==0){
const char * buf=(const char *)ptr+2+strlen(calc_storage_name)+1;
return buf;
}
ptr += L;
}
return 0;
}
#if defined _FXCG || defined NSPIRE_NEWLIB
bool save_calc_history(){
if (!last_calculation_history)
return false;
erase_record(calc_storage_name);
std::string s;
Calculation::CalculationStore * store=(Calculation::CalculationStore *) last_calculation_history;
int N=store->numberOfCalculations();
for (int i=N-1;i>=0;--i){
s += store->calculationAtIndex(i)->inputText();
s += '\n';
}
if (s.empty())
return false;
Ion::Storage::Record::ErrorStatus res= Ion::Storage::sharedStorage()->createRecordWithFullName(calc_storage_name,&s[0],s.size());
if (res==Ion::Storage::Record::ErrorStatus::NotEnoughSpaceAvailable)
return false;
return true;
}
void confirm_load_state(const char * buf){
dclear(C_WHITE);
dtext(1,1, C_BLACK, "Loading from state file");
dtext(1,17,C_BLACK,buf);
dtext(1,33,C_BLACK,"Current context will be lost!");
dtext(1,49,C_BLACK,"Press EXE to confirm");
dupdate();
int k=do_getkey();
if (k==KEY_EXE || k==KEY_CTRL_OK){
#ifdef _FXCG
int l=gint_world_switch(GINT_CALL(load_state,buf));
#else
int l=load_state(buf);
#endif
char buf2[]="0";
buf2[0] += l;
if (l==0)
dtext(1,65,C_BLACK,"Error reading state");
if (l==1)
dtext(1,65,C_BLACK,"Success reading state");
dtext(1,81,C_BLACK,buf2);
dtext(1,97,C_BLACK,"Press any key");
dupdate();
do_getkey();
}
}
static void convert(const char * fname,unsigned short * pFile){
for ( ;*fname;++fname,++pFile)
*pFile=*fname;
*pFile=0;
}
struct file {
std::string s;
int length;
bool isdir;
};
void host_scripts(std::vector<file> & v,const char * dirname,const char * extension){
v.clear();
file f={".._parent_dir",0,true};
if (strlen(dirname)>1)
v.push_back(f);
DIR *dp;
struct dirent *ep;
dp = opendir (dirname);
int l=extension?strlen(extension):0;
if (dp != NULL){
int t;
while ( (ep = readdir (dp)) ){
if (strlen(ep->d_name)>=1 && ep->d_name[0]=='.')
continue;
f.s=ep->d_name;
if (f.s=="@MainMem")
continue;
#ifdef NSPIRE_NEWLIB
DIR * chk=opendir((dirname+f.s).c_str());
f.isdir=true;
if (chk)
closedir(chk);
else
f.isdir=false;
#else
f.isdir=ep->d_type==DT_DIR;
#endif
#if 1
if (f.isdir)
f.length=0;
else {
struct stat st;
stat((dirname+f.s).c_str(), &st);
f.length = st.st_size;
if (f.length>=32768)
continue;
}
#else
f.length=f.isdir?0:-1;
#endif
if (f.isdir || !extension)
v.push_back(f);
else {
t=strlen(ep->d_name);
if (t>l && strncmp(ep->d_name+t-l,extension,l)==0)
v.push_back(f);
}
}
closedir (dp);
}
}
void nw_scripts(std::vector<file> & v,const char * extension){
v.clear();
#if 0
int n=Ion::Storage::sharedStorage()->numberOfRecords();
for (int i=0;i<n;++i){
v.push_back(Ion::Storage::sharedStorage()->recordAtIndex(i).fullName());
}
#else
const unsigned char * ptr=(const unsigned char *)storage_address();
int l=extension?strlen(extension):0;
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
ptr+=2;
if (L==0) break;
L-=2;
file f={(const char *)ptr,(int)L,false};
if (!extension)
v.push_back(f);
else {
int namesize=strlen((const char *)ptr);
if (namesize>l && strncmp((const char *)ptr+namesize-l,extension,l)==0)
v.push_back(f);
}
ptr+=L;
}
#endif
}
int copy_nw_to_host(const char * nwname,const char * hostname){
#ifdef NSPIRE_NEWLIB
int s=strlen(hostname);
if (s<4 || strncmp(hostname+s-4,".tns",4)){
std::string S(hostname);
S+=".tns";
return copy_nw_to_host(nwname,S.c_str());
}
#endif
const unsigned char * ptr=(const unsigned char *)storage_address();
for (ptr+=4;;){ // skip header
size_t L=ptr[1]*256+ptr[0];
if (L==0) return 3; // not found
//dclear(C_WHITE);
//dtext(1,1,C_BLACK,ptr+2);
//dtext(1,17,C_BLACK,nwname);
//dupdate();
//getkey();
if (strcmp((const char *)ptr+2,nwname)){
ptr += L;
continue;
}
ptr+=2;
L-=2;
int l=strlen((const char *)ptr);
ptr += l+2;
L -= l;
L = 2*((L+1)/2);
FILE * f=fopen(hostname,"wb");
if (!f)
return 2;
fwrite(ptr,1,L,f);
fclose(f);
return 0;
}
return 1;
}
int copy_host_to_nw(const char * hostname,const char * nwname,int autoexec){
FILE * f=fopen(hostname,"rb");
if (!f)
return -1;
std::vector<unsigned char> v(1,autoexec?1:0);
for (;;){
unsigned char c=fgetc(f);
if (feof(f)){
if (c>=' ' && c<=0x7e)
v.push_back(c);
break;
}
if (c==0xa && !v.empty() && v.back()==0xd)
v.back()=0xa;
else
v.push_back(c);
}
if (!v.empty() && v.back()!=0xa)
v.push_back(0xa);
v.push_back(0);
fclose(f);
if (Ion::Storage::sharedStorage()->hasRecord(Ion::Storage::sharedStorage()->recordNamed(nwname)))
Ion::Storage::sharedStorage()-> destroyRecord(Ion::Storage::sharedStorage()->recordNamed(nwname));
Ion::Storage::Record::ErrorStatus res= Ion::Storage::sharedStorage()->createRecordWithFullName(nwname,&v.front(),v.size());
if (res==Ion::Storage::Record::ErrorStatus::NotEnoughSpaceAvailable)
return -2;
return 0;
}
bool filesort(const file & a,const file & b){
if (a.isdir!=b.isdir)
return a.isdir;
return a.s<b.s;
}
void display_host_help();
void display_host_help(){
dclear(C_WHITE);
dtext(1,2, C_BLACK,"You can save up to 9 Upsilon calculator states:");
dtext(1,38,C_BLACK,"You can manage and exchange Upsilon records");
dtext(1,56,C_BLACK,"or restore states: from home, type VARS");
#ifdef _FXCG
dtext(1,20,C_BLACK,"From home, type STO (above AC/ON) then 1 to 9");
dtext(1,74,C_BLACK,"You can reset Upsilon state from Casio MENU");
dtext(1,92,C_BLACK,"Select Memory, type F2, then erase nwstore.nws");
dtext(1,110,C_RED, "From home, type MENU or DEL to leave Upsilon");
#else
dtext(1,20,C_BLACK,"From home, type STO (ctrl VAR) then 1 to 9");
dtext(1,74,C_BLACK,"You can reset Upsilon state from Home 2");
dtext(1,92,C_BLACK,"Erase nwstore.nws in My documents");
dtext(1,110,C_RED ,"Type Ctrl K to shutdown screen, ON to restore");
dtext(1,128,C_RED ,"From home, type ON or doc to leave Upsilon");
os_wait_1ms(100);
#endif
dtext(1,150,C_BLACK,"Upsilon: a fork of Epsilon (c) Numworks");
dtext(1,168,C_BLACK,"https://getupsilon.web.app/");
dtext(1,186,C_BLACK,"creativecommons.org license CC BY-NC-SA 4.0");
dtext(1,204,C_BLACK,"Persistance and host filesystem (c) B. Parisse");
dupdate();
do_getkey();
}
extern "C" void host_filemanager();
void host_filemanager(){
int posnw=0,startnw=0,poshost=0,starthost=0;
bool nw=true,reload=true;
std::vector<file> v,w;
#ifdef NSPIRE_NEWLIB
std::string hostdir="/documents/";
#else
std::string hostdir="/";
#endif
bool onlypy=true;
for (;;){
if (reload){
nw_scripts(v,onlypy?".py":0);
sort(v.begin(),v.end(),filesort);
#ifdef NSPIRE_NEWLIB
host_scripts(w,hostdir.c_str(),onlypy?".py.tns":0);
#else
host_scripts(w,hostdir.c_str(),onlypy?".py":0);
#endif
sort(w.begin(),w.end(),filesort);
reload=false;
}
dclear(C_WHITE);
dtext(1,1, C_BLACK,"EXIT: leave; key 1 to 9: load state from file");
#ifdef _FXCG
dtext(1,17,C_BLACK,"Cursor keys: move, /: rootdir, OPTN: all/py files");
#else
dtext(1,17,C_BLACK,"Cursor keys: move, /: rootdir");
#endif
dtext(1,33,C_BLACK,"EXE or STO key: copy selection from/to host");
dtext(1,49,C_BLACK,("Upsilon records Host "+hostdir).c_str());
int nitems=9;
if (posnw<0)
posnw=v.size()-1;
if (posnw>=int(v.size()))
posnw=0;
if (posnw<startnw || posnw>startnw+nitems)
startnw=posnw-4;
if (startnw>=int(v.size())-nitems)
startnw=v.size()-nitems;
if (startnw<0)
startnw=0;
if (v.empty())
nw=false;
for (int i=0;i<=nitems;++i){
int I=i+startnw;
if (I>=int(v.size()))
break;
dtext(1,65+16*i,(nw && I==posnw)?C_RED:C_BLACK,v[I].s.c_str());
char buf[256];
sprintf(buf,"%i",v[I].length);
dtext(90,65+16*i,(nw && I==posnw)?C_RED:C_BLACK,buf);
}
if (w.empty())
nw=true;
if (poshost<0)
poshost=w.size()-1;
if (poshost>=int(w.size()))
poshost=0;
if (poshost<starthost || poshost>starthost+nitems)
starthost=poshost-4;
if (starthost>=int(w.size())-nitems)
starthost=w.size()-nitems;
if (starthost<0)
starthost=0;
for (int i=0;i<=nitems;++i){
int I=i+starthost;
if (I>=int(w.size()))
break;
std::string fname=w[I].s;
if (fname.size()>16)
fname=fname.substr(0,16)+"...";
dtext(192,65+16*i,(!nw && I==poshost)?C_RED:C_BLACK,fname.c_str());
if (w[I].isdir)
dtext(154,65+16*i,(!nw && I==poshost)?C_RED:C_BLACK,"<dir>");
else {
char buf[256];
sprintf(buf,"%i",w[I].length);
#ifdef _FXCG
dtext(340,65+16*i,(!nw && I==poshost)?C_RED:C_BLACK,buf);
#else
dtext(285,65+16*i,(!nw && I==poshost)?C_RED:C_BLACK,buf);
#endif
}
}
dupdate();
int key=do_getkey();
if (key==KEY_EXIT || key==KEY_MENU)
break;
if (key==KEY_OPTN || key=='\t'){
onlypy=!onlypy;
reload=true;
continue;
}
if (key==KEY_DIV){
#ifdef NSPIRE_NEWLIB
hostdir="/documents/";
#else
hostdir="/";
#endif
reload=true;
continue;
}
if (key==KEY_DEL){
if (!nw && w[poshost].isdir) // can not remove directory
continue;
dclear(C_WHITE);
dtext(1,17,C_BLACK,nw?"About to suppress Upsilon record:":"About to suppress Host file:");
dtext(1,33,C_BLACK,(nw?v[posnw].s:w[poshost].s).c_str());
dtext(1,49,C_BLACK,"Press EXE or OK to confirm");
dupdate();
int ev=do_getkey();
if (ev!=KEY_EXE && ev!=KEY_CTRL_OK)
continue;
if (nw){
#if 1
erase_record(v[posnw].s.c_str());
#else
char buf[256];
strcpy(buf,v[posnw].s.c_str());
int l=strlen(buf)-4;
buf[l]=0;
Ion::Storage::sharedStorage()-> destroyRecordWithBaseNameAndExtension(buf,buf+l+1);
#endif
}
else
remove((hostdir+w[poshost].s).c_str());
reload=true;
}
if (key==KEY_LEFT){
nw=true;
continue;
}
if (key==KEY_RIGHT){
nw=false;
continue;
}
if (key==KEY_PLUS){
if (nw)
posnw+=5;
else
poshost+=5;
continue;
}
if (key==KEY_MINUS){
if (nw)
posnw-=5;
else
poshost-=5;
continue;
}
if (key==KEY_DOWN){
if (nw)
++posnw;
else
++poshost;
continue;
}
if (key==KEY_UP){
if (nw)
--posnw;
else
--poshost;
continue;
}
int autoexec = key==KEY_EXE || key==KEY_CTRL_OK;
if (key==KEY_STORE || autoexec){
if (nw && posnw>=0 && posnw<int(v.size())){
size_t i=0;
for (;i<w.size();++i){
if (v[posnw].s==w[i].s)
break;
}
if (i<w.size()){
dclear(C_WHITE);
if (w[i].isdir){
dtext(1,33,C_BLACK,"Can not overwrite a Host directory!");
dupdate();
do_getkey();
continue;
}
dtext(1,33,C_BLACK,"Script exists in Host directory!");
dtext(1,49,C_BLACK,"Press EXE to confirm overwrite");
dupdate();
int k=do_getkey();
if (k!=KEY_EXE && k!=KEY_CTRL_OK)
continue;
}
#ifdef _FXCG
int l=gint_world_switch(GINT_CALL(copy_nw_to_host,v[posnw].s.c_str(),(hostdir+v[posnw].s).c_str()));
#else
int l=copy_nw_to_host(v[posnw].s.c_str(),(hostdir+v[posnw].s).c_str());
#endif
char buf2[]="0";
buf2[0] = '0'+l;
dclear(C_WHITE);
dtext(1,65,C_BLACK,(hostdir+v[posnw].s).c_str());
dtext(1,81,C_BLACK,buf2);
dupdate();
if (l!=0)
do_getkey();
reload=true;
}
else if (!nw && poshost>=0 && poshost<int(w.size())){
if (w[poshost].s==".._parent_dir"){
// one level up
for (int j=hostdir.size()-2;j>=0;--j){
if (hostdir[j]=='/'){
hostdir=hostdir.substr(0,j+1);
break;
}
}
reload=true;
continue;
}
// lookup if poshost is in directories
if (w[poshost].isdir){
hostdir += w[poshost].s;
hostdir += "/";
reload=true;
continue;
}
size_t i;
std::string fname=w[poshost].s;
#ifdef NSPIRE_NEWLIB
if (fname.size()>4 && fname.substr(fname.size()-4,4)==".tns")
fname=fname.substr(0,fname.size()-4);
#endif
for (i=0;i<v.size();++i){
if (fname==v[i].s)
break;
}
if (i<v.size()){
dclear(C_WHITE);
dtext(1,33,C_BLACK,"Script exists in Upsilon!");
dtext(1,49,C_BLACK,"Press EXE to confirm overwrite");
dupdate();
int k=do_getkey();
if (k!=KEY_EXE && k!=KEY_CTRL_OK)
continue;
}
std::string nwname=fname;
if (fname.size()>12){
dclear(C_WHITE);
dtext(1,33,C_BLACK,"Host filename too long");
dtext(1,49,C_BLACK,fname.c_str());
dupdate();
do_getkey();
continue;
}
if (fname.size()>4 && fname.substr(fname.size()-4,4)==".nws")
confirm_load_state((hostdir+fname).c_str());
else {
#ifdef _FXCG
gint_world_switch(GINT_CALL(copy_host_to_nw,(hostdir+fname).c_str(),nwname.c_str(),autoexec));
#else
copy_host_to_nw((hostdir+w[poshost].s).c_str(),nwname.c_str(),autoexec);
#endif
}
reload=true;
}
}
if (key>=KEY_1 && key<=KEY_9){
#ifdef NSPIRE_NEWLIB
char buf[]="nwstate0.nws.tns";
#else
char buf[]="nwstate0.nws";
#endif
buf[7]='1'+(key-KEY_1);
confirm_load_state(buf);
reload=true;
}
}
}
#endif // FXCG || NSPIRE

View File

@@ -1,6 +1,7 @@
#include "apps_container.h"
#include "global_preferences.h"
#include <poincare/init.h>
#include <string.h>
#define DUMMY_MAIN 0
#if DUMMY_MAIN
@@ -50,13 +51,29 @@ void ion_main(int argc, const char * const argv[]) {
}
continue;
}
/* Option should be given at run-time:
* $ ./epsilon.elf --open-app code
*/
const char * appNames[] = {"home", EPSILON_APPS_NAMES};
if (strcmp(argv[i], "--open-app") == 0 && argc > i+1) {
const char * requestedAppName = argv[i+1];
for (int j = 0; j < AppsContainer::sharedAppsContainer()->numberOfApps(); j++) {
App::Snapshot * snapshot = AppsContainer::sharedAppsContainer()->appSnapshotAtIndex(j);
if (strcmp(requestedAppName, appNames[j]) == 0) {
AppsContainer::sharedAppsContainer()->setStartApp(snapshot);
break;
}
}
continue;
}
/* Option should be given at run-time:
* $ ./epsilon.elf --[app_name]-[option] [arguments]
* For example:
* $ make -j8 PLATFORM=emscripten EPSILON_APPS=code
* $ ./epsilon.elf --code-script hello_world.py:print("hello") --code-lock-on-console
*/
const char * appNames[] = {"home", EPSILON_APPS_NAMES};
for (int j = 0; j < AppsContainer::sharedAppsContainer()->numberOfApps(); j++) {
App::Snapshot * snapshot = AppsContainer::sharedAppsContainer()->appSnapshotAtIndex(j);
// Compare name in order to find if the firsts chars which are different are NULL and '-'

View File

@@ -38,7 +38,8 @@ const ToolboxMessageTree complexChildren[] = {
const ToolboxMessageTree combinatoricsChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::BinomialCommandWithArg, I18n::Message::Combination),
ToolboxMessageTree::Leaf(I18n::Message::PermuteCommandWithArg, I18n::Message::Permutation)
ToolboxMessageTree::Leaf(I18n::Message::PermuteCommandWithArg, I18n::Message::Permutation),
ToolboxMessageTree::Leaf(I18n::Message::FactorialCommandWithArg, I18n::Message::Factorial)
};
const ToolboxMessageTree normalDistributionChildren[] = {
@@ -67,13 +68,10 @@ const ToolboxMessageTree arithmeticChildren[] = {
};
const ToolboxMessageTree matricesChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::MatrixCommandWithArg, I18n::Message::NewMatrix, false, I18n::Message::MatrixCommand),
ToolboxMessageTree::Leaf(I18n::Message::IndentityCommandWithArg, I18n::Message::Identity),
ToolboxMessageTree::Leaf(I18n::Message::InverseCommandWithArg, I18n::Message::Inverse),
ToolboxMessageTree::Leaf(I18n::Message::DeterminantCommandWithArg, I18n::Message::Determinant),
ToolboxMessageTree::Leaf(I18n::Message::TransposeCommandWithArg, I18n::Message::Transpose),
ToolboxMessageTree::Leaf(I18n::Message::InverseCommandWithArg, I18n::Message::Inverse),
ToolboxMessageTree::Leaf(I18n::Message::IndentityCommandWithArg, I18n::Message::Identity),
ToolboxMessageTree::Leaf(I18n::Message::TraceCommandWithArg, I18n::Message::Trace),
ToolboxMessageTree::Leaf(I18n::Message::DimensionCommandWithArg, I18n::Message::Dimension),
ToolboxMessageTree::Leaf(I18n::Message::RowEchelonFormCommandWithArg, I18n::Message::RowEchelonForm),
ToolboxMessageTree::Leaf(I18n::Message::ReducedRowEchelonFormCommandWithArg, I18n::Message::ReducedRowEchelonForm)
};
@@ -111,6 +109,14 @@ const ToolboxMessageTree logicChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::CeilingLog2CommandWithArg, I18n::Message::CeilingLog2)
};
const ToolboxMessageTree matricesAndVectorsChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::MatrixCommandWithArg, I18n::Message::NewMatrix, false, I18n::Message::MatrixCommand),
ToolboxMessageTree::Leaf(I18n::Message::TransposeCommandWithArg, I18n::Message::Transpose),
ToolboxMessageTree::Leaf(I18n::Message::DimensionCommandWithArg, I18n::Message::Dimension),
ToolboxMessageTree::Node(I18n::Message::Matrices, matricesChildren),
ToolboxMessageTree::Node(I18n::Message::Vectors, vectorsChildren)
};
#if LIST_ARE_DEFINED
const ToolboxMessageTree listsChildren[] = {
ToolboxMessageTree::Leaf(I18n::Message::SortCommandWithArg, I18n::Message::Sort),
@@ -138,6 +144,7 @@ constexpr ToolboxMessageTree unitDistanceMeterPico = ToolboxMessageTree::Leaf(I1
constexpr ToolboxMessageTree unitDistanceMeterNano = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterNanoSymbol, I18n::Message::UnitDistanceMeterNano);
constexpr ToolboxMessageTree unitDistanceMeterMicro = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterMicroSymbol, I18n::Message::UnitDistanceMeterMicro);
constexpr ToolboxMessageTree unitDistanceMeterMilli = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterMilliSymbol, I18n::Message::UnitDistanceMeterMilli);
constexpr ToolboxMessageTree unitDistanceMeterCenti = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterCentiSymbol, I18n::Message::UnitDistanceMeterCenti);
constexpr ToolboxMessageTree unitDistanceMeter = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterSymbol, I18n::Message::UnitDistanceMeter);
constexpr ToolboxMessageTree unitDistanceMeterKilo = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMeterKiloSymbol, I18n::Message::UnitDistanceMeterKilo);
constexpr ToolboxMessageTree unitDistanceAstronomicalUnit = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceAstronomicalUnitSymbol, I18n::Message::UnitDistanceAstronomicalUnit);
@@ -148,7 +155,7 @@ constexpr ToolboxMessageTree unitDistanceFoot = ToolboxMessageTree::Leaf(I18n::M
constexpr ToolboxMessageTree unitDistanceYard = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceYardSymbol, I18n::Message::UnitDistanceYard);
constexpr ToolboxMessageTree unitDistanceMile = ToolboxMessageTree::Leaf(I18n::Message::UnitDistanceMileSymbol, I18n::Message::UnitDistanceMile);
const ToolboxMessageTree * unitDistanceMeterChildren[] = {&unitDistanceMeterPico, &unitDistanceMeterNano, &unitDistanceMeterMicro, &unitDistanceMeterMilli, &unitDistanceMeter, &unitDistanceMeterKilo};
const ToolboxMessageTree * unitDistanceMeterChildren[] = {&unitDistanceMeterPico, &unitDistanceMeterNano, &unitDistanceMeterMicro, &unitDistanceMeterMilli, &unitDistanceMeterCenti, &unitDistanceMeter, &unitDistanceMeterKilo};
const ToolboxMessageTree unitDistanceMeterNode = ToolboxMessageTree::Node(I18n::Message::UnitMetricMenu, unitDistanceMeterChildren);
const ToolboxMessageTree * unitDistanceChildrenForImperialToolbox[] = {
&unitDistanceInch,
@@ -326,11 +333,13 @@ const ToolboxMessageTree unitInductanceChildren[] = {
const ToolboxMessageTree unitSurfaceChildrenForMetricToolbox[] = {
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceHectarSymbol, I18n::Message::UnitSurfaceHectar),
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceMeterSquareSymbol, I18n::Message::UnitSurfaceMeterSquare),
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceAcreSymbol, I18n::Message::UnitSurfaceAcre)
};
const ToolboxMessageTree unitSurfaceChildrenForImperialToolbox[] = {
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceAcreSymbol, I18n::Message::UnitSurfaceAcre),
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceHectarSymbol, I18n::Message::UnitSurfaceHectar)
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceHectarSymbol, I18n::Message::UnitSurfaceHectar),
ToolboxMessageTree::Leaf(I18n::Message::UnitSurfaceMeterSquareSymbol, I18n::Message::UnitSurfaceMeterSquare),
};
const ToolboxMessageTree unitSurfaceFork[] = {
ToolboxMessageTree::Node(I18n::Message::UnitSurfaceMenu, unitSurfaceChildrenForMetricToolbox),
@@ -876,6 +885,10 @@ const ToolboxMessageTree Physics[] = {
const ToolboxMessageTree menu[] = {
#ifdef _FXCG
// There is no factorial button on the fx-CG calculators
ToolboxMessageTree::Leaf(I18n::Message::FactorialCommandWithArg, I18n::Message::Factorial, false, I18n::Message::FactorialCommand),
#endif
ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg, I18n::Message::AbsoluteValue),
ToolboxMessageTree::Leaf(I18n::Message::RootCommandWithArg, I18n::Message::NthRoot),
ToolboxMessageTree::Leaf(I18n::Message::LogCommandWithArg, I18n::Message::BasedLogarithm),
@@ -883,9 +896,8 @@ const ToolboxMessageTree menu[] = {
ToolboxMessageTree::Node(I18n::Message::ComplexNumber, complexChildren),
ToolboxMessageTree::Node(I18n::Message::Unit, unitChildren),
ToolboxMessageTree::Node(I18n::Message::Arithmetic, arithmeticChildren),
ToolboxMessageTree::Node(I18n::Message::Matrices, matricesChildren),
ToolboxMessageTree::Node(I18n::Message::MatricesAndVectors, matricesAndVectorsChildren),
ToolboxMessageTree::Node(I18n::Message::Probability, probabilityChildren),
ToolboxMessageTree::Node(I18n::Message::Vectors, vectorsChildren),
#if LIST_ARE_DEFINED
ToolboxMessageTree::Node(I18n::Message::Lists,listsChildren),
#endif

View File

@@ -25,7 +25,7 @@ bool App::processEvent(Ion::Events::Event e) {
if (e == Ion::Events::Home) {
return true;
}
if (e == Ion::Events::OnOff) {
if (e == Ion::Events::OnOff && !GlobalPreferences::sharedGlobalPreferences()->isInExamMode()) {
Ion::Power::standby(); // Force a core reset to exit
}
return ::App::processEvent(e);

View File

@@ -16,8 +16,7 @@ LogoController::LogoController() :
}
bool LogoController::fire() {
Container::activeApp()->dismissModalViewController();
AppsContainer::sharedAppsContainer()->removeTimer(this);
Container::activeApp()->dismissModalViewController();
return true;
}
@@ -53,6 +52,7 @@ void LogoController::viewDidDisappear() {
AppsContainer::sharedAppsContainer()->activateExamMode(GlobalPreferences::sharedGlobalPreferences()->examMode());
}
}
AppsContainer::sharedAppsContainer()->removeTimer(this);
ViewController::viewDidDisappear();
}

View File

@@ -57,7 +57,7 @@ public:
void deleteDistributionAndCalculation();
void initializeDistributionAndCalculation();
#if __EMSCRIPTEN__
#if (defined __EMSCRIPTEN__) || (defined _FXCG)
constexpr static int k_distributionAlignments[] = {alignof(BinomialDistribution),alignof(ExponentialDistribution), alignof(NormalDistribution), alignof(PoissonDistribution), alignof(UniformDistribution), 0};
constexpr static size_t k_distributionAlignment = max(k_distributionAlignments);
constexpr static int k_calculationAlignments[] = {alignof(LeftIntegralCalculation),alignof(FiniteIntegralCalculation), alignof(RightIntegralCalculation), 0};

View File

@@ -1,5 +1,3 @@
ReaderApp = "Leser"
ReaderAppCapital = "LESER"
NoFileToDisplay = "Keine Dateien zum Anzeigen"
FileError1 = "Fehler beim Lesen der Datei"
FileError2 = "Bitte überprüfen Sie die Syntax"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Reader"
ReaderAppCapital = "READER"
NoFileToDisplay = "No file to display"
FileError1 = "Error while reading file"
FileError2 = "Please check its syntax"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Lector"
ReaderAppCapital = "LECTOR"
NoFileToDisplay ="No hay archivos para mostrar"
FileError1 = "Error al leer el archivo"
FileError2 = "Por favor revise su sintaxis"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Liseuse"
ReaderAppCapital = "LISEUSE"
NoFileToDisplay = "Aucun fichier à afficher"
FileError1 = "Erreur durant la lecture du fichier"
FileError2 = "Veuillez vérifier sa syntaxe"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Olvasó"
ReaderAppCapital = "OLVASÓ"
NoFileToDisplay = "Nincs megjeleníthető fájl"
FileError1 = "Hiba a fájl olvasása közben"
FileError2 = "Kérjük, ellenőrizze a szintaxisát"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Lettore"
ReaderAppCapital = "LETTORE"
NoFileToDisplay = "essun file da visualizzare"
FileError1 = "Errore durante la lettura del file"
FileError2 = "Si prega di controllare la sua sintassi"
NoFileToDisplay = "Nessun file da visualizzare"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Lezer"
ReaderAppCapital = "LEZER"
NoFileToDisplay = "Geen bestanden om weer te geven"
FileError1 = "Fout tijdens het lezen van bestand"
FileError2 = "Controleer de syntaxis ervan"

View File

@@ -1,5 +1,3 @@
ReaderApp = "Leitor"
ReaderAppCapital = "LEITOR"
NoFileToDisplay = "Nenhum arquivo para exibir"
FileError1 = "Erro ao ler o arquivo"
FileError2 = "Verifique sua sintaxe"

View File

@@ -17,6 +17,7 @@ WordWrapTextView::WordWrapTextView(ReadBookController * readBookController) :
m_length(0),
m_isRichTextFile(false), // Value isn't important, it will change when the file is loaded
m_lastPagesOffsetsIndex(0),
m_textColor(Palette::PrimaryText),
m_readBookController(readBookController)
{
for (int i = 0; i < k_lastOffsetsBufferSize; i++) {
@@ -618,7 +619,8 @@ BookSave WordWrapTextView::getBookSave() const {
void WordWrapTextView::setBookSave(BookSave save) {
m_pageOffset = save.offset;
m_textColor = save.color;
// TODO: Understand why the color save crash the calculator and fix it
// m_textColor = save.color;
m_lastPagesOffsetsIndex = 0;
for (int i = 0; i < k_lastOffsetsBufferSize; i++) {

View File

@@ -72,14 +72,6 @@ Time = "Uhrzeit"
RTCWarning1 = "Das Aktivieren der Uhr verkürzt die"
RTCWarning2 = "Akkulaufzeit im Bereitschaftsmodus."
SyntaxHighlighting = "Syntaxhervorhebung"
USBExplanation1 = "USB-Schutz schützt Ihren"
USBExplanation2 = "Taschenrechner vor"
USBExplanation3 = "unbeabsichtigter Verriegelung"
USBProtection = "USB-Schutz"
USBProtectionLevel = "Akzeptierte Updates"
USBDefaultLevel = "Basierend auf Upsilon"
USBLowLevel = "Basierend auf Omega"
USBParanoidLevel = "Nichts"
Normal = "Normal"
IdleTimeBeforeDimming = "Abdunkeln nach (s)"
IdleTimeBeforeSuspend = "Anhalten nach (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "Standardmäßig externe Anwendungen"
ExtAppWriteExplanation2 = "kann nicht in den Speicher schreiben"
ExtAppWriteExplanation3 = "Flash (dauerhaft) Ihres Rechners."
ExtAppEnabled = "Aufstecken"
ClearShift = "Tastenkombination shift + clear"

View File

@@ -72,14 +72,6 @@ Time = "Time"
RTCWarning1 = "Enabling the clock drains the battery faster"
RTCWarning2 = "when the calculator is powered off."
SyntaxHighlighting = "Syntax Highlighting"
USBExplanation1 = "The USB protection protects"
USBExplanation2 = "the calculator from"
USBExplanation3 = "unintentional locking"
USBProtection = "USB Protection"
USBProtectionLevel = "Updates accepted"
USBDefaultLevel = "Based on Upsilon"
USBLowLevel = "Based on Omega"
USBParanoidLevel = "None"
Normal = "Normal"
IdleTimeBeforeDimming = "Dim after (s)"
IdleTimeBeforeSuspend = "Suspend after (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "By default, external applications"
ExtAppWriteExplanation2 = "cannot write to memory"
ExtAppWriteExplanation3 = "flash (persistent) of your calculator."
ExtAppEnabled = "Pin up"
ClearShift = "Shift + clear shortcut"

View File

@@ -72,14 +72,6 @@ Time = "Hora"
RTCWarning1 = "Activar el reloj gasta la batería más rápido"
RTCWarning2 = "cuando la calculadora está apagada."
SyntaxHighlighting = "Resaltado de sintaxis"
USBExplanation1 = "La protección USB protege"
USBExplanation2 = "su calculadora del"
USBExplanation3 = "bloqueo involuntario"
USBProtection = "Protección USB"
USBProtectionLevel = "Actualizaciones aceptadas"
USBDefaultLevel = "Basado en Upsilon"
USBLowLevel = "Basado en Omega"
USBParanoidLevel = "Ninguno"
Normal = "Normal"
IdleTimeBeforeDimming = "Oscurecer después de (s)"
IdleTimeBeforeSuspend = "Suspender después de (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "Por defecto, las aplicaciones externas"
ExtAppWriteExplanation2 = "no se puede escribir en la memoria"
ExtAppWriteExplanation3 = "flash (persistente) de su calculadora."
ExtAppEnabled = "Fijar"
ClearShift = "Atajo de shift + clear"

View File

@@ -72,14 +72,7 @@ Time = "Heure"
RTCWarning1 = "Activer l'horloge décharge la batterie plus"
RTCWarning2 = "vite quand la calculatrice est éteinte."
SyntaxHighlighting = "Coloration syntaxique"
USBExplanation1 = "La protection USB protège votre"
USBExplanation2 = "calculatrice contre un verrouillage"
USBExplanation3 = "non-intentionnel"
USBProtection = "Protection USB"
USBProtectionLevel = "Mise à jour acceptées"
USBDefaultLevel = "Basées sur Upsilon"
USBLowLevel = "Basées sur Omega"
USBParanoidLevel = "Aucune"
ClearShift = "Raccourci shift + clear"
Normal = "Normale"
IdleTimeBeforeDimming = "Assombrir après (s)"
IdleTimeBeforeSuspend = "Éteindre après (s)"

View File

@@ -72,14 +72,6 @@ Time = "Óra"
RTCWarning1 = "Amikor a számológép alvómódban van, az óra"
RTCWarning2 = "használása az elemet gyorsabban meríti ki."
SyntaxHighlighting = "Szintaxis kiemelés"
USBExplanation1 = "Az USB-védelem megvédi"
USBExplanation2 = "a számológépet a nem"
USBExplanation3 = "szándékos reteszeléstől"
USBProtection = "USB védelem"
USBProtectionLevel = "Elfogadott frissítések"
USBDefaultLevel = "Upsilon alapján"
USBLowLevel = "Omega alapján"
USBParanoidLevel = "Egyik sem"
Normal = "Normale"
IdleTimeBeforeDimming = "Assombrir après (s)"
IdleTimeBeforeSuspend = "Éteindre après (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "Alapértelmezés szerint külső alkalmazások"
ExtAppWriteExplanation2 = "nem tud a memóriába írni"
ExtAppWriteExplanation3 = "villog (tartósan) a számológép."
ExtAppEnabled = "Feltűz"
ClearShift = "Gyorsbillentyű shift + clear"

View File

@@ -32,60 +32,53 @@ Real = "Reale "
Cartesian = "Algebrico "
Polar = "Esponenziale "
Brightness = "Luminosità"
BrightnessSettings = "Impostazioni di luminosità"
SoftwareVersion = "Epsilon version"
UpsilonVersion = "Upsilon version"
OmegaVersion = "Omega version"
Username = "Name"
MicroPythonVersion = "µPython version"
BrightnessSettings = "Impostazioni luminosità"
SoftwareVersion = "Versione di Epsilon"
UpsilonVersion = "Versione di Upsilon"
OmegaVersion = "Versione di Omega"
Username = "Nome"
MicroPythonVersion = "Versione µPython"
FontSizes = "Carattere Python"
LargeFont = "Grande "
SmallFont = "Piccolo "
SerialNumber = "Numero di serie"
UpdatePopUp = "Promemoria aggiornamento"
BetaPopUp = "Promemoria beta"
Contributors = "Contributors"
Contributors = "Contributori"
Battery = "Batteria"
Accessibility = "Accessibility"
AccessibilityInvertColors = "Invert colors"
AccessibilityMagnify = "Magnify"
AccessibilityGamma = "Gamma correction"
AccessibilityGammaRed = "Red gamma"
AccessibilityGammaGreen = "Green gamma"
AccessibilityGammaBlue = "Blue gamma"
MathOptions = "Math options"
SymbolMultiplication = "Multiply"
SymbolMultiplicationCross = "Cross "
SymbolMultiplicationMiddleDot = "Dot "
SymbolMultiplicationStar = "Star "
SymbolMultiplicationAutoSymbol = "Auto "
SymbolFunction = "Expression format "
SymbolDefaultFunction = "Default "
SymbolArgFunction = "Empty "
SymbolArgDefaultFunction = "Argument "
MemUse = "Memory"
DateTime = "Date/time"
Accessibility = "Accessibilità"
AccessibilityInvertColors = "Inversione colori"
AccessibilityMagnify = "Ingrandimento"
AccessibilityGamma = "Correzione gamma"
AccessibilityGammaRed = "Gamma del rosso"
AccessibilityGammaGreen = "Gamma del verde"
AccessibilityGammaBlue = "Gamma del blu"
MathOptions = "Opzioni matematica"
SymbolMultiplication = "Simbolo moltiplicaz."
SymbolMultiplicationCross = "Croce "
SymbolMultiplicationMiddleDot = "Punto "
SymbolMultiplicationStar = "Stella "
SymbolMultiplicationAutoSymbol = "Automatico "
SymbolFunction = "Formato espressioni "
SymbolDefaultFunction = "Predefinito "
SymbolArgFunction = "Vuoto "
SymbolArgDefaultFunction = "Argomento "
MemUse = "Memoria"
DateTime = "Data/ora"
ExternalApps = "App esterne"
ActivateClock = "Activate clock"
Date = "Date"
Time = "Time"
RTCWarning1 = "Enabling the clock drains the battery faster"
RTCWarning2 = "when the calculator is powered off."
SyntaxHighlighting = "Evidenziazione della sintassi"
USBExplanation1 = "La protezione USB protegge"
USBExplanation2 = "la calcolatrice dal"
USBExplanation3 = "blocco involontario"
USBProtection = "Protezione USB"
USBProtectionLevel = "Aggiornamenti accettati"
USBDefaultLevel = "Basato su Upsilon"
USBLowLevel = "A base di Omega"
USBParanoidLevel = "Nessuno"
ActivateClock = "Attiva orologio"
Date = "Data"
Time = "Ora"
RTCWarning1 = "Attivare l'orologio drena la batteria più"
RTCWarning2 = "velocemente quando la calcolatrice è spenta."
SyntaxHighlighting = "Evidenz. sintassi"
Normal = "Normale"
IdleTimeBeforeDimming = "Scurisci dopo (s)"
IdleTimeBeforeSuspend = "Sospendi dopo (s)"
BrightnessShortcut = "Passaggi di scelta rapida"
BrightnessShortcut = "Livelli scelta rapida"
ExtAppWrite = "Scrittura abilitata"
ExtAppWriteExplanation1 = "Per impostazione predefinita, applicazioni esterne"
ExtAppWriteExplanation2 = "non p scrivere in memoria"
ExtAppWriteExplanation3 = "flash (persistente) della calcolatrice."
ExtAppWriteExplanation1 = "Per impostazione predefinita, le app esterne"
ExtAppWriteExplanation2 = "non possono scrivere in memoria flash"
ExtAppWriteExplanation3 = "(persistente) della calcolatrice."
ExtAppEnabled = "Affiggere"
ClearShift = "Scorciatoia shift + clear"

View File

@@ -72,14 +72,6 @@ Time = "Time"
RTCWarning1 = "Enabling the clock drains the battery faster"
RTCWarning2 = "when the calculator is powered off."
SyntaxHighlighting = "Syntax Highlighting"
USBExplanation1 = "USB-beveiliging beschermt uw"
USBExplanation2 = "rekenmachine tegen"
USBExplanation3 = "onbedoelde vergrendeling"
USBProtection = "USB-beveiliging"
USBProtectionLevel = "Updates geaccepteerd"
USBDefaultLevel = "Gebaseerd op Upsilon"
USBLowLevel = "Op basis van Omega"
USBParanoidLevel = "Geen"
Normal = "Normaal"
IdleTimeBeforeDimming = "Donkerder maken na (s)"
IdleTimeBeforeSuspend = "Suspend after (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "Standaard zijn externe toepassingen"
ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven"
ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine."
ExtAppEnabled = "Vastpinnen"
ClearShift = "Sneltoets shift + clear"

View File

@@ -72,14 +72,6 @@ Time = "Time"
RTCWarning1 = "Enabling the clock drains the battery faster"
RTCWarning2 = "when the calculator is powered off."
SyntaxHighlighting = "Destaque da sintaxe"
USBExplanation1 = "A proteção USB protege"
USBExplanation2 = "sua calculadora contra"
USBExplanation3 = "bloqueios não intencionais"
USBProtection = "Proteção USB"
USBProtectionLevel = "Atualizações aceitas"
USBDefaultLevel = "Baseado em Upsilon"
USBLowLevel = "Baseado em Ômega"
USBParanoidLevel = "Nenhum"
Normal = "Normal"
IdleTimeBeforeDimming = "Diminuir depois (s)"
IdleTimeBeforeSuspend = "Suspender depois (s)"
@@ -89,3 +81,4 @@ ExtAppWriteExplanation1 = "Por padrão, aplicativos externos"
ExtAppWriteExplanation2 = "não pode gravar na memória"
ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora."
ExtAppEnabled = "Pôster"
ClearShift = "Shift de shift + clear"

View File

@@ -1,4 +1 @@
UsbSetting = "USB"
USBDefaultLevelDesc = "L0"
USBLowLevelDesc = "L1"
USBParanoidLevelDesc = "L2"

View File

@@ -15,8 +15,6 @@ constexpr SettingsMessageTree s_modelFloatDisplayModeChildren[4] = {SettingsMess
constexpr SettingsMessageTree s_modelComplexFormatChildren[3] = {SettingsMessageTree(I18n::Message::Real), SettingsMessageTree(I18n::Message::Cartesian), SettingsMessageTree(I18n::Message::Polar)};
constexpr SettingsMessageTree s_modelDateTimeChildren[3] = {SettingsMessageTree(I18n::Message::ActivateClock), SettingsMessageTree(I18n::Message::Date), SettingsMessageTree(I18n::Message::Time)};
constexpr SettingsMessageTree s_symbolChildren[4] = {SettingsMessageTree(I18n::Message::SymbolMultiplicationCross),SettingsMessageTree(I18n::Message::SymbolMultiplicationMiddleDot),SettingsMessageTree(I18n::Message::SymbolMultiplicationStar),SettingsMessageTree(I18n::Message::SymbolMultiplicationAutoSymbol)};
constexpr SettingsMessageTree s_usbProtectionChildren[2] = {SettingsMessageTree(I18n::Message::USBProtection), SettingsMessageTree(I18n::Message::USBProtectionLevel, s_usbProtectionLevelChildren)};
constexpr SettingsMessageTree s_usbProtectionLevelChildren[3] = {SettingsMessageTree(I18n::Message::USBDefaultLevel), SettingsMessageTree(I18n::Message::USBLowLevel), SettingsMessageTree(I18n::Message::USBParanoidLevel)};
constexpr SettingsMessageTree s_externalChildren[2] = {SettingsMessageTree(I18n::Message::ExtAppWrite), SettingsMessageTree(I18n::Message::ExtAppEnabled)};
constexpr SettingsMessageTree s_symbolFunctionChildren[3] = {SettingsMessageTree(I18n::Message::SymbolDefaultFunction), SettingsMessageTree(I18n::Message::SymbolArgDefaultFunction), SettingsMessageTree(I18n::Message::SymbolArgFunction)};
constexpr SettingsMessageTree s_modelMathOptionsChildren[6] = {SettingsMessageTree(I18n::Message::AngleUnit, s_modelAngleChildren), SettingsMessageTree(I18n::Message::DisplayMode, s_modelFloatDisplayModeChildren), SettingsMessageTree(I18n::Message::EditionMode, s_modelEditionModeChildren), SettingsMessageTree(I18n::Message::SymbolFunction, s_symbolFunctionChildren), SettingsMessageTree(I18n::Message::ComplexFormat, s_modelComplexFormatChildren), SettingsMessageTree(I18n::Message::SymbolMultiplication, s_symbolChildren)};
@@ -26,7 +24,7 @@ constexpr SettingsMessageTree s_contributorsChildren[18] = {SettingsMessageTree(
// Code Settings
#ifdef HAS_CODE
constexpr SettingsMessageTree s_codeChildren[3] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting)};
constexpr SettingsMessageTree s_codeChildren[4] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting), SettingsMessageTree(I18n::Message::ClearShift)};
#endif
constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)};

View File

@@ -25,7 +25,7 @@ extern const Shared::SettingsMessageTree s_symbolChildren[4];
extern const Shared::SettingsMessageTree s_symbolFunctionChildren[3];
extern const Shared::SettingsMessageTree s_modelMathOptionsChildren[6];
extern const Shared::SettingsMessageTree s_modelFontChildren[2];
extern const Shared::SettingsMessageTree s_codeChildren[3];
extern const Shared::SettingsMessageTree s_codeChildren[4];
extern const Shared::SettingsMessageTree s_modelDateTimeChildren[3];
extern const Shared::SettingsMessageTree s_accessibilityChildren[6];
extern const Shared::SettingsMessageTree s_contributorsChildren[18];

View File

@@ -1,7 +1,8 @@
#include "main_controller.h"
#include "../exam_mode_configuration.h"
#include <apps/i18n.h>
#include "../exam_mode_configuration.h"
#include "main_controller.h"
using namespace Shared;
namespace Settings {
@@ -17,7 +18,6 @@ constexpr SettingsMessageTree s_modelMenu[] =
SettingsMessageTree(I18n::Message::CodeApp, s_codeChildren),
#endif
SettingsMessageTree(I18n::Message::BetaPopUp),
//SettingsMessageTree(I18n::Message::UsbSetting, s_usbProtectionChildren),
SettingsMessageTree(I18n::Message::ExternalApps, s_externalChildren),
SettingsMessageTree(I18n::Message::Accessibility, s_accessibilityChildren),
SettingsMessageTree(I18n::Message::About, s_modelAboutChildren)};

View File

@@ -17,7 +17,6 @@ constexpr SettingsMessageTree s_modelMenu[] =
#ifdef HAS_CODE
SettingsMessageTree(I18n::Message::CodeApp, s_codeChildren),
#endif
//SettingsMessageTree(I18n::Message::UsbSetting, s_usbProtectionChildren),
SettingsMessageTree(I18n::Message::ExternalApps, s_externalChildren),
SettingsMessageTree(I18n::Message::Accessibility, s_accessibilityChildren),
SettingsMessageTree(I18n::Message::About, s_modelAboutChildren)};

View File

@@ -1,11 +1,12 @@
#include "main_controller.h"
#include "../exam_mode_configuration.h"
#include <apps/i18n.h>
namespace Settings {
#include "../exam_mode_configuration.h"
#include "main_controller.h"
using namespace Shared;
namespace Settings {
constexpr SettingsMessageTree s_modelMenu[] =
{SettingsMessageTree(I18n::Message::MathOptions, s_modelMathOptionsChildren),
SettingsMessageTree(I18n::Message::BrightnessSettings, s_brightnessChildren),
@@ -17,10 +18,8 @@ constexpr SettingsMessageTree s_modelMenu[] =
SettingsMessageTree(I18n::Message::CodeApp, s_codeChildren),
#endif
SettingsMessageTree(I18n::Message::UpdatePopUp),
SettingsMessageTree(I18n::Message::Accessibility, s_accessibilityChildren),
// SettingsMessageTree(I18n::Message::UsbSetting, s_usbProtectionChildren),
SettingsMessageTree(I18n::Message::UsbSetting, s_usbProtectionChildren),
SettingsMessageTree(I18n::Message::ExternalApps, s_externalChildren),
SettingsMessageTree(I18n::Message::Accessibility, s_accessibilityChildren),
SettingsMessageTree(I18n::Message::About, s_modelAboutChildren)};
constexpr SettingsMessageTree s_model = SettingsMessageTree(I18n::Message::SettingsApp, s_modelMenu);

View File

@@ -1,5 +1,6 @@
#include "about_controller.h"
#include "../../../python/src/py/mpconfig.h"
#include "poincare/division.h"
#include <assert.h>
#include <cmath>
#include <apps/settings/main_controller.h>

View File

@@ -13,6 +13,7 @@ CodeOptionsController::CodeOptionsController(Responder * parentResponder) :
m_chevronCellFontSize.setMessageFont(KDFont::LargeFont);
m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont);
m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont);
m_switchCellClearShift.setMessageFont(KDFont::LargeFont);
}
bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
@@ -26,6 +27,10 @@ bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
GlobalPreferences::sharedGlobalPreferences()->setSyntaxhighlighting(!GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
break;
case 3:
GlobalPreferences::sharedGlobalPreferences()->setClearShift(!GlobalPreferences::sharedGlobalPreferences()->clearShift());
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
break;
default:
GenericSubController * subController = nullptr;
subController = &m_preferencesController;
@@ -48,8 +53,10 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) {
}
else if (index == 1) {
return &m_switchCellAutoCompletion;
} else if (index == 2) {
return &m_switchCellSyntaxHighlighting;
}
return &m_switchCellSyntaxHighlighting;
return &m_switchCellClearShift;
}
int CodeOptionsController::reusableCellCount(int type) {
@@ -79,6 +86,11 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
}
else if (thisLabel == I18n::Message::ClearShift) {
MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell;
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearShift());
}
#endif
}

View File

@@ -14,11 +14,12 @@ public:
int reusableCellCount(int type) override;
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
private:
constexpr static int k_totalNumberOfCell = 4;
constexpr static int k_totalNumberOfCell = 5;
PreferencesController m_preferencesController;
MessageTableCellWithChevronAndMessage m_chevronCellFontSize;
MessageTableCellWithSwitch m_switchCellAutoCompletion;
MessageTableCellWithSwitch m_switchCellSyntaxHighlighting;
MessageTableCellWithSwitch m_switchCellClearShift;
};
}

View File

@@ -30,7 +30,10 @@ bool DateTimeController::handleEvent(Ion::Events::Event event) {
if (selectedRow() == 0) {
clockEnabled = !clockEnabled;
if (clockEnabled) {
#ifndef _FXCG
// This doesn't apply on Casio calculators
Container::activeApp()->displayWarning(I18n::Message::RTCWarning1, I18n::Message::RTCWarning2);
#endif
}
Ion::RTC::setMode(clockEnabled ? Ion::RTC::Mode::HSE : Ion::RTC::Mode::Disabled);
}

View File

@@ -170,15 +170,6 @@ Layout PreferencesController::layoutForPreferences(I18n::Message message) {
return LayoutHelper::String(text, strlen(text), font);
}
// DFU Protection level
case I18n::Message::USBDefaultLevel:
case I18n::Message::USBLowLevel:
case I18n::Message::USBParanoidLevel:
{
const char * text = " ";
return LayoutHelper::String(text, strlen(text), k_layoutFont);
}
default:
assert(false);
return Layout();

View File

@@ -97,3 +97,27 @@ ColorPurple = "Violett "
ColorCyan = "Cyan "
ColorPink = "Rosa "
ColorOrange = "Orange "
TimeDimension = "Zeit"
DistanceDimension = "Distanz"
MassDimension = "Masse"
CurrentDimension = "Betrieb"
TemperatureDimension = "Temperatur"
AmountOfSubstanceDimension = "Quantität der Materie"
LuminousIntensityDimension = "Lichtintensität"
FrequencyDimension = "Frequenz"
ForceDimension = "Stärke"
PressureDimension = "Druck"
EnergyDimension = "Energie"
PowerDimension = "Mächtig"
ElectricChargeDimension = "Elektrische Ladung"
ElectricPotentialDimension = "Elektrisches Potenzial"
ElectricCapacitanceDimension = "Elektrische Kapazität"
ElectricResistanceDimension = "Elektrischer Wiederstand"
ElectricConductanceDimension = "elektrische Leitfähigkeit"
MagneticFluxDimension = "magnetischer Fluss"
MagneticFieldDimension = "Magnetfeld"
InductanceDimension = "Induktivität"
CatalyticActivityDimension = "Katalytische Aktivität"
SurfaceDimension = "Auftauchen"
VolumeDimension = "Volumen"
SpeedDimension = "Geschwindigkeit"

View File

@@ -97,3 +97,27 @@ ColorPurple = "Purple "
ColorCyan = "Cyan "
ColorPink = "Pink "
ColorOrange = "Orange "
TimeDimension = "Time"
DistanceDimension = "Distance"
MassDimension = "Mass"
CurrentDimension = "Running"
TemperatureDimension = "Temperature"
AmountOfSubstanceDimension = "Quantity of matter"
LuminousIntensityDimension = "Light intensity"
FrequencyDimension = "Frequency"
ForceDimension = "Strength"
PressureDimension = "Pressure"
EnergyDimension = "Energy"
PowerDimension = "Powerful"
ElectricChargeDimension = "Electrical charge"
ElectricPotentialDimension = "Electric potential"
ElectricCapacitanceDimension = "Electrical capacity"
ElectricResistanceDimension = "Electrical resistance"
ElectricConductanceDimension = "electrical conductance"
MagneticFluxDimension = "magnetic flux"
MagneticFieldDimension = "Magnetic field"
InductanceDimension = "Inductance"
CatalyticActivityDimension = "Catalytic activity"
SurfaceDimension = "Surface"
VolumeDimension = "Volume"
SpeedDimension = "Speed"

View File

@@ -97,3 +97,27 @@ ColorPurple = "Púrpura "
ColorCyan = "Cian "
ColorPink = "Rosa "
ColorOrange = "Naranja "
TimeDimension = "Tiempo"
DistanceDimension = "Distancia"
MassDimension = "Masa"
CurrentDimension = "Correr"
TemperatureDimension = "La temperatura"
AmountOfSubstanceDimension = "cantidad de materia"
LuminousIntensityDimension = "Intensidad de luz"
FrequencyDimension = "Frecuencia"
ForceDimension = "Fuerza"
PressureDimension = "Presión"
EnergyDimension = "Energía"
PowerDimension = "Potencia"
ElectricChargeDimension = "Carga eléctrica"
ElectricPotentialDimension = "Potencial eléctrico"
ElectricCapacitanceDimension = "Capacidad eléctrica"
ElectricResistanceDimension = "Resistencia eléctrica"
ElectricConductanceDimension = "conductancia eléctrica"
MagneticFluxDimension = "flujo magnético"
MagneticFieldDimension = "Campo magnético"
InductanceDimension = "Inductancia"
CatalyticActivityDimension = "Actividad catalítica"
SurfaceDimension = "Superficie"
VolumeDimension = "Volumen"
SpeedDimension = "Velocidad"

View File

@@ -97,3 +97,27 @@ ColorPurple = "Violet "
ColorCyan = "Cyan "
ColorPink = "Rose "
ColorOrange = "Orange "
TimeDimension = "Temps"
DistanceDimension = "Distance"
MassDimension = "Masse"
CurrentDimension = "Courant"
TemperatureDimension = "Température"
AmountOfSubstanceDimension = "Quantité de matière"
LuminousIntensityDimension = "Intensité lumineuse"
FrequencyDimension = "Fréquence"
ForceDimension = "Force"
PressureDimension = "Pression"
EnergyDimension = "Énergie"
PowerDimension = "Puissance"
ElectricChargeDimension = "Charge électrique"
ElectricPotentialDimension = "Potentiel électrique"
ElectricCapacitanceDimension = "Capacité électrique"
ElectricResistanceDimension = "Résistance électrique"
ElectricConductanceDimension = "Conductance électrique"
MagneticFluxDimension = "Flux magnétique"
MagneticFieldDimension = "Champ magnétique"
InductanceDimension = "Inductance"
CatalyticActivityDimension = "Activité catalytique"
SurfaceDimension = "Surface"
VolumeDimension = "Volume"
SpeedDimension = "Vitesse"

View File

@@ -97,3 +97,28 @@ ColorPurple = "Lila "
ColorCyan = "Cián "
ColorPink = "Rózsaszín "
ColorOrange = "Narancssárga "
TimeDimension = "Idő"
DistanceDimension = "Távolság"
MassDimension = "Tömeg"
CurrentDimension = "Futó"
TemperatureDimension = "Hőfok"
AmountOfSubstanceDimension = "Az anyag mennyisége"
LuminousIntensityDimension = "Fény intenzitása"
FrequencyDimension = "Frekvencia"
ForceDimension = "Erő"
PressureDimension = "Nyomás"
EnergyDimension = "Energia"
PowerDimension = "Erős"
ElectricChargeDimension = "Elektromos töltő"
ElectricPotentialDimension = "Elektromos potenciál"
ElectricCapacitanceDimension = "Elektromos kapacitás"
ElectricResistanceDimension = "Elektromos ellenállás"
ElectricConductanceDimension = "elektromos vezetőképesség"
MagneticFluxDimension = "mágneses fluxus"
MagneticFieldDimension = "Mágneses mező"
InductanceDimension = "Induktivitás"
CatalyticActivityDimension = "Katalitikus aktivitás"
SurfaceDimension = "Felület"
VolumeDimension = "Hangerő"
SpeedDimension = "Sebesség"
Factorial = "Faktorál"

View File

@@ -97,3 +97,28 @@ ColorPurple = "Viola "
ColorCyan = "Ciano"
ColorPink = "Rosa "
ColorOrange = "Arancia "
TimeDimension = "Volta"
DistanceDimension = "Distanza"
MassDimension = "Messa"
CurrentDimension = "In esecuzione"
TemperatureDimension = "Temperatura"
AmountOfSubstanceDimension = "Quantità di materia"
LuminousIntensityDimension = "Intensità luminosa"
FrequencyDimension = "Frequenza"
ForceDimension = "Forza"
PressureDimension = "Pressione"
EnergyDimension = "Energia"
PowerDimension = "Potere"
ElectricChargeDimension = "Carica elettrica"
ElectricPotentialDimension = "Potenziale elettrico"
ElectricCapacitanceDimension = "Capacità elettrica"
ElectricResistanceDimension = "Resistenza elettrica"
ElectricConductanceDimension = "conduttanza elettrica"
MagneticFluxDimension = "flusso magnetico"
MagneticFieldDimension = "Campo magnetico"
InductanceDimension = "Induttanza"
CatalyticActivityDimension = "Attività catalitica"
SurfaceDimension = "Superficie"
VolumeDimension = "Volume"
SpeedDimension = "Velocità"
Factorial = "Fattoriale"

View File

@@ -97,3 +97,28 @@ ColorPurple = "Purper"
ColorCyan = "Cyaan "
ColorPink = "Roze"
ColorOrange = "Oranje"
TimeDimension = "Tijd"
DistanceDimension = "Afstand"
MassDimension = "Massa"
CurrentDimension = "Rennen"
TemperatureDimension = "Temperatuur"
AmountOfSubstanceDimension = "Hoeveelheid materie"
LuminousIntensityDimension = "Lichtsterkte"
FrequencyDimension = "Frequentie"
ForceDimension = "Kracht"
PressureDimension = "Druk"
EnergyDimension = "Energie"
PowerDimension = "Kracht"
ElectricChargeDimension = "Elektrische lading"
ElectricPotentialDimension = "elektrische potentiaal"
ElectricCapacitanceDimension = "elektrische capaciteit:"
ElectricResistanceDimension = "Elektrische weerstand"
ElectricConductanceDimension = "elektrische geleiding:"
MagneticFluxDimension = "magnetische flux"
MagneticFieldDimension = "Magnetisch veld"
InductanceDimension = "Inductie"
CatalyticActivityDimension = "Katalytische activiteit"
SurfaceDimension = "Oppervlak"
VolumeDimension = "Volume"
SpeedDimension = "Snelheid"
Factorial = "Faculteit"

View File

@@ -97,3 +97,27 @@ ColorPurple = "Roxa "
ColorCyan = "Ciano"
ColorPink = "Cor de rosa "
ColorOrange = "Laranja "
TimeDimension = "Tempo"
DistanceDimension = "Distância"
MassDimension = "Massa"
CurrentDimension = "Corrida"
TemperatureDimension = "Temperatura"
AmountOfSubstanceDimension = "Quantidade de matéria"
LuminousIntensityDimension = "Intensidade da luz"
FrequencyDimension = "Frequência"
ForceDimension = "Força"
PressureDimension = "Pressão"
EnergyDimension = "Energia"
PowerDimension = "Poderoso"
ElectricChargeDimension = "Carga elétrica"
ElectricPotentialDimension = "Potencial elétrico"
ElectricCapacitanceDimension = "Capacidade elétrica"
ElectricResistanceDimension = "Resistência elétrica"
ElectricConductanceDimension = "condutância elétrica"
MagneticFluxDimension = "fluxo magnético"
MagneticFieldDimension = "Campo magnético"
InductanceDimension = "Indutância"
CatalyticActivityDimension = "Atividade catalítica"
SurfaceDimension = "Superfície"
VolumeDimension = "Volume"
SpeedDimension = "Velocidade"

View File

@@ -10,6 +10,7 @@ UnitTimeMonthSymbol = "_month"
UnitTimeYearSymbol = "_year"
UnitDistanceMeterKiloSymbol = "_km"
UnitDistanceMeterSymbol = "_m"
UnitDistanceMeterCentiSymbol = "_cm"
UnitDistanceMeterMilliSymbol = "_mm"
UnitDistanceMeterMicroSymbol = "_μm"
UnitDistanceMeterNanoSymbol = "_nm"
@@ -82,6 +83,7 @@ UnitConductanceSiemensMilliSymbol = "_mS"
UnitMagneticFieldTeslaSymbol = "_T"
UnitInductanceHenrySymbol = "_H"
UnitSurfaceAcreSymbol = "_acre"
UnitSurfaceMeterSquareSymbol = "_m^2"
UnitSurfaceHectarSymbol = "_ha"
UnitVolumeLiterSymbol = "_L"
UnitVolumeLiterDeciSymbol = "_dL"
@@ -125,6 +127,8 @@ DotCommandWithArg = "dot(u,v)"
E = "e"
Equal = "="
FactorCommandWithArg = "factor(n)"
FactorialCommand = "!"
FactorialCommandWithArg = "n!"
FccId = "FCC ID"
FloorCommandWithArg = "floor(x)"
FracCommandWithArg = "frac(x)"

View File

@@ -270,7 +270,7 @@ void ContinuousFunction::rangeForDisplay(float * xMin, float * xMax, float * yMi
}
if (!basedOnCostlyAlgorithms(context)) {
Zoom::ValueAtAbscissa evaluation = [](float x, Context * context, const void * auxiliary) {
Zoom::ValueAtAbscissa evaluation = [](float x, Context * context, const void * auxiliary) -> float {
/* When evaluating sin(x)/x close to zero using the standard sine function,
* one can detect small variations, while the cardinal sine is supposed to be
* locally monotonous. To smooth our such variations, we round the result of

View File

@@ -65,7 +65,11 @@ void ContinuousFunctionCache::ComputeNonCartesianSteps(float * tStep, float * tC
const int numberOfWholeSteps = static_cast<int>(Graph::GraphView::k_graphStepDenominator);
static_assert(numberOfCacheablePoints % numberOfWholeSteps == 0, "numberOfCacheablePoints should be a multiple of numberOfWholeSteps for optimal caching");
const int multiple = numberOfCacheablePoints / numberOfWholeSteps;
// Ignore this on Casio calculators for now, as the screen resolution breaks this
// TODO: fix this. if it's possible
#ifndef _FXCG
static_assert(multiple && !(multiple & (multiple - 1)), "multiple should be a power of 2 for optimal caching");
#endif
/* Define cacheStep such that every whole graph steps are equally divided
* For instance, with :
* graphStepDenominator = 10.1

View File

@@ -72,7 +72,7 @@ Expression ExpressionModel::expressionReduced(const Storage::Record * record, Po
if (isCircularlyDefined(record, context)) {
m_expression = Undefined::Builder();
} else {
m_expression = Expression::ExpressionFromAddress(expressionAddress(record), expressionSize(record));
m_expression = Expression::ExpressionFromAddress(expressionAddress(record), expressionSize(record), record);
/* 'Simplify' routine might need to call expressionReduced on the very
* same function. So we need to keep a valid m_expression while executing
* 'Simplify'. Thus, we use a temporary expression. */
@@ -90,7 +90,7 @@ Expression ExpressionModel::expressionReduced(const Storage::Record * record, Po
Expression ExpressionModel::expressionClone(const Storage::Record * record) const {
assert(record->fullName() != nullptr);
/* A new Expression has to be created at each call (because it might be tempered with after calling) */
return Expression::ExpressionFromAddress(expressionAddress(record), expressionSize(record));
return Expression::ExpressionFromAddress(expressionAddress(record), expressionSize(record), record);
/* TODO
* The substitution of UCodePointUnknown back and forth is done in the
* methods text, setContent (through BuildExpressionFromText), layout and
@@ -125,6 +125,39 @@ Ion::Storage::Record::ErrorStatus ExpressionModel::setExpressionContent(Ion::Sto
Ion::Storage::Record::Data newData = record->value();
size_t previousExpressionSize = expressionSize(record);
size_t newExpressionSize = newExpression.isUninitialized() ? 0 : newExpression.size();
#ifdef STRING_STORAGE
size_t stringsize = 0;
char buf[1024] = {0};
char repl = 0;
buf[0] = '"';
if (!newExpression.isUninitialized()) {
size_t l = newExpression.serialize(buf+1,sizeof(buf)-2);
if (l >= sizeof(buf) - 3) {
newExpressionSize = 0;
} else {
buf[l + 1] = '"';
// replace 0x1 by x for func or n for seq
const char * name = record->fullName();
int namel = strlen(name);
if (namel > 4 && strncmp(name + namel - 4, ".seq", 4) == 0) {
repl = 'n';
} else if (namel > 5 && strncmp(name + namel - 5, ".func", 5) == 0) {
repl = 'x';
}
if (repl) {
for (char * ptr = buf; *ptr; ++ptr) {
if (*ptr == 1) {
*ptr = repl;
}
}
}
stringsize= l + 3; // 2 quotes and 0 at end
if (newExpressionSize < stringsize) {
newExpressionSize = stringsize;
}
}
}
#endif
size_t previousDataSize = newData.size;
size_t newDataSize = previousDataSize - previousExpressionSize + newExpressionSize;
void * expAddress = expressionAddress(record);
@@ -140,6 +173,12 @@ Ion::Storage::Record::ErrorStatus ExpressionModel::setExpressionContent(Ion::Sto
* (as it is sometimes computed from metadata). Thus, the expression address
* is given as a parameter to updateNewDataWithExpression. */
updateNewDataWithExpression(record, newExpression, expAddress, newExpressionSize, previousExpressionSize);
#ifdef STRING_STORAGE
if (stringsize && stringsize<newExpressionSize) {
// print size is smaller than expression size
strncpy((char *)expAddress, buf, stringsize);
}
#endif
// Set the data with the right size
newData.size = newDataSize;
error = record->setValue(newData);

View File

@@ -49,7 +49,12 @@ protected:
static constexpr KDCoordinate k_cellWidth = Poincare::PrintFloat::glyphLengthForFloatWithPrecision(Poincare::Preferences::LargeNumberOfSignificantDigits) * 7 + 2*Metric::CellMargin + Metric::TableSeparatorThickness; // KDFont::SmallFont->glyphSize().width() = 7
constexpr static int k_maxNumberOfEditableCells = (Ion::Display::Width/k_cellWidth+2) * ((Ion::Display::Height - Metric::TitleBarHeight - Metric::TabHeight)/k_cellHeight+2);
#ifndef _FXCG
constexpr static int k_numberOfTitleCells = 4;
#else
// This is different here due to the changed screen resolution
constexpr static int k_numberOfTitleCells = 5;
#endif
static constexpr int k_titleCellType = 0;
static constexpr int k_editableCellType = 1;

View File

@@ -87,7 +87,7 @@ private:
// Number of cells
constexpr static int k_maxNumberOfVisibleCells = (Ion::Display::Height - 3 * Metric::TitleBarHeight) / k_defaultCellHeight + 1; // When displaying approximate solutions for cos(x) = 0 between 0 and 1800 and scrolling down
static_assert(k_maxNumberOfVisibleCells == 10, "k_maxNumberOfVisibleCells has changed"); //This assert is just for information purposes
// static_assert(k_maxNumberOfVisibleCells == 10, "k_maxNumberOfVisibleCells has changed"); //This assert is just for information purposes
static_assert(k_maxNumberOfVisibleCells <= EquationStore::k_maxNumberOfSolutions + Poincare::Expression::k_maxNumberOfVariables, "We can reduce the number of cells in Solver:SolutionsController.");
constexpr static int k_maxNumberOfSymbols = EquationStore::k_maxNumberOfSolutions + Poincare::Expression::k_maxNumberOfVariables;
constexpr static int k_numberOfSymbolCells = k_maxNumberOfVisibleCells < k_maxNumberOfSymbols ? k_maxNumberOfVisibleCells : k_maxNumberOfSymbols;

View File

@@ -13,17 +13,18 @@ UnitTimeYear = "Jahr"
UnitDistanceMenu = "Entfernung"
UnitDistanceMeterKilo = "Kilometer"
UnitDistanceMeter = "Meter"
UnitDistanceMeterCenti = "Zentimeter"
UnitDistanceMeterMilli = "Millimeter"
UnitDistanceMeterMicro = "Micrometer"
UnitDistanceMeterNano = "Nanometer"
UnitDistanceMeterPico = "Pikometer"
UnitDistanceInch = "Zoll"
UnitDistanceFoot = "Fuß"
UnitDistanceYard = "Yard"
UnitDistanceMile = "Meile"
UnitDistanceAstronomicalUnit = "Astronomische Einheit"
UnitDistanceLightYear = "Lichtjahr"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Meile"
UnitDistanceYard = "Yard"
UnitDistanceFoot = "Fuß"
UnitDistanceInch = "Zoll"
UnitMassMenu = "Masse"
UnitMassGramKilo = "Kilogramm"
UnitMassGram = "Gramm"
@@ -77,13 +78,14 @@ InductanceMenu = "Elektrische Induktivität"
UnitSurfaceMenu = "Fläche"
UnitSurfaceAcre = "Morgen"
UnitSurfaceHectar = "Hektar"
UnitSurfaceMeterSquare = "Quadratmeter"
UnitVolumeMenu = "Volumen"
UnitVolumeLiter = "Liter"
UnitVolumeLiterDeci = "Deziliter"
UnitVolumeLiterCenti = "Centiliter"
UnitVolumeLiterMilli = "Milliliter"
UnitVolumeTeaspoon = "Teelöffel"
UnitVolumeTablespoon= "Esslöffel"
UnitVolumeTablespoon = "Esslöffel"
UnitVolumeFluidOunce = "Flüssigunze"
UnitVolumeCup = "Tasse"
UnitVolumePint = "Pint"
@@ -409,21 +411,16 @@ NumberElementUbn = "120 - Unbinilium (Ubn)"
AlphaElementUbn = "Ubn - Unbinilium (120)"
Speed = "Geschwindigkeit"
SpeedOfSound = "Schallgeschwindigkeit"
SpeedOfLightTag = "Lichtgeschwindigkeit"
SpeedOfSound0Tag = "Meeresspiegel, 20 ° C"
SpeedOfSoundWaterTag = "In Wasser"
SpeedOfSoundSteelTag = "In Stahl"
SpeedOfSoundGlassTag = "In Glas"
EscapeVelocity = "Fluchtgeschwindigkeit"
EscapeVelocityFromEarth = "Von der Erde"
EscapeVelocityFromMoon = "Vom Mond"
EscapeVelocityFromSun = "Von der Sonne"
SpeedOfLightTag = "Lichtgeschwindigkeit"
Thermodynamics = "Thermodynamik"
BoltzmannTag = "Boltzmann Konstante"
AvogadroTag = "Avogadro-Konstante"
GasTag = "Gaskonstante"
Electromagnetism = "Elektromagnetismus"
CoulombTag = "Coulomb-Konstante"
ConductivityConstants = "Leitfähigkeitskonstanten"
Electricity = "Elektrizität"
ResistivityConstants = "Konstanten der Widerstandsfähigkeit"
@@ -445,6 +442,11 @@ Water = "Wasser"
Air = "Luft"
Glass = "Glas"
Wood = "Holz"
CoulombTag = "Coulomb-Konstante"
EscapeVelocity = "Fluchtgeschwindigkeit"
EscapeVelocityFromEarth = "Von der Erde"
EscapeVelocityFromMoon = "Vom Mond"
EscapeVelocityFromSun = "Von der Sonne"
Vacuum_permittivityTag = "Vakuum-Durchlässigkeit"
Vacuum_permeabilityTag = "Vakuumdurchlässigkeit"
PlanckTag = "Planck - Konstante"
@@ -524,3 +526,5 @@ LogicalRotateRight= "Rotieren von a um r Bit n. rechts"
TwosComplementToBits = "Äquivalent im Zweierkomplement"
CeilingLog2 = "Anzahl der Bits, die zum Speichern von a benötigt werden"
ExplicitNumberOfBits = "Explizite Bitbreite"
MatricesAndVectors = "Matrizen und Vektoren"
Factorial = "Fakultät"

View File

@@ -13,6 +13,7 @@ UnitTimeYear = "Year"
UnitDistanceMenu = "Distance"
UnitDistanceMeterKilo = "Kilometer"
UnitDistanceMeter = "Meter"
UnitDistanceMeterCenti = "Centimeter"
UnitDistanceMeterMilli = "Millimeter"
UnitDistanceMeterMicro = "Micrometer"
UnitDistanceMeterNano = "Nanometer"
@@ -77,13 +78,14 @@ InductanceMenu = "Electrical inductance"
UnitSurfaceMenu = "Area"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hectare"
UnitSurfaceMeterSquare = "Square meter"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Liter"
UnitVolumeLiterDeci = "Deciliter"
UnitVolumeLiterCenti = "Centiliter"
UnitVolumeLiterMilli = "Milliliter"
UnitVolumeTeaspoon = "Teaspoon"
UnitVolumeTablespoon= "Tablespoon"
UnitVolumeTablespoon = "Tablespoon"
UnitVolumeFluidOunce = "Fluid Ounce"
UnitVolumeCup = "Cup"
UnitVolumePint = "Pint"
@@ -413,17 +415,12 @@ SpeedOfSound0Tag = "Sea level, 20°C"
SpeedOfSoundWaterTag = "In water"
SpeedOfSoundSteelTag = "In steel"
SpeedOfSoundGlassTag = "In glass"
EscapeVelocity = "Escape Velocity"
EscapeVelocityFromEarth = "Of Earth"
EscapeVelocityFromMoon = "Of Moon"
EscapeVelocityFromSun = "Of Sun"
SpeedOfLightTag = "Speed of light"
Thermodynamics = "Thermodynamics"
BoltzmannTag = "Boltzmann Constant"
AvogadroTag = "Avogadro Constant"
GasTag = "Gas Constant"
Electromagnetism = "Electromagnetism"
CoulombTag = "Coulomb Constant"
ConductivityConstants = "Conductivity constants"
Electricity = "Electricity"
ResistivityConstants = "Resistivity Constants"
@@ -445,6 +442,11 @@ Water = "Water"
Air = "Air"
Glass = "Glass"
Wood = "Wood"
CoulombTag = "Coulomb Constant"
EscapeVelocity = "Escape Velocity"
EscapeVelocityFromEarth = "Of Earth"
EscapeVelocityFromMoon = "Of Moon"
EscapeVelocityFromSun = "Of Sun"
Vacuum_permittivityTag = "Vacuum permittivity"
Vacuum_permeabilityTag = "Vacuum permeability"
PlanckTag = "Planck Constant"
@@ -524,3 +526,5 @@ LogicalRotateRight= "Rotate r bits of a to the right"
TwosComplementToBits = "Two's complement equivalent"
CeilingLog2 = "Number of bits needed to store a"
ExplicitNumberOfBits = "Explicit number of bits"
MatricesAndVectors = "Matrices and vectors"
Factorial = "Factorial"

View File

@@ -13,17 +13,18 @@ UnitTimeYear = "Year"
UnitDistanceMenu = "Distance"
UnitDistanceMeterKilo = "Kilometer"
UnitDistanceMeter = "Meter"
UnitDistanceMeterCenti = "Centímetro"
UnitDistanceMeterMilli = "Millimeter"
UnitDistanceMeterMicro = "Micrometer"
UnitDistanceMeterNano = "Nanometer"
UnitDistanceMeterPico = "Picometer"
UnitDistanceInch = "Pulgada"
UnitDistanceFoot = "Pie"
UnitDistanceYard = "Yardas"
UnitDistanceMile = "Milla"
UnitDistanceAstronomicalUnit = "Astronomical unit"
UnitDistanceLightYear = "Light year"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Milla"
UnitDistanceYard = "Yardas"
UnitDistanceFoot = "Pie"
UnitDistanceInch = "Pulgada"
UnitMassMenu = "Mass"
UnitMassGramKilo = "Kilogram"
UnitMassGram = "Gram"
@@ -77,13 +78,14 @@ InductanceMenu = "Electrical inductance"
UnitSurfaceMenu = "Area"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hectare"
UnitSurfaceMeterSquare = "Metro cuadrado"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Liter"
UnitVolumeLiterDeci = "Deciliter"
UnitVolumeLiterCenti = "Centiliter"
UnitVolumeLiterMilli = "Milliliter"
UnitVolumeTeaspoon = "Cucharadita"
UnitVolumeTablespoon= "Cucharada"
UnitVolumeTablespoon = "Cucharada"
UnitVolumeFluidOunce = "Onza líquida"
UnitVolumeCup = "Taza"
UnitVolumePint = "Pinta"
@@ -408,22 +410,17 @@ AlphaElementUue = "Uue - Ununennio (119)"
NumberElementUbn = "120 - Unbinilio (Ubn)"
AlphaElementUbn = "Ubn - Unbinilio (120)"
Speed = "Velocidad"
SpeedOfLightTag = "Velocidad de la luz"
SpeedOfSound = "La velocidad del sonido"
Thermodynamics = "Termodinámica"
SpeedOfSound0Tag = "Nivel del mar, 20 ° C"
SpeedOfSoundWaterTag = "En el agua"
SpeedOfSoundSteelTag = "En acero"
SpeedOfSoundGlassTag = "En vidrio"
EscapeVelocity = "Velocidad de escape"
EscapeVelocityFromEarth = "De La Tierra"
EscapeVelocityFromMoon = "De la Luna"
EscapeVelocityFromSun = "De el Sol"
SpeedOfLightTag = "Velocidad de la luz"
Thermodynamics = "Termodinámica"
BoltzmannTag = "Constante Boltzmann"
AvogadroTag = "Constante de Avogadro"
GasTag = "Constante de gas"
Electromagnetism = "Electromagnetismo"
CoulombTag = "Constante de Coulomb"
ConductivityConstants = "Constantes de conductividad"
Electricity = "Electricidad"
ResistivityConstants = "Constantes de resistividad"
@@ -445,6 +442,11 @@ Water = "Agua"
Air = "Aire"
Glass = "Vidrio"
Wood = "Madera"
CoulombTag = "Constante de Coulomb"
EscapeVelocity = "Velocidad de escape"
EscapeVelocityFromEarth = "De La Tierra"
EscapeVelocityFromMoon = "De la Luna"
EscapeVelocityFromSun = "De el Sol"
Vacuum_permittivityTag = "Permisividad de vacío"
Vacuum_permeabilityTag = "Permeabilidad al vacío"
PlanckTag = "Constante de Planck"
@@ -524,3 +526,5 @@ LogicalRotateRight= "Gire r bits de a hacia derecha"
TwosComplementToBits = "Equivalente en complemento a dos"
CeilingLog2 = "Número de bits necesarios para almacenar a"
ExplicitNumberOfBits = "Número explícito de bits"
MatricesAndVectors = "Matrices y vectores"
Factorial = "Factorial"

View File

@@ -13,21 +13,18 @@ UnitTimeYear = "Année"
UnitDistanceMenu = "Distance"
UnitDistanceMeterKilo = "Kilomètre"
UnitDistanceMeter = "Mètre"
UnitDistanceMeterCenti = "Centimètre"
UnitDistanceMeterMilli = "Millimètre"
UnitDistanceMeterMicro = "Micromètre"
UnitDistanceMeterNano = "Nanomètre"
UnitDistanceMeterPico = "Picomètre"
UnitDistanceInch = "Inch"
UnitDistanceFoot = "Foot"
UnitDistanceInch = "Pouce"
UnitDistanceFoot = "Pied"
UnitDistanceYard = "Yard"
UnitDistanceMile = "Mile"
UnitDistanceAstronomicalUnit = "Unité astronomique"
UnitDistanceLightYear = "Année-lumière"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Mile"
UnitDistanceYard = "Yard"
UnitDistanceFoot = "Pied"
UnitDistanceInch = "Pouce"
UnitMassMenu = "Masse"
UnitMassGramKilo = "Kilogramme"
UnitMassGram = "Gramme"
@@ -81,13 +78,14 @@ InductanceMenu = "Inductance"
UnitSurfaceMenu = "Superficie"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hectare"
UnitSurfaceMeterSquare = "Mètre carré"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Litre"
UnitVolumeLiterDeci = "Décilitre"
UnitVolumeLiterCenti = "Centilitre"
UnitVolumeLiterMilli = "Millilitre"
UnitVolumeTeaspoon = "Cuillère à café"
UnitVolumeTablespoon= "Cuillère à soupe"
UnitVolumeTablespoon = "Cuillère à soupe"
UnitVolumeFluidOunce = "Once fluide"
UnitVolumeCup = "Tasse"
UnitVolumePint = "Pinte"
@@ -528,3 +526,5 @@ LogicalRotateRight= "Rotation droite de a par r bits"
TwosComplementToBits = "Equivalent en complément à deux"
CeilingLog2 = "Nb de bits nécessaires pour stocker a"
ExplicitNumberOfBits = "Nombre indiqué de bits"
MatricesAndVectors = "Matrices et vecteurs"
Factorial = "Factorielle"

View File

@@ -13,6 +13,7 @@ UnitTimeYear = "Év"
UnitDistanceMenu = "Távolság"
UnitDistanceMeterKilo = "Kilométer"
UnitDistanceMeter = "Méter"
UnitDistanceMeterCenti = "Centiméter"
UnitDistanceMeterMilli = "Milliméter"
UnitDistanceMeterMicro = "Mikrométer"
UnitDistanceMeterNano = "Nanométer"
@@ -24,16 +25,16 @@ UnitDistanceMile = "Mérföld"
UnitDistanceAstronomicalUnit = "Csillagászati egység"
UnitDistanceLightYear = "Fény év"
UnitDistanceParsec = "Parsec"
UnitMassShortTon = "Rövid tonna"
UnitMassLongTon = "Hosszú tonna"
UnitMassPound = "Font"
UnitMassOunce = "Uncia"
UnitMassMenu = "Tömeg"
UnitMassGramKilo = "Kilogramm"
UnitMassGram = "Gramm"
UnitMassGramMilli = "Milligramm"
UnitMassGramMicro = "Mikrogramm"
UnitMassTonne = "Tonna"
UnitMassOunce = "Uncia"
UnitMassPound = "Font"
UnitMassShortTon = "Rövid tonna"
UnitMassLongTon = "Hosszú tonna"
UnitCurrentMenu = "Áram"
UnitCurrentAmpere = "Amper"
UnitCurrentAmpereMilli = "Milliamper"
@@ -77,6 +78,7 @@ InductanceMenu = "Elektromos induktivitás"
UnitSurfaceMenu = "Terület"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hektár"
UnitSurfaceMeterSquare = "Négyzetméter"
UnitVolumeMenu = "Kötet"
UnitVolumeLiter = "Liter"
UnitVolumeLiterDeci = "Deciliter"
@@ -155,11 +157,11 @@ RandomInteger = "Véletlen egész szám [a, b] -ben"
PrimeFactorDecomposition = "Egész szám tényezö"
NormCDF = "P (X <a), ahol X az N-t követi (μ, σ2)"
NormCDF2 = "P (a <X <b) ahol X követi az N (μ, σ2)"
InvNorm = "m, ahol P (X <m) = a, X az N-t követi (μ, σ2)"
InvNorm = "m, ahol P (X <m)=a, X az N-t követi (μ, σ2)"
NormPDF = "N valószínüségi sürüsége (μ, σ2)"
BinomialPDF = "P (X = m), ahol X követi a B (n, p)"
BinomialCDF = "P (X <= m), ahol X követi a B (n, p)"
InvBinomial = "m ahol P (X <= m) = a, X követi a B-t (n, p)"
BinomialPDF = "P (X=m), ahol X követi a B (n, p)"
BinomialCDF = "P (X <=m), ahol X követi a B (n, p)"
InvBinomial = "m ahol P (X <=m)=a, X követi a B-t (n, p)"
Probability = "Valószínüség"
BinomialDistribution = "Binomiális eloszlás"
NormalDistribution = "Normál eloszlás"
@@ -409,21 +411,16 @@ NumberElementUbn = "120 - Unbinilium (Ubn)"
AlphaElementUbn = "Ubn - Unbinilium (120)"
Speed = "Sebesség"
SpeedOfSound = "Hangsebesség"
SpeedOfLightTag = "A fény sebessége"
SpeedOfSound0Tag = "Tengerszint, 20 ° C"
SpeedOfSoundWaterTag = "Vízben"
SpeedOfSoundSteelTag = "Acélban"
SpeedOfSoundGlassTag = "Üvegben"
EscapeVelocity = "Szökési sebesség"
EscapeVelocityFromEarth = "A föld"
EscapeVelocityFromMoon = "A Hold"
EscapeVelocityFromSun = "A nap"
SpeedOfLightTag = "A fény sebessége"
Thermodynamics = "Termodinamika"
BoltzmannTag = "Boltzmann Állandó"
AvogadroTag = "Avogadro Állandó"
GasTag = "Gázállandó"
Electromagnetism = "Elektromágnesesség"
CoulombTag = "Coulomb állandó"
ConductivityConstants = "Vezetőképességi konstansok"
Electricity = "Elektromosság"
ResistivityConstants = "Ellenállósági konstansok"
@@ -445,6 +442,11 @@ Water = "Víz"
Air = "Air"
Glass = "Üveg"
Wood = "Wood"
CoulombTag = "Coulomb állandó"
EscapeVelocity = "Szökési sebesség"
EscapeVelocityFromEarth = "A föld"
EscapeVelocityFromMoon = "A Hold"
EscapeVelocityFromSun = "A nap"
Vacuum_permittivityTag = "Vákuum-engedély"
Vacuum_permeabilityTag = "Vákuumpermeabilitás"
PlanckTag = "Planck Állandó"
@@ -459,6 +461,7 @@ Mass = "Tömeg"
MoonMassTag = "Hold"
EarthMassTag = "Föld"
SunMassTag = "Nap"
ParticleMass = "Részecske Tömege"
Radiuses = "Sugarak"
Length = "Hosszúság"
Distances = "Távolságok"
@@ -487,7 +490,6 @@ PlanckEnergyTag = "Planck Energia"
PlanckPowerTag = "Planck Hatalom"
FundamentalConstants = "Alapvető Állandók"
NuclearConstants = "Nukleáris És Atomi Állandók"
ParticleMass = "Részecske Tömege"
UnitSolidAngleSteradian = "Szteradiánt"
UnitLuminousFluxLumen = "Lumen"
UnitIlluminanceLux = "Lux"
@@ -524,3 +526,4 @@ LogicalRotateRight= "Forog r bitek nak a jobbra"
TwosComplementToBits = "Kettő komplementere egyenértékű"
CeilingLog2 = "Az a tárolásához szükséges bitek száma"
ExplicitNumberOfBits = "Explicit bitszám"
MatricesAndVectors = "Mátrixok és vektorok"

View File

@@ -13,17 +13,18 @@ UnitTimeYear = "Anno"
UnitDistanceMenu = "Distanza"
UnitDistanceMeterKilo = "Chilometro"
UnitDistanceMeter = "Metro"
UnitDistanceMeterCenti = "Centimetro"
UnitDistanceMeterMilli = "Millimetro"
UnitDistanceMeterMicro = "Micrometro"
UnitDistanceMeterNano = "Nanometro"
UnitDistanceMeterPico = "Picometro"
UnitDistanceInch = "Pollice"
UnitDistanceFoot = "Piede"
UnitDistanceYard = "Yard"
UnitDistanceMile = "Miglio"
UnitDistanceAstronomicalUnit = "Unità astronomica"
UnitDistanceLightYear = "Anno luce"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Miglio"
UnitDistanceYard = "Yard"
UnitDistanceFoot = "Piede"
UnitDistanceInch = "Pollice"
UnitMassMenu = "Massa"
UnitMassGramKilo = "Kilogrammo"
UnitMassGram = "Grammo"
@@ -77,13 +78,14 @@ InductanceMenu = "Induttanza"
UnitSurfaceMenu = "Superficie"
UnitSurfaceAcre = "Acro"
UnitSurfaceHectar = "Ettaro"
UnitSurfaceMeterSquare = "Metro quadro"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Litro"
UnitVolumeLiterDeci = "Decilitro"
UnitVolumeLiterCenti = "Centilitro"
UnitVolumeLiterMilli = "Millilitro"
UnitVolumeTeaspoon = "Cucchiaino"
UnitVolumeTablespoon= "Cucchiaio"
UnitVolumeTablespoon = "Cucchiaio"
UnitVolumeFluidOunce = "Oncia liquida"
UnitVolumeCup = "Tazza"
UnitVolumePint = "Pinta"
@@ -413,17 +415,12 @@ SpeedOfSound0Tag = "Livello del mare, 20°C"
SpeedOfSoundWaterTag = "In acqua"
SpeedOfSoundSteelTag = "In acciaio"
SpeedOfSoundGlassTag = "Nel bicchiere"
EscapeVelocity = "Velocità di fuga"
EscapeVelocityFromEarth = "Della terra"
EscapeVelocityFromMoon = "Di luna"
EscapeVelocityFromSun = "Di sole"
SpeedOfLightTag = "Velocità della luce"
Thermodynamics = "Termodinamica"
BoltzmannTag = "Costante di Boltzmann"
AvogadroTag = "Costanto di Avogadro"
GasTag = "Costante dei gas"
Electromagnetism = "Elettromagnetismo"
CoulombTag = "Costante di coulomb"
ConductivityConstants = "Costanti di conducibilità"
Electricity = "Elettricità"
ResistivityConstants = "Costanti di resistività"
@@ -445,6 +442,11 @@ Water = "Acqua"
Air = "Aria"
Glass = "Vetro"
Wood = "Legno"
CoulombTag = "Costante di coulomb"
EscapeVelocity = "Velocità di fuga"
EscapeVelocityFromEarth = "Della terra"
EscapeVelocityFromMoon = "Di luna"
EscapeVelocityFromSun = "Di sole"
Vacuum_permittivityTag = "Permittività del vuoto"
Vacuum_permeabilityTag = "Permeabilità al vuoto"
PlanckTag = "Costante di Planck"
@@ -524,3 +526,4 @@ LogicalRotateRight= "Ruota r bit di a verso destra"
TwosComplementToBits = "Equivalente in complemento di due"
CeilingLog2 = "Numero di bit necessari per memorizzare a"
ExplicitNumberOfBits = "Numero esplicito di bit"
MatricesAndVectors = "Matrici e vettori"

View File

@@ -13,17 +13,18 @@ UnitTimeYear = "Jaar"
UnitDistanceMenu = "Afstand"
UnitDistanceMeterKilo = "Kilometer"
UnitDistanceMeter = "Meter"
UnitDistanceMeterCenti = "Centimeter"
UnitDistanceMeterMilli = "Millimeter"
UnitDistanceMeterMicro = "Micrometer"
UnitDistanceMeterNano = "Nanometer"
UnitDistanceMeterPico = "Picometer"
UnitDistanceInch = "Duim"
UnitDistanceFoot = "Voet"
UnitDistanceYard = "Yard"
UnitDistanceMile = "Mijl"
UnitDistanceAstronomicalUnit = "Astronomische eenheid"
UnitDistanceLightYear = "Lichtjaar"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Mijl"
UnitDistanceYard = "Yard"
UnitDistanceFoot = "Voet"
UnitDistanceInch = "Duim"
UnitMassMenu = "Massa"
UnitMassGramKilo = "Kilogram"
UnitMassGram = "Gram"
@@ -77,13 +78,14 @@ InductanceMenu = "Zelfinductie"
UnitSurfaceMenu = "Oppervlakte"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hectare"
UnitSurfaceMeterSquare = "Vierkante meter"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Liter"
UnitVolumeLiterDeci = "Deciliter"
UnitVolumeLiterCenti = "Centiliter"
UnitVolumeLiterMilli = "Milliliter"
UnitVolumeTeaspoon = "Theelepel"
UnitVolumeTablespoon= "Eetlepel"
UnitVolumeTablespoon = "Eetlepel"
UnitVolumeFluidOunce = "Vloeibare ons"
UnitVolumeCup = "Kop"
UnitVolumePint = "Pint"
@@ -413,17 +415,12 @@ SpeedOfSound0Tag = "Zeespiegel, 20°C"
SpeedOfSoundWaterTag = "In het water"
SpeedOfSoundSteelTag = "In staal"
SpeedOfSoundGlassTag = "In glas"
EscapeVelocity = "Ontsnapsnelheid"
EscapeVelocityFromEarth = "Van Aarde"
EscapeVelocityFromMoon = "Van Maan"
EscapeVelocityFromSun = "Van de zon"
SpeedOfLightTag = "Lichtsnelheid"
Thermodynamics = "Thermodynamica"
BoltzmannTag = "Boltzmannconstante"
AvogadroTag = "Avogadroconstante"
GasTag = "Gasconstante"
Electromagnetism = "Elektromagnetisme"
CoulombTag = "Coulombconstante"
ConductivityConstants = "Geleidingsconstanten"
Electricity = "Elektriciteit"
ResistivityConstants = "Weerstandsconstanten"
@@ -445,6 +442,11 @@ Water = "Water"
Air = "Lucht"
Glass = "Glas"
Wood = "Hout"
CoulombTag = "Coulombconstante"
EscapeVelocity = "Ontsnapsnelheid"
EscapeVelocityFromEarth = "Van Aarde"
EscapeVelocityFromMoon = "Van Maan"
EscapeVelocityFromSun = "Van de zon"
Vacuum_permittivityTag = "Elektrische veldconstante"
Vacuum_permeabilityTag = "Magnetische veldconstante"
PlanckTag = "Planckconstante"
@@ -524,3 +526,4 @@ LogicalRotateRight= "Draai r stukjes a naar rechts"
TwosComplementToBits = "Tweeën vullen equivalent aan"
CeilingLog2 = "Aantal bits dat nodig is om a op te slaan"
ExplicitNumberOfBits = "Expliciet aantal bits"
MatricesAndVectors = "Matrices en vectoren"

View File

@@ -13,17 +13,18 @@ UnitTimeYear = "Ano"
UnitDistanceMenu = "Distância"
UnitDistanceMeterKilo = "Quilómetro"
UnitDistanceMeter = "Metro"
UnitDistanceMeterCenti = "Centímetro"
UnitDistanceMeterMilli = "Milímetro"
UnitDistanceMeterMicro = "Micrómetro"
UnitDistanceMeterNano = "Nanómetro"
UnitDistanceMeterPico = "Picómetro"
UnitDistanceInch = "Polegada"
UnitDistanceFoot = "Pé"
UnitDistanceYard = "Jarda"
UnitDistanceMile = "Milha"
UnitDistanceAstronomicalUnit = "Unidade astronómica"
UnitDistanceLightYear = "Ano-luz"
UnitDistanceParsec = "Parsec"
UnitDistanceMile = "Milha"
UnitDistanceYard = "Jarda"
UnitDistanceFoot = "Pé"
UnitDistanceInch = "Polegada"
UnitMassMenu = "Massa"
UnitMassGramKilo = "Quilograma"
UnitMassGram = "Grama"
@@ -77,13 +78,14 @@ InductanceMenu = "Indutância"
UnitSurfaceMenu = "Área"
UnitSurfaceAcre = "Acre"
UnitSurfaceHectar = "Hectare"
UnitSurfaceMeterSquare = "Metro quadrado"
UnitVolumeMenu = "Volume"
UnitVolumeLiter = "Litro"
UnitVolumeLiterDeci = "Decilitro"
UnitVolumeLiterCenti = "Centilitro"
UnitVolumeLiterMilli = "Mililitro"
UnitVolumeTeaspoon = "Colher de chá"
UnitVolumeTablespoon= "Colher de sopa"
UnitVolumeTablespoon = "Colher de sopa"
UnitVolumeFluidOunce = "Onça fluída"
UnitVolumeCup = "Copo"
UnitVolumePint = "Pinto"
@@ -409,21 +411,16 @@ NumberElementUbn = "120 - Unbinílio (Ubn)"
AlphaElementUbn = "Ubn - Unbinílio (120)"
Speed = "Velocidade"
SpeedOfSound = "Velocidade do som"
SpeedOfLightTag = "Velocidade da luz"
SpeedOfSound0Tag = "Nível do mar, 20 ° C"
SpeedOfSoundWaterTag = "Na água"
SpeedOfSoundSteelTag = "Em aço"
SpeedOfSoundGlassTag = "Em vidro"
EscapeVelocity = "Velocidade de Fuga"
EscapeVelocityFromEarth = "Fuga da Terra"
EscapeVelocityFromMoon = "De Lua"
EscapeVelocityFromSun = "Do Sol"
SpeedOfLightTag = "Velocidade da luz"
Thermodynamics = "Termodinâmica"
BoltzmannTag = "Constante Boltzmann"
AvogadroTag = "Constante Avogadro"
GasTag = "Constante de gás"
Electromagnetism = "Eletromagnetismo"
CoulombTag = "Constante de Coulomb"
ConductivityConstants = "Constantes de condutividade"
Electricity = "Electricidade"
ResistivityConstants = "Constantes de resistividade"
@@ -445,6 +442,11 @@ Water = "Água"
Air = "Ar"
Glass = "Vidro"
Wood = "Madeira"
CoulombTag = "Constante de Coulomb"
EscapeVelocity = "Velocidade de Fuga"
EscapeVelocityFromEarth = "Fuga da Terra"
EscapeVelocityFromMoon = "De Lua"
EscapeVelocityFromSun = "Do Sol"
Vacuum_permittivityTag = "Permissividade a vácuo"
Vacuum_permeabilityTag = "Permeabilidade ao vácuo"
PlanckTag = "Constante de Planck"
@@ -524,3 +526,5 @@ LogicalRotateRight= "Girar r bits de a para a direita"
TwosComplementToBits = "Complementar de dois equivalente"
CeilingLog2 = "Número de bits necessários para armazenar a"
ExplicitNumberOfBits = "Número explícito de bits"
MatricesAndVectors = "Matrizes e vetores"
Factorial = "Fatorial"