Post Reply 
Custom RPN Calculator for Prime
06-10-2019, 01:46 AM
Post: #1
Custom RPN Calculator for Prime
Like many, I struggled making the Prime my regular calculator for every day use and the point of this thread is not to revisit all the reasons but rather to present my effort to do something about it. With the latest implementation I feel like I could use this full-time now.

Today I submitted an update to a previous version I had submitted to hpcalc.org and should be available on that site once it is updated. I have also attached the file to this post.

I don't think my implementation will be something that will work for everybody but curious to get some feedback, good or bad.

What this app can do:
- Store variables to HVars and have them show up in the menu where they can be recalled, overwritten or purged
- Assign units to values and then convert to another unit with a single touch event.
- Manipulate the stack with key shortcuts and menus like many of us are used to from 50g
- Undo last action

Shortcomings of the app:
- Unfortunately the Prime does not go to sleep when an app is running, so user must exit app to prevent battery drain or have calculator plugged in while in use
- Limited unit supported, this was created for what I typically use the calculator for and thus includes angle, distance, area and volume units. The system could be expanded to other units but not sure how well it would scale with all the available units.
- No support for lists, vectors, etc. This is a pure number cruncher and not a full replacement of a fully developed RPN/RPL calculator.

The source code is included as a TXT file for anyone interested.

Jacob


Attached File(s)
.zip  RPN-Prime_SurveyCalc.zip (Size: 330.44 KB / Downloads: 74)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-14-2019, 08:58 PM (This post was last modified: 06-14-2019 09:03 PM by Eddie W. Shore.)
Post: #2
RE: Custom RPN Calculator for Prime
Phenomenal!

Any plans to implement a feature where result can be displayed as feet-inches-fractions of inches?
Visit this user's website Find all posts by this user
Quote this message in a reply
06-14-2019, 11:33 PM
Post: #3
RE: Custom RPN Calculator for Prime
(06-10-2019 01:46 AM)Jacob Wall Wrote:  Shortcomings of the app:
- Unfortunately the Prime does not go to sleep when an app is running, so user must exit app to prevent battery drain or have calculator plugged in while in use

I had the same problem with a program that displayed user tabs using a forever loop and WAIT(-1) command. If I left the program running, it would drain my calculator's battery, even if the screen was in low power mode. I installed a loop counter that counted the number of times the WAIT(-1) loop cycled. If no key or tab was pressed after 5 minutes, the program would exit the loops, go to the end of program, and then exit to the home screen. After 5 minutes in the Home screen, the calculator would naturally turn off. An example of the loop counter is shown in this post. https://www.hpmuseum.org/forum/thread-12...#pid115217
Find all posts by this user
Quote this message in a reply
06-15-2019, 12:49 AM
Post: #4
RE: Custom RPN Calculator for Prime
Quote:Any plans to implement a feature where result can be displayed as feet-inches-fractions of inches?

Already in place, the included PDF talks a bit about feet and inches. In general:
- Feet and inches are entered comma-delimited as feet,inches,fractions (for example 10,6,1/4 is 10'-6 1/4") and the input parser will assign the current distance unit to the final result. This means if your distance unit is set to metres, the conversion happens automatically. You can even enter something like 0,313 and the final result will be represented in the current distance unit (equal to 313 inches)
- There is a setting to display feet as decimal or fractional, this applies to all feet distances

I realize now that the settings can only be accessed while the app is not running, I'll make it easier to access the settings while calculator is running, with same keys Shift+Num.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-15-2019, 12:53 AM
Post: #5
RE: Custom RPN Calculator for Prime
(06-14-2019 11:33 PM)Gene222 Wrote:  I had the same problem with a program that displayed user tabs using a forever loop and WAIT(-1) command. If I left the program running, it would drain my calculator's battery, even if the screen was in low power mode. I installed a loop counter that counted the number of times the WAIT(-1) loop cycled. If no key or tab was pressed after 5 minutes, the program would exit the loops, go to the end of program, and then exit to the home screen. After 5 minutes in the Home screen, the calculator would naturally turn off. An example of the loop counter is shown in this post. https://www.hpmuseum.org/forum/thread-12...#pid115217

I like that idea, it is a very practical way of dealing with it. Thanks!
Visit this user's website Find all posts by this user
Quote this message in a reply
06-15-2019, 03:56 PM
Post: #6
RE: Custom RPN Calculator for Prime
(06-15-2019 12:53 AM)Jacob Wall Wrote:  
(06-14-2019 11:33 PM)Gene222 Wrote:  I had the same problem with a program that displayed user tabs using a forever loop and WAIT(-1) command. If I left the program running, it would drain my calculator's battery, even if the screen was in low power mode. I installed a loop counter that counted the number of times the WAIT(-1) loop cycled. If no key or tab was pressed after 5 minutes, the program would exit the loops, go to the end of program, and then exit to the home screen. After 5 minutes in the Home screen, the calculator would naturally turn off. An example of the loop counter is shown in this post. https://www.hpmuseum.org/forum/thread-12...#pid115217

I like that idea, it is a very practical way of dealing with it. Thanks!

Just to add to this: you might even want to have a user-defined variable that allows users to set their own time-out with a default of, say, 5 minutes.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
06-16-2019, 12:51 AM
Post: #7
RE: Custom RPN Calculator for Prime
(06-15-2019 03:56 PM)Han Wrote:  Just to add to this: you might even want to have a user-defined variable that allows users to set their own time-out with a default of, say, 5 minutes.

Absolutely, I will post an updated version with the improvements soon.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-16-2019, 03:49 PM
Post: #8
RE: Custom RPN Calculator for Prime
Updated version attached.
- Added ability to access settings and Info screen while calculator is running
- Added setting for auto exit, app will close after specified time
- Minor optimizations
- Updated PDF, including some corrections


Attached File(s)
.zip  RPN-Prime_SurveyCalc.zip (Size: 302.09 KB / Downloads: 38)
Visit this user's website Find all posts by this user
Quote this message in a reply
08-29-2019, 04:56 PM (This post was last modified: 08-29-2019 05:39 PM by Stevetuc.)
Post: #9
RE: Custom RPN Calculator for Prime
(06-16-2019 03:49 PM)Jacob Wall Wrote:  Updated version attached.
- Added ability to access settings and Info screen while calculator is running
- Added setting for auto exit, app will close after specified time
- Minor optimizations
- Updated PDF, including some corrections

Hi Jacob
Very nice app!

Id like to request a future update, that the stack could be transferred to home on exit , perhaps via a userkey definition as in Base48 and Units48 from Didier:

(09-14-2018 10:55 AM)Didier Lachieze Wrote:  Leveraging the work done on Base48, Units48 is a small app to do units calculation the 48 way.
[....]

Note1: one change from Base48 is that by default the latest stack level1 value is stored in the Home Ans and is available when you exit the app. This can be changed in the app settings.

Note2: the user key program to retrieve the app stack in RPN mode is slightly different from the one published in the Base48 documentation. Here is the updated one compatible with both Base48 and Units48:
Code:
KEY KS_Plus()
BEGIN
IF Entry==2 THEN
  RETURN ΣLIST(REVERSE(EXECON("STRING(&1)+\" \"",Stack)));
ELSE
  RETURN Ans;
END;
END;

It may be possible that the above key definition could be utilised also by your program, that would be neat!
Find all posts by this user
Quote this message in a reply
09-03-2019, 02:41 PM
Post: #10
RE: Custom RPN Calculator for Prime
(06-10-2019 01:46 AM)Jacob Wall Wrote:  Like many, I struggled making the Prime my regular calculator for every day use and the point of this thread is not to revisit all the reasons but rather to present my effort to do something about it. With the latest implementation I feel like I could use this full-time now.

Today I submitted an update to a previous version I had submitted to hpcalc.org and should be available on that site once it is updated. I have also attached the file to this post.

I don't think my implementation will be something that will work for everybody but curious to get some feedback, good or bad.

What this app can do:
- Store variables to HVars and have them show up in the menu where they can be recalled, overwritten or purged
- Assign units to values and then convert to another unit with a single touch event.
- Manipulate the stack with key shortcuts and menus like many of us are used to from 50g
- Undo last action

Shortcomings of the app:
- Unfortunately the Prime does not go to sleep when an app is running, so user must exit app to prevent battery drain or have calculator plugged in while in use
- Limited unit supported, this was created for what I typically use the calculator for and thus includes angle, distance, area and volume units. The system could be expanded to other units but not sure how well it would scale with all the available units.
- No support for lists, vectors, etc. This is a pure number cruncher and not a full replacement of a fully developed RPN/RPL calculator.

The source code is included as a TXT file for anyone interested.

Jacob

I tried you app- loaded text directly to hp prime pro on my phone. Works fine.

You might be interested in my work over the past few years trying to convert the Prime into a true RPN RPL calculator. It's pretty much an HP 50 but no units yet. Maybe they could be added with your help?

See my post :RPL for the Prime, download the attached test file into a new app program and run it. Let me know what you think.


Attached File(s)
.txt  rplinstallaug2119.txt (Size: 284.46 KB / Downloads: 19)

I work with android Prime only for now on my
Galaxy Tab Pro/Note 2
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)