Commit Graph

11243 Commits

Author SHA1 Message Date
Émilie Feral
a3f669fb08 [escher] TextView: avoid useless markRectAsDirty when updating
backgroundColor and textColor
2019-05-03 15:54:20 +02:00
Émilie Feral
80078137d5 [calculation] Display exact and approximate outputs in the
calculation history when the output is selected for calculations
involving decimal numbers (1.2)
2019-05-03 15:54:20 +02:00
Émilie Feral
6fd5cb360b [calculation] Improve Calculation model: new display mode
ExactAndApproximateToggle
2019-05-03 15:54:20 +02:00
Émilie Feral
50ad6b6761 [escher] SelectableTableViewDataSource: avoid calling m_delegate->tableViewDidChangeSelection when only reloading the data. 2019-05-03 15:54:20 +02:00
Ruben Dashyan
1081127c97 [apps/calculation] Simplify HistoryViewCell::handleEvent 2019-05-03 15:54:20 +02:00
Ruben Dashyan
a3fe99da21 [escher] Simplify TableView::scrollToCell 2019-05-03 15:54:20 +02:00
Ruben Dashyan
2d7c87d461 [apps/calculation] HistoryViewCell does not need to hold layouts 2019-05-03 15:54:20 +02:00
Émilie Feral
0e3d199221 [poincare] Keep unused log function when building with POINCARE_TREE_LOG 2019-05-03 15:54:20 +02:00
Émilie Feral
7836288ac0 [poincare] Power: fix infinite loop
Factorizing 1+(8+sqrt(6))^(1/2)^(-1) on the same denominator would lead
to an infinite loop in Real mode (because (8+sqrt(6))^(1/2)^(-1) is not
simplified to (8+sqrt(6))^(-1/2))
2019-05-03 15:54:20 +02:00
Émilie Feral
a839c88883 [sequence] Fix isDefined 2019-05-03 15:54:20 +02:00
Émilie Feral
3ebb42bf9d [poincare] Fix Layout::replaceWithJuxtapositionOf (keep an empty layout
if both children are empty)
2019-05-03 15:54:20 +02:00
Émilie Feral
20cd002e3e [graph] Fix build 2019-05-03 15:54:20 +02:00
Émilie Feral
34001fc094 [apps] BatteryView: avoid redrawing when battery picto switch from 'low'
to 'empty' (the pictograms for low and empty are identical)
2019-05-03 15:54:20 +02:00
Ruben Dashyan
04675f1a5b [apps/graph/graph] Add Preimage controllers to CalculationParameterController 2019-05-03 15:54:20 +02:00
Ruben Dashyan
682fa3f294 [apps/graph/graph] CalculationParameterController inherits from ListViewDataSource
instead of SimpleListViewDataSource
2019-05-03 15:54:20 +02:00
Ruben Dashyan
938c7a1a45 [apps/graph/graph] Define PreimageParameterController class 2019-05-03 15:54:20 +02:00
Ruben Dashyan
439474b23b [apps/graph/graph] Define PreimageGraphController class 2019-05-03 15:54:20 +02:00
Ruben Dashyan
2019000601 [apps/graph] Add preimage to i18n 2019-05-03 15:54:20 +02:00
Émilie Feral
b8522f1ef0 [apps] AppsContainer: 'shutdownDueToLowBattery' can be call when the
battery is actually LOW (due to some oscillations between LOW and
EMPTY). Handle that case
2019-05-03 15:54:20 +02:00
Émilie Feral
7b7cc0bb2f [apps] BatteryView: when the battery is EMPTY and the device hasn't
shut down yet, avoid drawing full battery (and breaking assertion)
2019-05-03 15:54:20 +02:00
Léa Saviot
530fbfed56 [poincare/tests] More tests on randint 2019-05-03 15:54:20 +02:00
Léa Saviot
7afeb6e3ef [poincare/randint] Do not accept infinite bounds
Before, randint(1,inf) would give inf
2019-05-03 15:54:20 +02:00
Léa Saviot
939136d794 [poincre/randint] Randit simplifies itself to its approximation 2019-05-03 15:54:20 +02:00
Léa Saviot
1ecfb4af83 [poincare/tests] randint's simplification gives its approximation 2019-05-03 15:54:20 +02:00
Léa Saviot
8ea5f1b642 [apps/calc] If result contains random/round, display approximation only 2019-05-03 15:54:20 +02:00
Léa Saviot
a8e7208a30 [apps/calculation/tests] Tests on displayExactApprox for random/round 2019-05-03 15:54:20 +02:00
Léa Saviot
3a390111d8 [python/urandom] Use Ion::random to seed urandom 2019-05-03 15:54:20 +02:00
Léa Saviot
447c2f63e1 [python/urandom] Add init method to seed the Yasmarang generator.
This commit should disappear as it will be in one of the next stable
micropython versions
2019-05-03 15:54:20 +02:00
Léa Saviot
352850e481 [python] Fix typo 2019-05-03 15:54:20 +02:00
Léa Saviot
b360639e4e [apps/text_field_delegate_app] Fix XNT in a sum layout
It was broken by a blunder while swithching to UTF8
2019-05-03 15:54:20 +02:00
Émilie Feral
ca6ed6ab3b [kandinsky] Fonts: improve glyph % 2019-05-03 15:54:20 +02:00
Émilie Feral
32f4140637 [sequence] Cache context does not need to be a variable context
Fix crash: u(n) = n(n-1) would crash at evaluation
2019-05-03 15:54:20 +02:00
Émilie Feral
f453508321 [calculation] Fix tests with no symbolic computation 2019-05-03 15:54:20 +02:00
Émilie Feral
ce94b3d67a [apps] Redraw battery pictogram after a reset 2019-05-03 15:54:20 +02:00
Émilie Feral
d83fd2c073 [ion] Battery: change battery thresholds (LOW, EMPTY) 2019-05-03 15:53:21 +02:00
Émilie Feral
920f95997a [ion] Dim Brightness before shutting down when the battery low 2019-05-03 15:53:21 +02:00
Léa Saviot
972d86469f [poincare] Fix Layout::replaceWithJuxtapositionOf 2019-05-03 15:53:21 +02:00
Léa Saviot
b007286581 [apps/calc] displayExactOuputOnly only if the input is store in function
This prevents 1+x->f(x) from displaying 1+x = undef
[[1,2]] + [[1][2]] displays undef
2019-05-03 15:53:21 +02:00
Léa Saviot
6f7fe5089a [apps/calculation] Calculation::DisplayOutput can be Exact/Approx/Both 2019-05-03 15:53:21 +02:00
Ruben Dashyan
7b426adf5b [escher] Fix ExpressionField::inputViewHeight
Since commit

  [escher] Implement ScrollView::minimalSizeForOptimalDisplay including margins

minimalSizeForOptimalDisplay includes the ScrollView margins.
2019-05-03 15:53:21 +02:00
Léa Saviot
e8b3db76b2 [python/turtle] Fix rounding errors
Some horizontal/vertical lines were not properly drawn
Example script:
from math import *
from turtle import *
def a():
  def carre(n):
    fd(n)
    right(90)
    fd(n)
    right(90)
    fd(n)
    right(90)
    fd(n)
    right(90)
  penup()
  goto(-158,109)
  pendown()
  carre(100)
  for j in range(10):
    for i in range(26):
      penup()
      fd(2)
      pendown()
      carre(10)
      penup()
      fd(10)
      pendown()
    penup()
    goto(-158,109-10*(j+1))
    pendown()
2019-05-03 15:53:21 +02:00
Léa Saviot
bcfe9469e8 [apps/tests/solver] Test equations + symbolic computation 2019-05-03 15:53:21 +02:00
Léa Saviot
9e64655f5a [poincare/tests] Parametered expressions + symbolic computation 2019-05-03 15:53:21 +02:00
Léa Saviot
9472cc75b9 [poincare] Use ParameteredExpression in Symbol::shallowReduce 2019-05-03 15:53:21 +02:00
Léa Saviot
3dc8c11347 [poincare] Parametered expression 2019-05-03 15:53:21 +02:00
Léa Saviot
f95cbd4998 [poincare] Do not replace a symbol if it is an expression's parameter 2019-05-03 15:53:21 +02:00
Léa Saviot
6839c9f8a2 [apps/calculation] Add tests about no symbolic computation 2019-05-03 15:53:21 +02:00
Léa Saviot
f14c56badf [calculation/test] Rename some test method arguments 2019-05-03 15:53:21 +02:00
Léa Saviot
3774c343d1 [test] Fix tests for unknown symbol is not real 2019-05-03 15:53:21 +02:00
Léa Saviot
8b6fa5a79d [poincare] A non defined symbol is not real
This fixes the equation "conj(x) * x +1", that should not be treated as
a polynom
2019-05-03 15:53:21 +02:00