Project

General

Profile

Actions

Feature #297

closed

Add configuration option for setting initial time, including DST

Added by Hammel almost 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
14 Mar 2014
Due date:
% Done:

100%

Estimated time:
Severity:
04 - Low

Description

I need to understand better how to set this. An initial version would be brute force: set the time and enable/disable DST.

ntpd does set the time on the board if its left running for a while with a network connection. But it should be possible to initialize that time stamp and set the DST.

I need to know how to tell ntp to use DST.

Actions #1

Updated by Hammel almost 11 years ago

  • Priority changed from Normal to Urgent
  • Severity changed from 03 - Medium to 04 - Low
Actions #2

Updated by Hammel over 10 years ago

  • Priority changed from Urgent to Normal
  • Target version changed from 0.9.0 to 0.10.0

Moving configuration tools to 0.10.0.

Actions #3

Updated by Hammel over 10 years ago

  • Priority changed from Normal to Immediate
Actions #4

Updated by Hammel about 10 years ago

This is just another app. I can use videofe as a template. This app needs the following components:
  • Spinners
    • Year
    • Month
    • Day
    • Hour
    • Minute
  • AM/PM Slider (left or right enables respective values)
  • DST Slider (on or off)

Year/month/day may also be set using a GtkCalendar.

I see this as having configuration in a left panel and an analog clock in the right.

I might create special widgets for these. ZetCode has an example using Cairo for creating a custom widget. There is a gtk clock widget available on github that is integrated with cairo as well as a real cairo-based clock (overly complex glade+svg design, but source is 1 file). And there is a cairo clock tutorial on developer.gnome.org but its for gtkmm.

Actions #5

Updated by Hammel about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Most of this is now implemented in the piclock app. This merges a proper GTK+ widget structure (as described in ZetCode) with the Cairo-based clock (found on github) and adds configuration options to it.

The app is very primitive. It does handle navigation using arrow keys just fine.

Additional work to be done:
  1. Add month, day, year under the clock in larger font.
  2. The analog clock works fine but could use a theme (background image over which the hands are drawn).
  3. The clock hands are blocky - could be cleaned up with some cairo magic - and should color coordinate with any background image (just use a config option for colors).
  4. There is no DST option yet (but do we really need it?).
  5. Apply button doesn't change the time on the system yet.
Actions #6

Updated by Hammel about 10 years ago

  • % Done changed from 50 to 80

Didn't do much of those last things but I did add the icon and splash images and fixed packaging, along with various other minor nits and bugs.

I installed the opkg tonight and tested it for the first time as an app. It works perfectly except the time, which is being set with stime(), doesn't change. I may need to switch to settimeofday().

Actions #7

Updated by Hammel about 10 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

It took some experimenting but I finally got piclock to behave properly. I have to use the space bar to activate the home button but that's a minor price to pay. Overall, the settings app works well now.

Closing issue.

Actions

Also available in: Atom PDF