mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/apps_container] Add timer to circuit breaker
poincareCircuitBreaker requires the Back key to be pressed for at least
50 ms before interrupting a computation.
This is effectively invisible for the user, but fixes a bug in
Calculation :
- When leaving the additional results for a result using units by
pressing the Back key, a reduction preceding a call to removeUnits
would be interrupted, causing an undefined behaviour.
Change-Id: Iec667ae964f190de2171850cc22e1726959e6cb5
This commit is contained in:
committed by
Émilie Feral
parent
df6383d2d8
commit
504223612d
@@ -254,9 +254,6 @@ Calculation::AdditionalInformationType Calculation::additionalInformationType(Co
|
||||
}
|
||||
if (o.hasUnit()) {
|
||||
Expression unit;
|
||||
/* FIXME : When this method is accessed via leaving the additional outputs,
|
||||
* ie via a press on BACK, the reduction is interrupted, and removeUnit
|
||||
* goes badly.*/
|
||||
PoincareHelpers::Reduce(&o, App::app()->localContext(), ExpressionNode::ReductionTarget::User, ExpressionNode::SymbolicComputation::ReplaceAllSymbolsWithDefinitionsOrUndefined, ExpressionNode::UnitConversion::None);
|
||||
o = o.removeUnit(&unit);
|
||||
double value = PoincareHelpers::ApproximateToScalar<double>(o, App::app()->localContext());
|
||||
|
||||
Reference in New Issue
Block a user