Commit Graph

294 Commits

Author SHA1 Message Date
Léa Saviot
ad80c2c4d7 [ion/keyboard] Do not define constexpr arrays in headers
They are duplicated in each compilation unit where they are called
2020-11-04 15:33:05 +01:00
Gabriel Ozouf
28d18dd6a5 [ion/utf8_helper] Signedness and capitalization
Change-Id: I3451a206fbd45a490eea0115621c07abb868344a
2020-11-04 15:33:00 +01:00
Gabriel Ozouf
67e6e38825 [poincare/parsing] Parse degree sign ° in units
Change-Id: I518aba17214b049dfa8fd3b89f4ce124dbd6b41a
2020-11-04 15:33:00 +01:00
Arthur Camouseigt
8f97a332f6 [Python] Modified the paste effect in script and shell area
When a formula is pasted in a script or in the shell, some symbols are
replaced by their equivalent in python :
x turns into *
^ turns into **
√ turns into sqrt
etc
Change-Id: If6f2a22d4f3c148c2655e0892023b0e28058a9a6
2020-11-04 15:32:59 +01:00
Hugo Saint-Vignes
b92c819ea2 [escher/src/text_area] Add char limit in text_area line
Change-Id: I9284936f0202d788edc785aa3f7c82b45ab34cf5
2020-11-04 15:32:59 +01:00
Hugo Saint-Vignes
688394abce [ion] Set stack pointer when testing as well
Change-Id: Ibeae7961535208c224f9ac51f4cf33e3978665b3
2020-11-04 15:32:58 +01:00
Hugo Saint-Vignes
70a628f2c8 [apps] Fix Python assert crash on malloc free
Change-Id: I48f86422f7d6af5227e2556e6ef531dfad696da4
2020-11-04 15:30:53 +01:00
Hugo Saint-Vignes
433639c471 [ion] Implement dynamic scroll speed profile
Change-Id: Ib3ec2ef63d19bfb88b627f06bcc185fa1b232223
2020-11-04 15:07:19 +01:00
Hugo Saint-Vignes
af32f33141 [ion] Remove unused function and rename longRepetitionScrollSpeed
Change-Id: I11268eb34060c74eb8770ba0eb999f84737c76d8
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
b60c67ff88 [apps] Factorize scrolling speed for long repetition
Change-Id: I5fcfaf04e418942664641c4b1cd044cda7f5aebb
2020-11-04 14:45:34 +01:00
Émilie Feral
1f81c97371 [ion] USB::DFU takes an argument specifying if the DFU mode should be
leavable from keyboard
2020-10-27 08:50:05 +01:00
Émilie Feral
4620aa8aa8 [ion] Remove useless comment 2020-09-30 17:30:34 +02:00
Léa Saviot
b020cb2f98 [ion/simulator] Add haptic feedback 2020-09-30 17:30:34 +02:00
Émilie Feral
1c0f6a7913 [ion] Keyboard: don't detect a key down when the mouse is too far away
from a key
2020-09-30 17:30:34 +02:00
Léa Saviot
eeb42f2544 [apps/code] autocompletionText uses the right text length
Before, there was no notion that the autocompleted text might not be a
null terminated string.
2020-06-04 14:50:03 +02:00
Léa Saviot
f883516716 [apps/code] Editor asks VariableBox for autocompletion 2020-06-04 14:50:03 +02:00
Léa Saviot
1e2492c5f4 [apps/code] Autocomplete only at the end of the word
For instance, if the cursor is: "he|llo" and the user adds the letter
'i', there is no autocompletion provided as the cursor is still in the
middle of a word.
2020-06-04 14:50:03 +02:00
Léa Saviot
f82079a40a [apps/code] Autocomplete only if char before cursor is not ' ' or '\n' 2020-06-04 14:50:03 +02:00
Léa Saviot
343d2328b8 [ion/utf8_helper] EndOfWord helper 2020-06-04 14:50:03 +02:00
Émilie Feral
3f6647f3ae [ion][python] Implement an architecture-dependant collect_registers.
setjmp is not guaranteed to collect all registers without modification
on all platforms.

This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.
2020-05-18 14:39:46 +02:00
Léa Saviot
efe5b4d6f8 [ion/storage] Private constructor and cleaner sharedStorage() 2020-05-07 06:22:42 -07:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Joachim Le Fournis
4a9bfca1f6 [ion] Alpha-locked percent becomes backspace 2020-04-09 12:09:03 -04:00
Romain Goyet
743eb104bf [ion] Replace Ion::Events::Event::id() by an explicit cast operator 2020-04-08 09:56:33 +02:00
Romain Goyet
35d446353f [escher] Avoid long switches on Left/Up/Right/Down 2020-04-08 09:56:33 +02:00
Neven Sajko
1c9b402645 [ion] Remove volatile qualifier from millis return type
Qualification of an integer return type as volatile is ignored by the
compiler. To clarify, an integer value (not a variable), which is what
the return type is, can not be assigned to anyway, so qualification as
volatile does not make sense.
2020-04-06 17:18:03 +02:00
Léa Saviot
4a4ba52e38 [ion/events] Better handling of Shift on the web target 2020-03-11 15:36:52 +01:00
Romain Goyet
670490e642 [ion] Add a telemetry API 2020-02-17 10:31:24 -05:00
Romain Goyet
aa0dbee303 [ion] Console::writeLine can ommit trailing CR/LF 2020-02-17 10:31:24 -05:00
Émilie Feral
0c55ea4531 [ion] unicode: UTF8Helper::CopyAndRemoveCodePoints returns a boolean
which is true if the whole source was copied
2020-02-12 15:13:24 +01:00
Léa Saviot
ae3fa46191 [escher/text_field] Fix handling of \n
The buffer length did not take into account the \n removal. In fact, we
could just remove the \n while also removing the empty code points,
which is what we do now.
2020-02-12 15:13:24 +01:00
Ruben Dashyan
844a28db7b [poincare/parsing/tokenizer] Token::Identifiers may contain Greek letters except pi 2020-02-12 15:13:23 +01:00
Léa Saviot
b29d014695 [escher/text_field] Fix removing of \n in insertTextAtLocation
Scenario: Copy a text with \n (for instance from a script), then paste
it in a script name -> if \n are replaed with \0 instead of just being
removed, there are problems with the extension
2020-02-12 15:13:23 +01:00
Ruben Dashyan
179ce5d5d5 [ion/unicode/codepoint] Rename is[(Lower|Upper)Case]Letter to isLatin[(Small|Capital)]Letter
to conform with unicode terminology
2020-02-12 15:13:23 +01:00
Ruben Dashyan
575b911da9 [ion/unicode] Split isDigit into isDecimalDigit, isBinaryDigit, isHexadecimalDigit 2020-02-12 15:13:23 +01:00
Ruben Dashyan
9b0b4e3096 [ion/unicode] Define and use CodePoint const methods
isLowerCaseLetter
isUpperCaseLetter
isLetter
isDigit

Remove similar ones from UTF8Helper and from Poincare::Tokenizer.
2020-02-12 15:13:23 +01:00
Léa Saviot
d70c4c7205 [ion] Typo 2020-02-12 15:13:22 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
2020-02-12 15:13:21 +01:00
Léa Saviot
8cf13adaf0 [apps/editor_controller] Handle deleted scripts in cleanStorageEmptySpace 2020-02-12 15:13:18 +01:00
Léa Saviot
30923ed4c6 [escher/text_area] Select up/down 2020-02-12 15:13:17 +01:00
Léa Saviot
0209c6d2d4 [ion/storage] Increase size to 32K 2020-02-12 15:13:16 +01:00
Léa Saviot
5853e96947 [apps/code] Remove EditorController::m_areaBuffer
This was a very large buffer that took a lot of RAM space (the size of
the storage). Instead of having it, we just move the available space of
the storage at the end of the edited script, and move it back when the
edition finishes.
This is slower but saves a lot of space.
2020-02-12 15:13:16 +01:00
Léa Saviot
b9bc9008ac [ion] Detect long repeated events
This will be use for instance to sroll faster if the user presses the
directional keys for a long time
2020-02-12 15:13:15 +01:00
Léa Saviot
973c2149d4 [ion/battery] Battery level has some hysteresis
This prevents a blinking battery pictogra wwhen the battery level is at
the limit between two states.
2020-02-12 15:13:15 +01:00
Ruben Dashyan
c3cf5c1ef4 Rename UCodePointUnknownX to UCodePointUnknown 2020-02-12 15:13:15 +01:00
Émilie Feral
f4de842a86 [ion] Change exam mode to have 3 states (off, standard, Dutch) 2019-12-19 15:52:45 +01:00
Léa Saviot
ebc5843795 [apps/ion/exam_mode] Store the exam mode activation in the flash
This way, it is not cleared by a reset
2019-12-11 13:51:38 +01:00
Romain Goyet
758c217120 [ion] ion_main takes const arguments 2019-10-16 10:01:00 +02:00
Ruben Dashyan
259eb35cf4 Revert ""Almost equal to" sign in banner views"
This reverts commit bd5a247858.
2019-09-26 10:36:17 +02:00
Ruben Dashyan
bd5a247858 "Almost equal to" sign in banner views 2019-09-23 17:31:02 +02:00