Commit Graph

275 Commits

Author SHA1 Message Date
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
Léa Saviot
5f549b514e [escher] Fix backspace on utf8 combining code point 2019-06-21 14:30:14 -04:00
Léa Saviot
1043426c40 [ion/utf8] next/previousGlyphPosition methods and tests 2019-06-21 14:30:14 -04:00
Léa Saviot
abb94feea9 Merge branch 'master' into f7 2019-06-14 16:03:59 +02:00
Léa Saviot
872de8deef [ion/utf8_helper] Fix StringGlyphLength 2019-06-14 08:16:55 -04:00
Émilie Feral
0d1efdfd78 Merge branch 'master' into f7 2019-06-13 12:12:55 -04:00
Léa Saviot
2061c5d692 [escher/text_area] Fix text indentation handling
We used a small buffer to preprocess a text to insert in text area (add
indentation, remove empty code points, compute the next cursor location),
but the size of this buffer was sometimes too small and caused a crash.
Now we do all the text odification in place in the text area buffer.
2019-06-13 11:40:13 -04:00
Léa Saviot
50bbae5e06 [ion/unicode] StringGlyphLength method 2019-06-13 10:37:47 -04:00
Léa Saviot
6e27c7aec7 [ion/crc] Fix crc: n0100 does not have 8-bits hardware implementation 2019-06-06 14:34:09 +02:00
Léa Saviot
b14475738e [ion] PrintInt::Left and PrintInt::Right
Right pads the left of the integer with zeroes.
2019-06-03 10:19:45 +02:00
Léa Saviot
8597f47c36 [apps/POSTAndHWTest] In LCDDataOK iterate on Text and Tiling tests 2019-05-29 14:06:42 +02:00
Ruben Dashyan
d0ba2e9e76 [ion/events] Fix typo: arcsin -> asin and so on 2019-05-27 15:51:47 +02:00
Émilie Feral
9ebff093e5 [ion] Fix simulator build 2019-05-27 09:29:55 -04:00
Léa Saviot
9a1eb3ede9 [ion/display] Add timeout in waitForVBlank 2019-05-22 16:49:15 +02:00
Léa Saviot
c85358967b [POST/HardwareTest] Change pattern in LCDDataTest
The pattern is a tiling of checkers of colors 2**k with k between 0 and
15 and their contraries.
This fixed a problem of failing LCD screens not detected.
2019-05-22 16:49:15 +02:00
Émilie Feral
76854bd6bd [ion] Create a modified 'getEvent' to make a benchmark of execution
timings
2019-05-22 08:58:57 -04:00