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
0f61b2ccf3
[ion] Add comment on default collectRegisters implementation
2020-05-18 14:39:46 +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
Émilie Feral
870dd868e9
[ion] Tidy files:
...
- move from shared to simulator/shared
- delete files used only be deprecated blackbox
2020-04-15 09:11:52 -04:00
Romain Goyet
84768472bd
Explicit std::min/max template usage
...
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0
Use std::min and std::max
2020-04-14 09:31:02 -04: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
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
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
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
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
Émilie Feral
a1b2cbb0a9
[ion] Unicode: clean warning
2020-02-12 15:13:19 +01:00
Léa Saviot
c03c9086b8
[ion/utf8_helper] Add FIXME comment
2020-02-12 15:13:18 +01:00
Léa Saviot
961ba10122
[ion/events] shift+Left/Right/Up/Down can be repeated
2020-02-12 15:13:17 +01:00
Léa Saviot
ab48f8d879
[ion/events] if shift/alpha pressed, it is active
...
No need to press shift between ezach event -> one long shift press keeps
it active
2020-02-12 15:13:17 +01:00
Léa Saviot
bb69b2c131
[ion/events_modifier] Reindent
2020-02-12 15:13:17 +01:00
Léa Saviot
4ffcace024
[ion/storage] Add TODO about code optimization
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
É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
Émilie Feral
4c11e73ad3
[ion] UTF8Helper: fix CopyAndRemoveCodePoint to avoid copying truncated
...
code point in the buffer
2019-11-25 17:39:26 +01:00
Léa Saviot
5f7692686f
[ion/storage] Fix memoization dirtying when renaming a record
...
Don't forget to update the CRC32 of the record
Scenario : New funciton f(x) = 1, change it to parametric, rename it
a(t), creae a new function -> instead of being empty, it is has a
"ghost" value of [t 1].
2019-11-25 17:32:43 +01:00
Romain Goyet
e857e7a297
[ion] Avoid a cast from NULL to \0
2019-10-16 10:01:00 +02:00
Romain Goyet
e81426f93b
[build] Clean the different targets
2019-10-01 15:38:27 +02:00
Léa Saviot
d9f650d283
[ion/utf8_helper] HasCodePoint
2019-09-09 13:30:04 +02:00
Émilie Feral
77304040ad
[ion] Storage: fix crash due to wrong assertion
...
Python tries to import files without extension, it should not crash but
return an empty Record.
2019-09-02 16:55:39 +02:00
Léa Saviot
5235f74852
[ion/storage] Memoize last retrieved record
...
Faster Graph navigation
2019-08-30 10:47:15 +02:00
Émilie Feral
2861a35840
Clean some warnings
2019-08-08 16:29:38 +02:00
Léa Saviot
a2bda4b955
[ion/utf8_helper] Fix RemoveCodePoint
...
The index to update was not updated properly
2019-08-08 16:19:53 +02:00
Léa Saviot
b2efb478e6
[ion/utf8_helper] Remove unused method parameter
2019-08-08 16:19:53 +02:00
Léa Saviot
8c8dec05c9
[ion/utf8_helper] Optimize NotCodePointSearch for one byte long c
2019-08-08 16:19:53 +02:00
Émilie Feral
2d8f98942e
[ion] LED changes color on charging event only for N0110 model
2019-08-08 15:54:41 +02:00
Léa Saviot
3a953e19c4
[ion/dummy] Fix method implementation namespace
2019-08-07 11:15:28 +02:00
Léa Saviot
f5a7a44546
[apps/ion] Factorize code and TODO
2019-08-07 11:15:28 +02:00
Léa Saviot
a450ce3855
Merge branch 'master' into f7
2019-08-06 17:40:14 +02:00
Léa Saviot
606e132747
[apps/bench] Change LCD Data pattern (tiling red/blue/green)
2019-07-12 17:50:38 +02:00
Léa Saviot
bf9ba7b363
[apps/hardware_test] ColorsLCDTest
2019-07-05 12:25:50 +02:00
Léa Saviot
5a8596acd7
[ion/utf8_helper] Put default parameter in RemovePreviousGlyph
2019-06-21 14:30:14 -04:00