Omnimaga > News

Turn your Nspire into a real clock!

<< < (23/24) > >>

Zeklandia:

--- Quote from: Levak on March 10, 2013, 07:32:16 pm ---
--- Quote from: Filipe97 on March 10, 2013, 05:57:42 pm ---I cant edit the time, when i try to edit it the calculator crashes.

--- End quote ---

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..

--- End quote ---

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).

Levak:

--- Quote from: Zeklandia on May 20, 2013, 10:56:30 pm ---"Is Tues -1, Jan 1970 correct?" (Whereas the actual time was set to 1 Jan, 1970).

--- End quote ---
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

Zeklandia:
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: ---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];
}
--- End code ---

Levak:

--- Quote from: Zeklandia 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).

--- End quote ---
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

Zeklandia:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version