cancel
Showing results for 
Search instead for 
Did you mean: 

Touchgfx: Analog Clock Time Ambiguous.

Garnett.Robert
Senior III

Hi,

The minute hand of the Analog clock increments in hours so unlike a real analog clock the hour hand always points exactly to a digit; never in-between. This results in misreading the clock.

eg: if the time is three minutes to ten, the hour hand points at nine so the clock time looks like its three minutes to nine when in fact it is 3 minuted to ten. The hour hand should have four or five intervals between hour so this doe not occur. So if the clock was in the last 10 minutes of the hour the hour hand would be 4/5 of the interval between the hours.

Magnum confusion!

I thought I had set the hours incorrectly as the digital clock read:

09:56:20

Whilst the analog clock looked like it was

08:56:20

To me an analog clock should simulate analog behaviour of all of the hands. It is probably not required for the minute hand but definitely the hour hand.

What do other people think?

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello Garnett.Robert,

Regarding the behavior of a real-life analog clock you are totally right.

But the Analog Clock in the Designer does it too.

You just need to call the following function :

analogClock.setHourHandMinuteCorrection(true);

This line is automatically generated by TouchGFX Designer when you tick the Sweeping Movement box for your clock hand in the Analog Clock parameter on the left side in the Designer. Please also refer to this link from the documentation website (section "Clock hands") : https://support.touchgfx.com/docs/development/ui-development/ui-components/miscellaneous/analog-clock/#clock-hands

If you try the Analog Clock example available in TouchGFX Designer, you will also have the expected behavior.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

View solution in original post

3 REPLIES 3
Alexandre RENOUX
Principal

Hello Garnett.Robert,

Regarding the behavior of a real-life analog clock you are totally right.

But the Analog Clock in the Designer does it too.

You just need to call the following function :

analogClock.setHourHandMinuteCorrection(true);

This line is automatically generated by TouchGFX Designer when you tick the Sweeping Movement box for your clock hand in the Analog Clock parameter on the left side in the Designer. Please also refer to this link from the documentation website (section "Clock hands") : https://support.touchgfx.com/docs/development/ui-development/ui-components/miscellaneous/analog-clock/#clock-hands

If you try the Analog Clock example available in TouchGFX Designer, you will also have the expected behavior.

When your question is answered, please close this topic by choosing Select as Best.

/Alexandre

Hi,

I will give it a try:

Best regards

Rob

Works great thanks!