Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Roborio and Real Time Clock (http://www.chiefdelphi.com/forums/showthread.php?t=152689)

phurley67 15-12-2016 15:14

Roborio and Real Time Clock
 
So from our RoboRIO image in /etc/init.d/bootmisc.sh

I see this little nugget:

Code:

# Set the system clock from hardware clock
# If the timestamp is more recent than the current time,
# use the timestamp instead.
test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start

I don't have a /etc/init.d/hwclock.sh, but I wish I did :-). It would be nice if our log files had real date/time stamps if for no other reason than to keep things organized. Is anyone currently using RTC? Also double checking that the RIO does not have one and I just need to go buy a battery or something :-)

wireties 15-12-2016 15:19

Re: Roborio and Real Time Clock
 
I am not sure, ssh to the roboRio and type 'date'. If it is working the system clock is present. The relative timer in the kernel is required and sometimes, in embedded Linux systems, a virtual RTC is created using the jiffy clock to progress the time.

Joe Ross 15-12-2016 15:29

Re: Roborio and Real Time Clock
 
The roboRIO does not have a battery powered RTC. However, the DS sends the time when it connects, which the roboRIO uses to set the system time. If you wait until the DS connects, you can have correct timestamps, without a RTC.

phurley67 15-12-2016 18:37

Re: Roborio and Real Time Clock
 
Ahh that make sense. I have been doing all my testing with QDriverStation, which apparently does not do the time update (at least not from my Mac :-). But I remember seeing fairly accurate time data in the past -- it was actually driving me nuts.

Thanks

gerthworm 15-12-2016 22:28

Re: Roborio and Real Time Clock
 
Quote:

Originally Posted by Joe Ross (Post 1621536)
the DS sends the time when it connects, which the roboRIO uses to set the system time..

Can confirm. Had some weird timestamps on logs last year, took us waaaay too long to figure out what was going on.


All times are GMT -5. The time now is 04:50.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi