Rockbox

  • Status Closed
  • Percent Complete
    0%
  • Task Type Patches
  • Category Plugins
  • Assigned To
    bagder
  • Operating System
  • Severity Very Low
  • Priority Defer
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by lefthands - 2004-05-03
Last edited by zeekoe - 2004-08-26

FS#2178 - Calculator

Features:
- Scientific number format core code. Support range
10^-999 ~ 10^999
- Number of Significant Figures up to 10

Limitations:
- Right now, only accept “num, operator (+,-,*,/), num,
=” input sequence.

Input "3, +, 5, -, 2, =", the calculator will only do 5-2 

and result = 3

You have to input "3, +, 5, =, -, 2, =" to get 3+5-2 = 6

- “*,/” have no priority. Actually you can’t input 3+5*2
yet.

User Instructions:
use arrow button to move cursor, “play” button to
select, “off” button to exit
F1: if typing numbers, it’s equal to “Del”; otherwise,
equal to “C” F2: circle input “+, -, *, /” F3: equal to “=”

“MR” : load temp memory
“M+” : add currently display to temp memory
“Del” : delete last input
“CE” : clear currently input
“C” : reset calculator

Closed by  bagder
2004-05-19 09:19
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Logged In: YES
user_id=1110

Added to CVS just now!

add sqrt() function based on the algorithm BlueChip told me.
Thanks! Math is beautiful.

fix a LCD display bug
sin,cos,log is coming soon

- Add sin, cos function, delete “Del”,”CE” button

- Now accept “num, operator (+,-,*,/), num, operator, ….. ,
= " input sequence

- Add delete animation, button press animation

- fix some bugs

Anonymous Submitter commented on 2004-05-10 01:39

Hey, excellent work!

All i see is one bug: the last number is chopped off…

So if i input

4 * 4 = 16

all i see is
<blank> * <blank> = 1.

Hope this can get fixed, nice job otherwise..

Also, looks like you’re running out of room on that keypad!
:) you could use ON to swap between basic functions and
scientific ones.

-zakk

I couldn’t repeat the bug you said. Can you try the latest
file? There were several display bugs in the initial release.
There might a bug like this before.

“switch” or “2nd” button is not hard to realize. But the
scientific fucntion is a little hard to code. Sin,cos are the
only scientific ones I have:) I have to wait until I have more
to add “2nd” button.

Anonymous Submitter commented on 2004-05-10 19:10

you could move:

sin, cos, log, tan, x^2, x^3, sqrt, and ^ to scientific
leaving all the memory and basic functions to normal mode.

I’ll try the update on tuesday, but i thought i had the most
recent file…

Anonymous Submitter commented on 2004-05-10 19:10

you could move:

sin, cos, log, tan, x^2, x^3, sqrt, and ^ to scientific
leaving all the memory and basic functions to normal mode.

I’ll try the update on tuesday, but i thought i had the most
recent file…

Anonymous Submitter commented on 2004-05-12 03:14

Still having the problem…

This is on the target by the way.

Zakk

Ok, I got the bug. You must be using the latest daily build,
while I am using the official v2.2. There is a change in
snprintf.c since 04/22 build and thereafter, which is a core
funtion for LCD display generation. I updated my program and
tested on 05/12 build.

Besides, I added the “2nd” button and some other functions.
But only sin, cos, n! are working.

Anonymous Submitter commented on 2004-05-12 14:35

Sounds good! I’ll try it again today, then.

Anonymous Submitter commented on 2004-05-12 22:42

Wow! excellent work.

It also looks like all of the 2nd functions work - is this
correct?

.
.
.
Hey dude,

Glad to see you got everything working - looking sharp :)

Hope you’re okay with this little request:

As you may know, the Rockbox guys refuse point-blank to
credit me for my work - it would be real nice to see my name
credited in your source code.

No great banner, just a “thanks to BlueChip for the sqrt()
function” (or whatever) would be nice.

I realise that only other techies will ever see it in there - but
it’s always nice to feel appreciated :-)

Hang loose,

BlueChip
.
.
.

Zakk:

No, the other 2nd funtions are not working. I forgot to
disable them and they just overlapped with the buttons on
1st screen. I’ve fix this.

I am just thinking: with the help of F1,F2,F3 shortkey, we
probably don’t even need 1st screen.

BlueChip:

Sure, I can add thanks credit. while then I also added the
name of the college teacher who told me the name of the
algorithm. But I recently planed to use the unified method to
do trigonometric, hyperbolic, exponential and logarithmic, as
well as square root.

Project Manager

Now the disinformation starts (again).

“the Rockbox guys” do not refuse credit to anyone. We
include the full name of every known Rockbox contributor we
know of.

You refuse to state your name so we can’t include it. That’s
your choice, not ours.

Badger,

I’m glad to discover I am wrong - it is the second best way to
learn (The best way being to discover that someone else who
shares your views is wrong ;) )

My very real & well known online name is and has always been
“Bluechip” (for some 20-odd years now.) I consider the details
on my Birth Ceritifcate, Passport, Bank Account etc. to be
“private & personal.” I am sure you can appreciate that.

Cheers,

BlueChip

Project Manager

Added to CVS just now!

not sure if bug reporting has to be done here, but i’ll just do it.
the M+ doesn’t always work correct.
Example:
press 8, M+, MR → 8 is in memory
now press CE, M+ so you should add 0 to the memory.
press MR → 0.8 is in memory!
press 18, M+, MR → 18 is in mem
now press CE, M+, and 1.8 is in memory.
now thinking of it, maybe i can fix it myself. But I’m lazy and
too busy right now :)

woo~~ I don’t even know that this patch tracker still exists
after it was added to CVS. I can’t find it through search or
browse. Anyway, thanks for the bug report, I’ll check it for
sure. just don’t know how to change the official file in CVS.

it seems i can search better :-) i think you need cvs acces (which you have to earn by writing
consistently good code, i read) or ask someone with cvs
access to do it (just Daniel Stenberg again, or ask a bit around
on #rockbox, i guess…)
i hope you can find the bug. nice calc btw :)

I found the bug several days after Linus did. Linus has made
change in CVS. The bug is because I forgot a pair of
brackets:)

ah… well, nice that it’s fixed now :)

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing