Author Topic: Battery Routine  (Read 7989 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Battery Routine
« on: April 26, 2010, 03:02:38 pm »
There is a calc app called CLOCK that installs a hook that displays the time and date on the homescreen (and, if you want other menus, too). Is it possible to do the same with a battery meter? Have one displayed all the time on the homescreen If so, can someone make one, cuz that would be epic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Battery Routine
« Reply #1 on: April 26, 2010, 03:08:52 pm »
The problem with this is that we can't really read battery level very accurately. It's pretty much battery low/not-low (which the OS tells you on startup anyway)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Battery Routine
« Reply #2 on: April 26, 2010, 03:51:51 pm »
Wasn't there a routine that told you if batteries were getting low shortly before the calc starts telling you on Startup, though? I recall it returning low batt code even if the startup msg didn't display anywhere yet (even on Garbage collections)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Battery Routine
« Reply #3 on: April 26, 2010, 04:15:44 pm »
What about the battery indicators that return a 1-4 rating. If i could just have like a number 1-4 always on my screen, i'd be satisfied.

Offline Madskillz

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 488
  • Rating: +32/-2
    • View Profile
Re: Battery Routine
« Reply #4 on: April 26, 2010, 04:24:04 pm »
Wasn't there a routine that told you if batteries were getting low shortly before the calc starts telling you on Startup, though? I recall it returning low batt code even if the startup msg didn't display anywhere yet (even on Garbage collections)
You have the interrupts to go by from and like calc said it's pretty inaccurate.
There seems to be something similar to what Omnimaga was talking about here:
http://www.ticalc.org/archives/files/fileinfo/358/35857.html

As well as something similar to what ACagliano was looking for here:
http://www.ticalc.org/archives/files/fileinfo/155/15595.html
However this is for the 83...but with the source included it should be a relatively easy thing to get working on an 83+/84+
I can look at it a little later tonight if you want.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Battery Routine
« Reply #5 on: April 26, 2010, 06:11:39 pm »
Yes, Madskillz. That would be perfect. Do you think you can port it to the 83+/84+?

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Battery Routine
« Reply #6 on: April 27, 2010, 12:15:52 pm »
The problem with this is that we can't really read battery level very accurately. It's pretty much battery low/not-low (which the OS tells you on startup anyway)

There is bcall(_5221) which returns battery level on a scale from 1 to 4. I don't know how accurate it is, though.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Battery Routine
« Reply #7 on: April 27, 2010, 12:28:34 pm »
I think there are still routines on ticalc where the battery level is calculated based on contrast level x.x, I never understood why they exist considering the 83+ contrast won't even change at all even with weak batteries. If batteries are way too low the calc just shuts down by itself

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Battery Routine
« Reply #8 on: April 27, 2010, 12:34:09 pm »
Most of them were bullshit. (while we're being honest, most stuff on ticalc is, and I must say I contributed some rubbish myself in my early days :) )

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Battery Routine
« Reply #9 on: April 27, 2010, 12:51:00 pm »
yeah true I would say about 90% of the stuff on ticalc.org is crap. I'm happy the split most of it in their own directories now, but as TI user from the Calc.org era, I remember having to browse through 3000 BASIC games a lot. On some computers it would freeze Firefox/IE x.x

Didn't you once uploaded one of my own file back in the days? (I think it was like the day after I got my profile taken down, then I sent a file report to ticalc). Maybe it was someone else, though. The game in question was Mystique: La Larme Du Dragon :P

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Battery Routine
« Reply #10 on: April 27, 2010, 01:04:15 pm »
No. Definitely not me. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Battery Routine
« Reply #11 on: April 27, 2010, 01:22:48 pm »
oh wait I think it was Silver Shadow, but even then I might be wrong. His email looks exactly like the guy first/last names and he was from France too. It reminds me when I first submitted a game of mine on a french TI site. My stuff would never get accepted because it lacked any readme x.x

Offline Madskillz

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 488
  • Rating: +32/-2
    • View Profile
Re: Battery Routine
« Reply #12 on: April 30, 2010, 07:57:39 pm »
I got it ported over, however I have noticed a few things. He used the interrupts to get the battery level but I think he might be off on something though. I'll keep messing with it until I can get it to work. I see what he was doing, and the majority does look right. I just dont have a lot of experience with the interrupts. So I have been adding a lot of comments. I was busy with school earlier this week, but I just have one final next week so I think I could have it done by then.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Battery Routine
« Reply #13 on: May 02, 2010, 09:29:49 am »
Cool. Thank you.

Offline Silver Shadow

  • Beta Tester
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +27/-7
    • View Profile
Re: Battery Routine
« Reply #14 on: May 02, 2010, 09:39:41 am »
oh wait I think it was Silver Shadow, but even then I might be wrong. His email looks exactly like the guy first/last names and he was from France too. It reminds me when I first submitted a game of mine on a french TI site. My stuff would never get accepted because it lacked any readme x.x
I guess it was me. Strange, I didn't remember me doing that with this particular game. I remember I submitted some files from a french site on to ticalc.org because I thought they could've been more widely available that way. Since I wasn't the author of those files, I put myself as "porter" in the author blanks.
A year or two ago, I realized that this was pretty stupid so I deleted those files from ticalc.org, leaving only my own programs.
« Last Edit: May 02, 2010, 09:41:45 am by Silver Shadow »
Former Coder of Tomorrow