Author Topic: Turn your Nspire into a real clock!  (Read 107909 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Turn your Nspire into a real clock!
« Reply #105 on: April 19, 2012, 06:08:21 am »
@linuxgeek96, if you can you should really post a photo. It will help us a great deal in trying to understand the exact issue.
(And yes, the exact position of the progress bar is important)

Thanks

Offline linuxgeek96

  • LV3 Member (Next: 100)
  • ***
  • Posts: 99
  • Rating: +4/-0
  • ( ͡° ͜ʖ ͡°)
    • View Profile
    • Personal Site
Re: Turn your Nspire into a real clock!
« Reply #106 on: April 19, 2012, 12:07:10 pm »
I will try and post one soon... @Levak, the progress bar gets to ~65%, not 65 but 100% of the time. Its possible its caused by ndless only...

Offline Filipe97

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #107 on: March 10, 2013, 05:57:42 pm »
Hello the idea looks great but i am having a problem with it.

I cant edit the time, when i try to edit it the calculator crashes.

I have ti nspire cx(not cas).

Thanks for the time
« Last Edit: March 10, 2013, 05:59:04 pm by Filipe97 »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Turn your Nspire into a real clock!
« Reply #108 on: March 10, 2013, 07:32:16 pm »
I cant edit the time, when i try to edit it the calculator crashes.

Hi,

Did you update your Ndless to a revision greater than the one indicated in the README ?

BTW, here is a message for everybody : nClock has some problems with daytime conversions, I'm aware of it but sadly have no time to solve it.
Basically there are three conversions, one is accurate (timestamp to day) but the two others are not (guessing weekday and day to timestamp) due to a float approximation : this is why you may enter two more days when configuring the time and may have a wrong weekday. Sorry about that..
« Last Edit: March 10, 2013, 07:32:39 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Turn your Nspire into a real clock!
« Reply #109 on: March 13, 2013, 10:24:44 pm »
This is off-topic but...
Thanks for the time
...just me or pun? :D




Offline Zeklandia

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #110 on: May 20, 2013, 10:56:30 pm »
I cant edit the time, when i try to edit it the calculator crashes.

Hi,

Did you update your Ndless to a revision greater than the one indicated in the README ?

BTW, here is a message for everybody : nClock has some problems with daytime conversions, I'm aware of it but sadly have no time to solve it.
Basically there are three conversions, one is accurate (timestamp to day) but the two others are not (guessing weekday and day to timestamp) due to a float approximation : this is why you may enter two more days when configuring the time and may have a wrong weekday. Sorry about that..

I have that same issue. It only happened when I used nLaunch to load 3.2 and then switched back. Now it subtracts 2 from the Day upon entry (I put in 20, then select change date again and it says 18) and has the weekday wrong by one (adds one). What could be causing this? I rebooted several times after uninstalling nClock and then reinstalled it. The time had been reset, but loading nClock asked, "Is Tues -1, Jan 1970 correct?" (Whereas the actual time was set to 1 Jan, 1970).
« Last Edit: May 20, 2013, 11:09:18 pm by Zeklandia »
Zeklandia
Linux, Android, Java, C/C++ Developer.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Turn your Nspire into a real clock!
« Reply #111 on: May 21, 2013, 06:40:16 am »
"Is Tues -1, Jan 1970 correct?" (Whereas the actual time was set to 1 Jan, 1970).
I love you.
In fact it wasn't due to float approximation but a stupid mistake ...
Fixed : https://tiplanet.org/forum/archives_voir.php?id=4416
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Zeklandia

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #112 on: May 21, 2013, 07:10:46 am »
Yep, you fixed it. Now the issue is that it says that today (21 May 2013) is a Monday (It's Tuesday).

Could this have anything to do with the CAS OS? When I was using the CX OS it worked fine.

I'm gonna take a guess and say that the issue is here (line 509):

Code: [Select]
static short year_codes[] = {5, 4, 2, 0};
static short month_codes[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
static char months[][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
static char weekdays[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};

char * getWeekDay(int year, int month, int day) {
    int d = (year>>2)/25;
    int r = year - (d<<2)*25;
    return weekdays[(year_codes[d&3] + r + (r>>2) + ((r&3)==0) + month_codes[month-1] + day) % 7];
}
« Last Edit: May 21, 2013, 07:55:56 am by Zeklandia »
Zeklandia
Linux, Android, Java, C/C++ Developer.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Turn your Nspire into a real clock!
« Reply #113 on: May 21, 2013, 08:04:25 am »
Yep, you fixed it. Now the issue is that it says that today (21 May 2013) is a Monday (It's Tuesday).
Fu**, I actually thought today was Monday >_>
I made a really quick fix (day + 1 :D) but have no idea if it has an influence on the rest of the code :
https://tiplanet.org/forum/archives_voir.php?id=4416
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Zeklandia

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #114 on: May 21, 2013, 04:42:02 pm »
I found out what might be causing all of these:

Apparently, when running the CAS OS on ANY NON-CAS CALCULATOR (regardless of CX) certain things do not work. For example, I made a simple Lua program to print 2+2. It prints 5.XXXXXXXXXXe-226 (or any other number similar to it) regardless of settings like Float number, angle unit (degree, radian), or auto vs. approximate answers. Which also explains why when I was playing CubeField, the highscore was also similar to 1.132458768087e+45 and Bloxorz was naming the levels in a similar manner (2.98721408137e-67 instead of 13). However, the Scratchpad and Math documents work fine. I do not know if the problem is caused by hardware differences between the CX and the CX CAS (I am using nLaunch to boot the CAS OS on my CX) or some ndless/Lua bug. This issue does not occur when using the CX OS 3.1 with ndless on the same calculator.
« Last Edit: May 21, 2013, 04:45:09 pm by Zeklandia »
Zeklandia
Linux, Android, Java, C/C++ Developer.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Turn your Nspire into a real clock!
« Reply #115 on: May 21, 2013, 05:37:07 pm »
I found out what might be causing all of these:
Not "all of these" but only the bug you seem to have.
The bug in nClock was entirely due to a mistake in my code where as I thought it was due to a float approximation.

On the other hand, you should post in the nLaunch topic your bug, it seems you're not only the one to experiment that.
https://tiplanet.org/forum/viewtopic.php?f=16&t=11855
« Last Edit: May 21, 2013, 05:38:52 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Zeklandia

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #116 on: May 21, 2013, 06:23:23 pm »
I see that I am not alone. I wonder if he got it to work with nLaunch. Anyways, I am reinstalling nLaunch.

EDIT: Well I fucked up somewhere, now it does ABC12345F6U7 on boot...

EDIT: It's still fucked up, but I'm trying to save it. For a while I was using the non-CX switching pack. Now let's see if it works with the CX one.

EDIT: Fixed, Lua still doesn't work right, but nClock does so I'm done.
« Last Edit: May 22, 2013, 09:04:08 pm by Zeklandia »
Zeklandia
Linux, Android, Java, C/C++ Developer.

Offline Regil Daniel Perez Fabian

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #117 on: March 16, 2016, 12:41:42 pm »
I'm having problems with this app. I have Nless 4.0(OS: 4.2.0) and the mini clock doesn't stay in the top bar, only show after I close the main app, bu as soon I hit any button it disappears from the top bar. Also it briefly pops up when i turn of my TI(Ctrl+On) and when I turn it on again but it doesn't keep on the status bar.

Any Suggestions?

Offline chenxi050402

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Turn your Nspire into a real clock!
« Reply #118 on: October 21, 2020, 10:31:19 am »
It crashes on start up on TI-nspire CX II CAS, the ndless dev says nClock needs to be updated.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Turn your Nspire into a real clock!
« Reply #119 on: October 22, 2020, 10:19:56 am »
It crashes on start up on TI-nspire CX II CAS, the ndless dev says nClock needs to be updated.
This thread is over 4 years old at this point. I'd suggest reaching out to the nClock author (@tangrs) instead of posting on a news article that they likely aren't looking at. 
/e