diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-06-07 20:36:32 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-06-11 04:07:36 (GMT) |
| commit | 17e85ad3e0bb4fab4be6c1dbd5129cb0e68792ee (patch) | |
| tree | 5c3bc01d79266c0a1bd9d7b923fc0f073cd582c0 /src/displayapp/screens/Calculator.h | |
| parent | 7f08e2c63608185b741fd5270a0aee4bd225f140 (diff) | |
Calculator: bugfixes, reduce binary size.calc-onto-analog24
Don't use dynamically allocated stacks.
Clarify and simplify code a bit.
Add some comments and reduce code duplication.
Fixes:
* Display correctly decimal parts starting with zero, such as 0.09
* Handle correctly expressions like '-(5+11)'=-16 or '3*-(5+11)'=-48
Diffstat (limited to 'src/displayapp/screens/Calculator.h')
| -rw-r--r-- | src/displayapp/screens/Calculator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/displayapp/screens/Calculator.h b/src/displayapp/screens/Calculator.h index 25c4456..06818f6 100644 --- a/src/displayapp/screens/Calculator.h +++ b/src/displayapp/screens/Calculator.h @@ -5,7 +5,6 @@ #include "Screen.h" #include "components/motor/MotorController.h" #include <array> -#include <string> namespace Pinetime { namespace Applications { @@ -27,7 +26,8 @@ namespace Pinetime { char text[31]; uint8_t position = 0; - void eval(); + bool Eval(); + void Reset(); Controllers::MotorController& motorController; }; |
