Rockbox

Tasklist

FS#2178 - Calculator

Attached to Project: Rockbox
Opened by Isaac (lefthands) - Monday, 03 May 2004, 08:46 GMT
Last edited by zeekoe (zeekoe) - Thursday, 26 August 2004, 20:54 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To Daniel Stenberg (bagder)
Operating System
Severity Very Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

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
This task depends upon

Closed by  Daniel Stenberg (bagder)
Wednesday, 19 May 2004, 09:19 GMT
Reason for closing:  Accepted
Additional comments about closing:  Logged In: YES
user_id=1110

Added to CVS just now!
Comment by Isaac (lefthands) - Monday, 03 May 2004, 09:39 GMT

add sqrt() function based on the algorithm BlueChip told me.
Thanks! Math is beautiful.
Comment by Isaac (lefthands) - Tuesday, 04 May 2004, 05:29 GMT

fix a LCD display bug
sin,cos,log is coming soon
Comment by Isaac (lefthands) - Sunday, 09 May 2004, 05:13 GMT

- 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
Comment by Anonymous Submitter - Monday, 10 May 2004, 01:39 GMT

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
Comment by Isaac (lefthands) - Monday, 10 May 2004, 06:49 GMT

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.
Comment by Anonymous Submitter - Monday, 10 May 2004, 19:10 GMT

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...
Comment by Anonymous Submitter - Monday, 10 May 2004, 19:10 GMT

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...
Comment by Anonymous Submitter - Wednesday, 12 May 2004, 03:14 GMT

Still having the problem...

This is on the target by the way.

Zakk
Comment by Isaac (lefthands) - Wednesday, 12 May 2004, 10:06 GMT

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.
Comment by Anonymous Submitter - Wednesday, 12 May 2004, 14:35 GMT

Sounds good! I'll try it again today, then.
Comment by Anonymous Submitter - Wednesday, 12 May 2004, 22:42 GMT

Wow! excellent work.

It also looks like all of the 2nd functions work - is this
correct?
Comment by Blue Chip (bluechip) - Wednesday, 12 May 2004, 23:19 GMT

.
.
.
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
.
.
.
Comment by Isaac (lefthands) - Thursday, 13 May 2004, 04:01 GMT

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.
Comment by Daniel Stenberg (bagder) - Thursday, 13 May 2004, 06:32 GMT

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.
Comment by Blue Chip (bluechip) - Thursday, 13 May 2004, 19:24 GMT

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
Comment by Daniel Stenberg (bagder) - Wednesday, 19 May 2004, 09:19 GMT

Added to CVS just now!
Comment by zeekoe (zeekoe) - Wednesday, 18 August 2004, 22:31 GMT

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 :)
Comment by Isaac (lefthands) - Friday, 20 August 2004, 16:25 GMT

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.
Comment by zeekoe (zeekoe) - Friday, 20 August 2004, 17:42 GMT

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 :)
Comment by Isaac (lefthands) - Thursday, 26 August 2004, 12:20 GMT

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:)
Comment by zeekoe (zeekoe) - Thursday, 26 August 2004, 20:54 GMT

ah... well, nice that it's fixed now :)

Loading...