• 16.04.2024, 10:32
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

Lieber Besucher, herzlich willkommen bei: Aqua Computer Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

Displaying Time of Day in an Overview Page & Meter Ballistics

Sonntag, 7. August 2022, 05:28

I want to add a simple time of day display to my Overview Page. When I look at data sources, I see a section called Time. In Time there is Second, Minute, Hour, Day, Day of Week, Day of Year, Month, Year, and Unix Time Stamp. There is also a subsection called UTC that has the same choices, except Unix Time Stamp is replaced with System Uptime. I can add an item that displays any of these values but what I want is to just show the time in "regular" format like "4:30:00PM". I would be OK with 24-hour based time so instead of "4:30:00PM" it would display "16:00:00". Is there a way to do this?

For fun, I tried displaying seconds in a Gauge with a range of 0 to 59. The needle moves from left to right as the seconds count up to 59, then the needle falls back, headed to 0.It falls so slowly that it never gets to 0 because the seconds are counting up again.The needle falls to about 18 seconds and then starts moving to the right because it takes that long (~18 seconds) to fall back from 59. I have also noticed that when incrementing seconds are displayed as a number or on a gauge, they do not advance evenly over time. It will hang for a bit then advance through 2 seconds very quickly to catch up to real time. It's erratic. I am wondering why the gauge needle falls so slowly and why the number and gauge needle do not smoothly increment. I made a video that starts at 55 seconds. You can see the seconds gauge advance to 59, and then very slowly fall back to ~18 seconds, then start moving up again. You can also see how the count up is erratic and the gauge needle kind of slides in spurts and seems to lag the number. While the needle is falling and the seconds are counting up, the count jumps from 11 to 13. In the last 5 seconds of the video, the number count goes 54-56-57-55-57-59. The number sequence gets jumbled up.

Is this normal behavior? Is this showing the limit of precision on AQS gauges, which are normally monitoring longer term trends? Is there anything I can do to make the count up smoother and make the gauge needle either jump from 59 to 0 or fall very quickly from 59 to 0? And back to question 1 - Is there a way to display the time of day in an Overview Page? LINK TO VIDEO

Sonntag, 7. August 2022, 14:56

I believe showing the time in a formatted manner is doable using the XAML function.I am not XAML literate, so I do not have any hints as to how.

The gauge needle movement may have a hysteresis built in to keep it from bouncing around, and/or being graphical it may have low update priority.

EDIT: I edited the Binding option of the XAML function to display the date and time, which you may be able to edit to suit you. (time.jpg)
EDIT2: The display does not appear to update, so more code is needed. As I said I am not literate in XAML programming.

Zitat

<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>

<!--Simpe databinding example-->
<!--1. set up connection for this item (ie. temperature sensor)-->
<!--2. bind values to your own usercontrol-->
<!--Binding example-->
<!--Content="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available}"-->

<!--default background-->
<Rectangle Grid.Row="0" Grid.RowSpan="2" Style="{StaticResource GadgetBackgroundStyle}"/>

<!--Content: binding to source value: -->
<!--Content: ElementName=this -->
<!--Content: Path=DataContext.Value, for connetion to actual connected value -->
<TextBlock
Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='dd/MM/yyyy hh:mm tt'}"
Grid.Row="1"
Opacity="1.0"
Height="Auto"
Width="Auto"
Foreground="#FF000000"
FontSize="15"
FontFamily="Segoe UI"
FontWeight="Normal"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</UserControl>

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »InfoSeeker« (7. August 2022, 15:16)

Montag, 8. August 2022, 02:14

Thank you for the suggestion. I think you are on the right track. I am also not XAML literate. I wish I was because I suspect this would allow all sorts of interesting things to be done in an Overview Page. The presets they give you are pretty limited. I will play around with the binding option and see if I can get it to update. Maybe I will end up being able to at least edit XAML code. :)

It does seem that the gauge needle has quite a bit of hysteresis, and it is not adjustable. It also does seem to have a low update priority. I don't know if CPU or GPU load would affect this. When I made that video my computer was pretty much idling.

Montag, 8. August 2022, 08:55

I use the clock in the bottom right of my taskbar ;o)

Montag, 8. August 2022, 18:09

I made a rudimentary time display for a display page.

Montag, 8. August 2022, 18:54

I made a rudimentary time display for a display page.


Ta.

That reminds me.

One minor annoyance I have with Page design is you can't group items and keep them grouped (unless I'm being blonde)

Dienstag, 9. August 2022, 00:59

I made a rudimentary time display for a display page.
Wow! Thank you. That's what I was trying to do (and failing miserably). I will take a long hard look at your code. In the first bit of code that you posted, I noticed that a lot of the stuff at the top is the same as in the presets. The line of interest is Text="{Binding Source={x:Static sys:DateTime.Now}, StringFormat='dd/MM/yyyy hh:mm tt'}". I tried pasting that line into a preset tied to Seconds and it did count up. In the page file you provided I see <connection>service_data:1:data\sensor\systemtime/sec</connection> There is a lot more that is above my understanding but I think if I spend some time going through it slowly, and Google up some XAML code help, I can figure it out. I will want to change the text color and probably the font. I think this and location etc. are set up in the top portion of the code. I wonder how fast I will break it?

Thanks again for figuring this out. Pretty impressive for someone who is "not XAML literate". :thumbup:

Dienstag, 9. August 2022, 03:56

The binding effort was fail because I do not know how to loop the pertinent section for updating.

Below is a snip of the full xaml code I used for the colons in the most recent post.
  • started with "text" preset
  • changed the Text= value
  • changed the Foreground= value
  • added Backgound="#000000"
  • changed FontSize

Zitat

<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<!--default background-->
<Rectangle Style="{StaticResource GadgetBackgroundStyle}"/>

<!--user defined text-->
<!--Content: contains the displayed text-->
<TextBlock
Text=" : "
Opacity="1.0"
Height="auto"
Width="auto"
Foreground="#ffffffff"
Background="#000000"
FontSize="22"
FontFamily="Segoe UI"
FontWeight="Normal"
Margin="0,0,0,0"
Padding="0,0,0,0"
HorizontalAlignment="left"
VerticalAlignment="Center"/>
</Grid>
</UserControl>

Dienstag, 9. August 2022, 08:04

The binding effort was fail because I do not know how to loop the pertinent section for updating.


Just had a quick play and using the below (in an xaml block) adapted from an XAML input using Data Binding + Conditions and a guess at how the StringFormat worked the below will display seconds, minutes or hours (depending on the data input selected) with a leading 0

Zitat




<UserControl
x:Name="this"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignHeight="200" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>

<TextBlock
Text="{Binding ElementName=this, Path=DataContext.Value, FallbackValue=no data available, StringFormat={}{0:00}}"
Grid.Row="0"
Opacity="1.0"
Height="Auto"
Width="Auto"
Foreground="#FFFFFFFF"
FontSize="22"
FontFamily="Segoe UI"
FontWeight="Bold"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</UserControl>



Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »WinstonWoof« (9. August 2022, 08:06)

Dienstag, 9. August 2022, 10:53

In the next aquasuite version it is possible to use date and time in the code/XAML controls. The time will then update automatically.

Quellcode

1
<TextBlock Text="{Binding Path=TimeNow, StringFormat='dddd, dd MMMM yyyy HH:mm:ss'}" Foreground="White"/>

Mittwoch, 10. August 2022, 05:12

I use the clock in the bottom right of my taskbar ;o)
Yeah I know this is kind of pointless. I want to put the time of day in the Overview page because I can glance over at it while I am watching TV (can't see my main displays from that location). I could just look at my watch but its not near as much fun. 8o


Just had a quick play and using the below (in an xaml block) adapted from an XAML input using Data Binding + Conditions and a guess at how the StringFormat worked the below will display seconds, minutes or hours (depending on the data input selected) with a leading 0[
Thank you. I tried this code and it works, and has the leading zero. :thumbup: The Text="{Binding line of code is quite different than InfoSeeker's. His looks like it does a system call:
"Text="{Binding Source={x Static sys DateTime.Now}" I removed the colons so the string would stop turning into Emojis.

That line in your code is
"Text="{Binding ElementName-this, Path=DataContext.Value... It's totally different. Yours has a Fallback Value (probably optional?). Then both have a StringFormat. His is StringFormat='dd/MM/yyyy hh:mm tt'} while your is StringFormat={}{0:00}}
I need to read up on how these commands work. The end result is practically identical except that yours has the leading zero, maybe due to the different StringFormat command.

In the next aquasuite version it is possible to use date and time in the code/XAML controls. The time will then update automatically.

Quellcode

1
<TextBlock Text="{Binding Path=TimeNow, StringFormat='dddd, dd MMMM yyyy HH:mm:ss'}" Foreground="White"/>
Thank you!! I don't see this in X.57 so I assume by next version you mean X.58. I tried pasting this line of code into Winston Woof's code, in place of the Binding Element line he had. It didn't work, probably because I don't really know what I am doing.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Speedy-VI« (10. August 2022, 05:37)

Mittwoch, 10. August 2022, 07:26

I assume by next version you mean X.58
the current version is 57, the next 58.
currently the binding with time work only once. the time dosent refresh. We have added also a few samples in the xaml presets how to use the time.

Mittwoch, 10. August 2022, 22:36

I assume by next version you mean X.58
the current version is 57, the next 58.
currently the binding with time work only once. the time dosent refresh. We have added also a few samples in the xaml presets how to use the time.
Thank you for the clarification. I will look forward to trying the new feature in X.58. I also remain hopeful that you will add RGBpx port synchronization which was mentioned in a single post several moths ago as something that would be coming in a future release. I have 2 Farbwerk360's and would really like to be able to sync their ports. One of the great things about Aquasuite is that it just keeps getting better!

Donnerstag, 11. August 2022, 07:47

I also remain hopeful that you will add RGBpx port synchronization
No, not in the next month.

Donnerstag, 11. August 2022, 18:00

I also remain hopeful that you will add RGBpx port synchronization
No, not in the next month.
OK thanks for the update. I will keep waiting. In my opinion, the ability to sync RGBpx ports, at least between Farbwerk360's, would be a huge improvement. The Farbwerk360 has an aquabus connector on it that the owner's manual says is reserved for future use. I wonder if this header is connected to a serial UART and if it could be used to carry a sync signal between 2 Farbwerk360's. This would inherently be limited to syncing 2 Farbwerk360's and inferior to a solution that allowed syncing between any/all RGBpx ports, but its better than nothing, assuming the aquabus connector could be used for sync at all.

I am also hoping that you will consider my earlier suggestion to add a Global Offset command to items in an Overview Page. This command would allow moving a group (or all) of the items in an Overview Page to a new location by selecting multiple items, right clicking, and entering an [x,y] Global Offset value. This would cause every selected item to move from wherever they are to a new location that is defined by the items' current coordinates +/- the Global [x,y] offset.

I ran into this when I connected a stat display, placed it in the Windows raster, built an Overview page with item coordinates based on the display's location in the Windows raster, then decided to move the display in the Windows raster. Moving the display in the Windows Raster required updating the coordinates of every item in the Overview Page. Yes I can select the items and drag them to the new location but it is difficult to do with pixel accuracy. Also, for systems with multiple displays, it can require quite a bit of dragging, scrolling, dragging, scrolling, then dragging until they are at the new location. An [x,y] Global Offset would allow me to move every item in an Overview page to a new location by a precise amount of pixels, in one command. It could also be used to do things like move a column of items 10 pixels to the right and 5 pixels up, with pixel accuracy.

I suspect this would not be difficult to implement. Maybe I am the only one who would find a Global [x,y] Offset for items in an Overview Page useful, but I remain hopeful that you will consider adding this capability.

Ähnliche Themen