Pumpkin, Inc.

Pumpkin User Forums

Problem to display timestamp

If you have a general question or comment regarding the CubeSat kit, post it here.

Problem to display timestamp

Postby Browniebroke » Fri Jun 13, 2008 12:54 am

Hello,

I have a problem using the function CSK_Msg1(), defined in the file CSK_utility.c. I'm using it with the MHX module. This function is supposed to print in the hyperterminal the message given in argument with the timestamp. When I'm running the test program provide with the CubeSat Kit, it works fine. But I've done a small application just to communicate with the MHX and I can't print the timestamp correctly. There is a problem with the long specifier. It prints 000000000lu instead of the timestamp. I tryed to remove the "l" and the "u" and it only works when I remove the "l".

I tried much things, but it seems that something is missing to use sprintf() as in a C program. and I can't find what. Can you help me ? If you want to see my code, I can post some part of it.

Browniebroke
 
Posts: 2
Joined: Wed Jun 11, 2008 11:00 pm

Re: Problem to display timestamp

Postby aek » Fri Jun 13, 2008 1:30 am

To print longs, you have to tell the compiler to enable long support in printf(). It's one of the IDE project options in CrossWorks ...

------------------

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: Problem to display timestamp

Postby Browniebroke » Fri Jun 13, 2008 2:04 am

I was sure it was a configuration problem. Thank you very much for your help ! It works fine !
Browniebroke
 
Posts: 2
Joined: Wed Jun 11, 2008 11:00 pm


Return to CubeSat General

Who is online

Users browsing this forum: No registered users and 2 guests

cron