1
0
Fork 0
wasp-os/wasp/apps
Daniel Thompson 21210c5c07 apps: calc: Rewrite the display and calculation engine
Currently calculations such as 22/7 do not work correctly on the
simulator (which uses double precision floating point). Fix this
by explicitly truncating the strings when needed.

Additionally the current calculate() method has some problems when
the calculation cannot be evaluated since it will needlessly clear out
the calculation. Push calculate (and the exception handling) into the
caller and report errors using the vibration motor instead.

Finally we rename display_output() to the more idiomatic _update().

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 08:59:53 +00:00
..
alarm.py apps: alarm: Fix touch handling when the alarm is ringing 2020-11-29 19:14:31 +00:00
calc.py apps: calc: Rewrite the display and calculation engine 2020-12-29 08:59:53 +00:00
chrono.py apps: chrono: Minor visual improvements 2020-12-27 18:19:07 +00:00
clock.py icons, fonts.digits: Switch over to 2-bit RLE encoding 2020-12-28 12:01:15 +00:00
demo.py apps: demo: Move the logo into the demo app 2020-05-17 14:37:44 +01:00
fibonacci_clock.py docs: Add an Application Library chapter 2020-11-08 14:28:38 +00:00
flashlight.py README: Add a (fairly) comprehensive screenshot tour 2020-08-16 18:48:15 +01:00
gameoflife.py docs: Add an Application Library chapter 2020-11-08 14:28:38 +00:00
haiku.py apps: haiku: Add a simple Haiku viewer 2020-10-10 12:12:59 +01:00
heart.py README: Add a (fairly) comprehensive screenshot tour 2020-08-16 18:48:15 +01:00
hello.py docs: Introduce the Application Writer's Guide. 2020-05-11 21:44:30 +01:00
launcher.py README: Add a (fairly) comprehensive screenshot tour 2020-08-16 18:48:15 +01:00
musicplayer.py apps: music: Add to application index 2020-11-22 09:22:50 +00:00
pager.py apps: pager: notifications: improve swipe handling 2020-11-29 09:12:14 +00:00
settings.py apps: settings: Add Scroll Indicator 2020-12-05 20:51:27 +00:00
snake.py apps: snake: Update artwork 2020-12-28 10:08:15 +00:00
steps.py apps: steps: Use the alarm system to reset the step counter at midnight 2020-11-14 12:25:32 +00:00
stopwatch.py manager: Introduce shared "system bar" 2020-11-04 19:00:37 +00:00
template.py docs: Introduce the Application Writer's Guide. 2020-05-11 21:44:30 +01:00
testapp.py draw565: Add width to the line drawing function 2020-12-27 08:52:54 +00:00