WatchMaker formula and help Thread - Wear OS Q&A, Help & Troubleshooting

Hi,
watchmaker (Link) is a great tool and simple faces are created quickly, but we need more.
with formulas is much more possible and I want to collect them here.
regards
starbase64

example clock > http://facerepo.com/app/faces/details/chronograph-by-starbase64-iv-14a70b5fa2b
rotate "WA" battery:
Code:
-{bl}*360/100
WA battery icon:
Code:
'{bc}' == 'Charging' and 7 or {bl} >= 90 and 1 or {bl} >= 70 and 2 or {bl} >= 50 and 3 or {bl} >= 30 and 4 or {bl} >= 10 and 5 or 6
rotate "PH" battery:
Code:
-{pbl}*360/100
PH battery icon:
Code:
'{bc}' == 'Charging' and 7 or {pbl} >= 90 and 1 or {pbl} >= 70 and 2 or {pbl} >= 50 and 3 or {pbl} >= 30 and 4 or {pbl} >= 10 and 5 or 6
rotate seconds circle:
Code:
-{drss}
rotate minutes circle
Code:
-{drm}
rotate minutes circle
Code:
-{drh}
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

example clock > http://facerepo.com/app/faces/details/summer-time-14acd7a68f6
watch battery in percent
Code:
{blp}
wacht battery in percent with opacity > if lower 15 percent (copy this code to opacity setting)
Code:
{bl} < 15 and 100 or 0
wacht battery in percent with opacity > if lower 50 percent (copy this code to opacity setting)
Code:
{bl} < 50 and 100 or 0
wacht battery in percent with opacity > if charger connectet (copy this code to opacity setting)
Code:
'{bl}' == 'Charging' and 100 or 0
works also with phone battery {pbl} and {pbc}
you need 4 battery in percent letters with various opacity formula.

example clock > http://facerepo.com/app/faces/details/mechanic-v-14ad47f4ec5
this formula show or hide a pic in a defined time:
Code:
{dh23}<=18 and {dh23}>= 6 and [COLOR="Red"][B]50[/B][/COLOR] 0 or
example: a black square with this formula in opacity setting, will dim your clock at night.
The red number is the opacity setting, higher = stronger

example clock > http://facerepo.com/app/faces/details/night-and-day-ii-14adcd8cb74
change background automatically with sunrise and sunset...
copy formula to opacity from the second image (opacity for the first image =100):
Code:
{wsrp}>={dtp} and 100 or {wssp}<{dtp} and 100 or 0
thanks to Klaus Koehler (G+) for helping to find the right formula

Help creating formula in watchmaker:
1) formula for showing wind chill . Formula for metric wind chill calculation:
Twind_chill = 13.12 + 0.6215*T - 11.37*(v0.16) + 0.3965*T*(v0.16)
T=temp, V= windspeed.
2) Formula, showing arrow up when rising temp (or barometric pressure), arrow down, falling temp/barometric pressure. No ide how to create this....if possible...

example watch > http://facerepo.com/app/faces/details/night-and-day-iii-14ae9343b9c
blinking text for temperature lower than 4C°
Code:
{ds}%2 == 0 and 100 and {wt}< 4 and 100 or 0
Copy code to opacity setting!

@espenjoh
no idea at the moment

To show a Different Day of the Week
This code will show tomorrow's day of the week in 3 letter day of the week form.
{ddw0}==0 and 'Mon' or {ddw0}==1 and 'Tue' or {ddw0}==2 and 'Wed' or {ddw0}==3 and 'Thu' or {ddw0}==4 and 'Fri' or {ddw0}==5 and 'Sat' or 'Sun'
Copy code into text field.

This piece of code is very useful at rotating a sun/moon cycle indicator. But this does not simply imply the sun rises at a quarter of the day and sets at 3 quarters, in stead the sun rises and sets just like in real life.
Code:
{dtp} < {wsrp} and (-180 + ({dtp}/{wsrp})*90) or {dtp} <= {wssp} and (-90 + (({dtp} - {wsrp})/({wssp} - {wsrp}))*180) or {dtp} <= 1 and (90 + (({dtp} - {wssp})/(1 - {wssp})*90))
This can be used at indicators where at 0° the sun is at his highest point.
Some self-made examples are:
http://facerepo.com/app/faces/details/epic-sun-moon-cycle-clock-14b06fdac8c
http://facerepo.com/app/faces/details/steampunk-2-14ad939e2b3
http://facerepo.com/app/faces/details/steampunk-14aaa686824
---------- Post added at 12:09 PM ---------- Previous post was at 11:48 AM ----------
This rotates objects according to gravity, but it doesn't work a hundred per cent and needs improvement. Anyone any ideas?
Code:
{say} > 0 and ({sax}+10)/20*360/2+270 or {say} <= 0 and 360-({sax}+10)/20*360/2+270
Example: http://facerepo.com/app/faces/details/andy-with-moving-arms-14ae3ad326a

Probably not correct place to post but haven't had any luck elsewhere. I would like to use the Style Clock 1 on my gear s but use my own background. cant find location of that clock to do so. Can someone please point me in right direction

@lusciousbeard
open watchmaker tap on the clock an choose "Customize Copy"...

starbase64 said:
@lusciousbeard
open watchmaker tap on the clock an choose "Customize Copy"...
Click to expand...
Click to collapse
I want to use the stock clock that comes with gear manager. Its called Style clock 1. I just want my own background with that clock.

Don't know if this is a a forumla but trying to change the watch face based on a variable.
In tasker have WM Change Watch plugin selected, select which watch face and If %Batt <65%
The attempt is that when the battery is 65% or less the watch face changes

I'd like to add a second location and the current forecast for that location.

formula for celsius and fahrenheit in same clock.
F = ({wt}/5)*9+32
C = (({wt}-32)/9)*5

Is it possible to display active tasker profiles etc. ?

Can someone help, I want to make a few different sub dials. How can I change the rotational value for the watch and phone battery to be 160 or so degrees instead of following a full 360. I want to split the dial with two hands, have each devices battery on the dial, once for each side. The left side having and Full down to Empty running from the 11 Oclock spot down to 7, then mirroring the other side for the other battery
The second dial I wanted a 360 - 7 point where the hand changed each day (for day of week dial)
I am not the best at writing code and was having trouble figuring out how to write this

I realize your post is 4 months old, but . . .
mikeschevelle said:
Can someone help, I want to make a few different sub dials. How can I change the rotational value for the watch and phone battery to be 160 or so degrees instead of following a full 360. I want to split the dial with two hands, have each devices battery on the dial, once for each side. The left side having and Full down to Empty running from the 11 Oclock spot down to 7, then mirroring the other side for the other battery
Click to expand...
Click to collapse
It's a math problem. x/160 = y/360.
y is the rotational value based on a full circle ({drs}, {drm}, or {drh} in watchmaker)
x is the rotational value based on your 160 degree arc. If you solve for x, you get x=.444y
so you can enter the following in a rotation field to get any object to show seconds over your 160 degree arc:
Code:
.444 * {drs}
The second dial I wanted a 360 - 7 point where the hand changed each day (for day of week dial)
Click to expand...
Click to collapse
360/7 = 51.429, so each day would be 51.429 degrees. Set your rotation value to:
Code:
{ddw0} * 51.429

In the Watchmaker Reddit, I posted about saving battery life https://www.reddit.com/r/WatchMaker/comments/3liwww/tips_to_improve_battery_life/
I noticed that I was losing 5-6% battery life per hour with a watchface I made. When I switched to a very simple face with no bells and whistles, I lost closer to 3% per hour. I did some experimenting to figure out how to reduce battery usage with my more complicated face. Here's what I learned:
- Watchmaker still executes positioning code for elements that are not visible. For example, if you enter "{ds}+2" as the rotation for an element that is only visible in bright mode, watchmaker will still do the math once a second while it's in dim mode.
- How frequently an object updates is determined by what watchmaker tag is in the object properties. If no tag is in the properties, it will not update. So if you set the rotation of a hand to "{ds}+2" watchmaker will do the math every second and the hand will move every second. Now lets say you create a function called var_ds() that returns the {ds}+2. Setting the rotation of the hand to "var_ds()" will cause the hand not to rotate. There is no watchmaker tag in the rotation field, so the function is never called and the rotation value never updates. Setting rotation to "var_ds({ds})" will cause the function to be called and the hand to rotate every second. Setting rotation to "var_ds({dm})" will cause the function to be called and the hand to move once a minute - even if the function is still returning values based on {ds}.
Using this info, I was able to come up with some possible optimizations to improve battery life:
1) If you're using lots of math or code to place an object, add "if is_bright" to your code so that it won't be executed while the screen is dim. If you do this, you should initialize the variable is_bright to 1 to prevent weirdness.
2) To control the frequency of updates, stick your code in a function and call it with a tag that represents the frequency you want. For example, I wanted my minute hand to stop on minute marks rather than move smoothly. I wrote a function:
Code:
function var_rotation (r)
return 6*math.floor({drm}/6)
end
The "r" variable is never used in the function, but it lets me control how often the function is called. Previously when I used "6*math.floor({drm}/6)" directly as a rotation value, the expression was evaluated whenever {drm} updated - I'm guessing at least once a second - even though the hand was only actually moving once a minute. Now, my rotation value is var_rotation({dm}). The {dm} causes my function to be called only once a minute which makes a lot more sense for a hand that's only moving once a minute
3) If I had multiple objects using var_rotation() to rotate, I might add a conditional statement to make sure the bulk of the code only runs once a minute:
function var_rotation (r)
Code:
if not (var_lastran == {dm}) then
var_result = 6*math.floor({drm}/6)
end
return var_result
end
If there is a recent result, this simply returns that result instead if recalculating it. If the result is older than a minute, it calculates a new result.
For the particular watchface I was working on, only optimization #2 applied, but based on my initial testing, I'm down to around 3% battery/hour. Hopefully this info helps someone else
Click to expand...
Click to collapse

Related

[proof of concept app]Gesture recognition

I recently saw this tread:
http://forum.xda-developers.com/showthread.php?t=370632
i liked the idea, and when i thought about it, gesture recognition didn't seem to hard. And guess what - it really wasn't hard
I made a simple application recognizing gestures defined in an external configuration file. It was supposed to be a gesture launcher, but i didn't find out how to launch an app from a winCE program yet. Also, it turned out to be a bit to slow for that because of the way i draw gesture trails - i'd have to rewrite it almost from scratch to make it really useful and i don't have time for that now.
So i decided to share the idea and the source code, just to demonstrate how easy it is to include gesture recognition in your software.
My demo app is written in C, using XFlib for graphics and compiled using CeGCC so you'll need both of them to compile it (download and install instructions are on the Xflib homepage: www.xflib.net)
The demo program is just an exe file - extract it anywhere on your device, no installation needed. You'll also need to extract the gestureConfig.ini to the root directory of your device, or the program won't run.
Try some of the gestures defined in the ini (like 'M' letter - 8392, a rectangle - 6248, a triangle - 934), or define some of your own to see how the recognition works. Make sure that you have a string consisting of numbers, then space of a tabulator (or more of them) and some text - anything will do, just make sure that there's more than just the numbers in each line. Below you can set the side sensitivity to tweak recognition (see the rest of the post for description on how it works). Better leave the other parameter as it is - seems to work best with this value.
Now, what the demo app does:
It recognizes direction of drawn strokes, and prints them on the bottom of the screen as a string of numbers representing them (described bellow). If a drawn gesture matches one of the patterns in the config file, the entire drawn gesture gets highlited. It works the best with stylus, but is usable with finger as well.
Clicking the large rectangle closes the app.
And how it does it:
The algorithm i used is capable of recognizing strokes drawn in eight directions - horizontally, vertically and diagonally. Directions are described with numbers from 1 to 9, arranged like on a PC numerical keyboard:
Code:
7 8 9
4 6
1 2 3
So a gesture defined in config as 6248 is right-down-left-up - a ractangle.
All that is needed to do the gesture recognition is last few positions of the stylus. In my program i recorded the entire path for drawing if, but used only 5 last positions. The entire trick is to determine which way the stylus is moving, and if it moves one way long enough, store this direction as a stroke.
The easiest way would be to subtract previous stylus position from current one, like
Code:
vectorX=stylusX[i]-stylusX[i-1];
vectorY=stylusY[i]-stylusY[i-1];
[code]
But this method would be highly inaccurate due to niose generated by some digitizers, especially with screen protectors, or when using a finger (try drawing a straight line with your finger in some drawing program)
That's why i decided to calculate an average vector instead:
[code]
averageVectorX=((stylusHistoryX[n]-stylusHistoryX[n-5])+
(stylusHistoryX[n-1]-stylusHistoryX[n-5])
(stylusHistoryX[n-2]-stylusHistoryX[n-5])
(stylusHistoryX[n-3]-stylusHistoryX[n-5])
(stylusHistoryX[n-4]-stylusHistoryX[n-5]))/5;
//Y coordinate is calculated the same way
where stylusHistoryX[n] is the current X position of stylus, and stylusHistoryX[n-1] is the previous position, etc.
Such averaging filters out the noise, without sacrificing too much responsiveness, and uses only a small number of samples. It also has another useful effect - when the stylus changes movement direction, the vector gets shorter.
Now, that we have the direction of motion, we'll have to check how fast the stylus is moving (how long the vector is):
Code:
if(sqrt(averageVectorX*averageVectorX+averageVectorY*averageVectorY)>25)
(...)
If the vector is long enough, we'll have to determine which direction it's facing. Since usually horizontal and vertical lines are easier to draw than diagonal, it's nice to be able to adjust the angle at which the line is considered diagonal or vertical. I used the sideSensitivity parameter for that (can be set in the ini file - range its is from 0 to 100). See the attached image to see how it works.
The green area on the images is the angle where the vector is considered horizontal or vertical. Blue means angles where the vector is considered diagonal. sideSensitivity for those pictures are: left one - 10, middle - 42 (default value, works fine for me ), right - 90. Using o or 100 would mean that horizontal or vertical stroke would be almost impossible to draw.
to make this parameter useful, there are some calculations needed:
Code:
sideSensitivity=tan((sideSensitivity*45/100)*M_PI/180);
First, the range of the parameter is changed from (0-100) to (0-22), meaning angle in degrees of the line dividing right section (green) and top-right (blue). hat angle is then converted to radians, and tangent of this angle (in radians) is being calculated, giving slope of this line.
Having the slope, it's easy to check if the vector is turned sideways or diagonal. here's a part of source code that does the check, it is executed only if the vector is long enough (condition written above):
Code:
if( abs(averageVectorY)<sideSensitivity*abs(averageVectorX) ||
abs(averageVectorX)<sideSensitivity*abs(averageVectorY)) //Vector is turned sideways (horizontal or vertical)
{
/*Now that we know that it's facing sideways, we'll check which side it's actually facing*/
if( abs(averageVectorY)<sideSensitivity*averageVectorX) //Right Gesture
gestureStroke='6'; //storing the direction of vector for later processing
if( abs(averageVectorY)<sideSensitivity*(-averageVectorX)) //Left Gesture
gestureStroke='4';
if( abs(averageVectorX)<sideSensitivity*(averageVectorY)) //Down gesture
gestureStroke='2';
if( abs(averageVectorX)<sideSensitivity*(-averageVectorY)) //Up gesture
gestureStroke='8';
}
else
{ //Vector is diagonal
/*If the vector is not facing isdeways, then it's diagonal. Checking which way it's actually facing
and storing it for later use*/
if(averageVectorX>0 && averageVectorY>0) //Down-Right gesture
gestureStroke='3';
if(averageVectorX>0 && averageVectorY<0) //Up-Right gesture
gestureStroke='9';
if(averageVectorX<0 && averageVectorY>0) //Down-Left gesture
gestureStroke='1';
if(averageVectorX<0 && averageVectorY<0) //Up-Left gesture
gestureStroke='7';
}
Now, we have a character (i used char type, so i can use character strings for string gestures - they can be easily loaded from file and compared with strcmp() ) telling which way the stylus is moving. To avoid errors, we'll have to make sure that the stylus moves in the same direction for a few cycles before storing it as a gesture stroke by increasing a counter as long as it keeps moving in one direction, and resetting it if it changes the direction. If the counter value is bigger than some threshold (pathSensitivity variable is used as this threshold in my program), we can store the gestureStroke value into a string, but only if it's different from previous one - who needs a gesture like "44444" when dragging the stylus left?
After the stylus is released, you'll have to compare generated gesture string to some patterns (eg. loaded from a configuration file), and if it matches, do an appropriate acton.
See the source if you want to see how it can be done, this post already is quite long
If you have any questions, post them and i'll do my best to answer.
Feel free to use this method, parts of, or the entire source in your apps. I'm really looking forward to seeing some gesture-enabled programs
Very nice work. Reading your post was very insightful, and I hope this can provide the basis for some new and exciting apps!
great app... and well done for not just thinking that seems easy... but actually doing it...
ive been a victim of that myself
very nice work man.. one question in which tool did you write code.. i mean it looks like C but how you test and all..
Great app, i see that it is just proof of concept at this stage, but i see that it can be used in future applications control
Continiue with your great work
nik_for_you said:
very nice work man.. one question in which tool did you write code.. i mean it looks like C but how you test and all..
Click to expand...
Click to collapse
It is C, (no "++", no "#", no ".NET", just god old C ) compiled with opensource compiler CeGCC (works under linux, or under windows using cygwin - a unix emulator), developed in opensource IDE Vham (but even a notepad, or better notepad++ would do), tested directly on my Wizard (without emulator). I used XFlib which simplifies graphics and input handling to a level where anyone who ever programed anything at all should be able to handle it - it providea an additional layer between the programmer and the OS. You talk to Xflib, and Xflib talks to the OS. I decided to use this library, because i wanted to try it out anyway.
If i decide to rewrite it and make an actual launcher or anything else out of it, i'll have to use something with a bit faster and more direct screen access (probably SDL, since i already done some programing for desktop PC with it) - XFlib concentrates on usage of sprites - like 2D console games. every single "blob" of the gesture trail is a separate sprite , which has to be drawn each time the screen is refreshed - that is what slows down the app so much. The gesture recognition itself is really fast.
Very good program i just test it and it works very well some combinaison are pretty hard to realize but i like this blue point turning red with command2 and 934. Goond luck , i'll continue to see your job maybe you'll code a very interesting soft.
Interesting work.... would like to see this implemented in an app, could be very useful.
If you want I have some code I did for NDS coding, and which I ported on PocketPC for XFlib.
It works perfectly well and I use it in Skinz Sudoku to recognize the drawn numbers.
The method is pretty simple : when the stylus is pressed, enter the stylus coordinates in a big array. And when it's released, it takes 16 points (could be changed depending on what you need) at the same distance from each other, checks the angle, and gives you the corresponding 'char'.
To add new shapes, it's just a 15 character string which you link to any char (like, link right movement to 'r', or 'a', or a number, or whatever ^^). It works for pretty much any simple shape, and I even used it to do a graffitti-like thing on NDS which worked really well
Hey!
How do you get the last Stylus Positions?
and how often do you read them out
I want to realice such a code under vb.net, but I don't know how i should read out the last stylus positions, to get them perfectly for such calculations
Code:
Private Sub frmGesture_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
If StylusJump = 1 Then
StylusJump += 1
If (CurrentStylusPosition.X <> frmGesture.MousePosition.X) Or (CurrentStylusPosition.Y <> frmGesture.MousePosition.Y) Then
LastStylusPosition(9).X = LastStylusPosition(8).X
LastStylusPosition(9).Y = LastStylusPosition(8).Y
LastStylusPosition(8).X = LastStylusPosition(7).X
LastStylusPosition(8).Y = LastStylusPosition(7).Y
LastStylusPosition(7).X = LastStylusPosition(6).X
LastStylusPosition(7).Y = LastStylusPosition(6).Y
LastStylusPosition(6).X = LastStylusPosition(5).X
LastStylusPosition(6).Y = LastStylusPosition(5).Y
LastStylusPosition(5).X = LastStylusPosition(4).X
LastStylusPosition(5).Y = LastStylusPosition(4).Y
LastStylusPosition(4).X = LastStylusPosition(3).X
LastStylusPosition(4).Y = LastStylusPosition(3).Y
LastStylusPosition(3).X = LastStylusPosition(2).X
LastStylusPosition(3).Y = LastStylusPosition(2).Y
LastStylusPosition(2).X = LastStylusPosition(1).X
LastStylusPosition(2).Y = LastStylusPosition(1).Y
LastStylusPosition(1).X = CurrentStylusPosition.X
LastStylusPosition(1).Y = CurrentStylusPosition.Y
CurrentStylusPosition.X = frmGesture.MousePosition.X
CurrentStylusPosition.Y = frmGesture.MousePosition.Y
End If
Dim LabelString As String
Dim iCount As Integer
LabelString = "C(" & CurrentStylusPosition.X & "\" & CurrentStylusPosition.Y & ")"
For iCount = 1 To 9
LabelString = LabelString & " " & iCount & "(" & LastStylusPosition(iCount).X & "\" & LastStylusPosition(iCount).Y & ")"
Next
lblGesture.Text = LabelString
ElseIf StylusJump <= 3 Then
StylusJump += 1
Else
StylusJump = 1
End If
End Sub
Sorry, i didn't notice your post before. I guess that you have the problem solved now, that you released a beta of gesture launcher?
Anyway, you don't really need 10 last positions, in my code i used only 5 for calculations and it still worked fine.
Nice thread, thanks for sharing.
Human-,achine interface has always been an interesting subject to me, and the release of ultimatelaunch has sparked an idea. I am trying to acheive a certain look-and-feel interface - entirely using components that are today screen and ultimatelaunch compatible. Basically a clock strip with a few status buttons at the top, and an ultimatelaunch cube for the main lower portion of the screen - gesture left/right to spin the cube, and each face should have lists of info / icons scrolled by vertical gesture. I'm talking big chunky buttons here - tasks, calendar appts, (quick) contacts, music/video playlists - all vertical lists, one item per row, scrolling in various faces of the cube.
Done the top bit using rlToday for now. Set it to type 5 so scrollbars never show for the top section. All good. Cobbling together bits for the faces, but few of the apps are exactly what I want, some (like that new face contacts one) are pretty close, and being a bit of an armchair coder, I thought now would be a good opportunity to check out WM programming and see if I can't at least come up with a mockup of what I want if not a working app.
I was wondering if anyone could advise me on whether I should bother recognising gestures in such a way as this. Does WM not provide gesture detection for the basic up, down, left, right? Actually, all the stuff I have in mind would just require up/down scrolling of a pane - I was thinking that I may well not need to code gesture support at all, just draw a vertical stack of items, let it overflow to create a scrollbar and then just use the normal WM drag-to-scroll feature (if it exists) to handle the vertical scrolling by gesture in the face of the cube. I would rather keep the requirements to a minimum (eg touchflo), both for dependancy and compatibility reasons, so maybe doing the detection manually would be the "way to go", I dunno.
Did you release source with the app launcher? A library maybe? I intend to go open source with anything I do, so if you are doing the same then I would love to have access to your working code
Nice work man.
Impressive.

[HOW TO] Save batterylife on Galaxy 3

Saving Battery on G3 - like a boss!
As I found a lot of posts about too much battery drain I decided to make a step-by-step tutorial to get a better battery life. I will also give some advice about internal system tweaks, for root users only
First of all: You don't need to adapt to all settings I will explain. This isn't even necessary, but just keep them in mind
And:
- All settings are for Galaxy 3 (with CM-based ROMs) but can also be used for other phones/ROMs
- Sorry for any mistake. I'm not a native English (I'm German). But I hope this text is understandable
- I didn't glued pictures on it, but I tried to guide you through the menus as much as I can
Now we will start:
You'll need:
- your phone
- SetCPU (I recommend Pro-Version)
- internet connection
- and some time
[SCREEN TWEAKS]
The biggest and badest part of the phone is the display. Unfortunately we can't live without it...
But there are ways to make it less worse:
1. Darken it as much as you can: You don't need to have over 50% of brightness when you are at home. And even outside you don't have to use it on the highest level. Try to make the contrast higher, or just hold your hand as a shield over the screen, when you just want to check the clock.
The easiest way to control the brightness is the "Power Control" widget:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Or for CM-based ROMs: Enable the brightness control on the notification bar: Settings -> CM -> Interface -> StatusBar Tweaks -> Tick "StatusBar Brightness Control"
Now you can swipe over you statusbar for changing the brightness easily
2. Timeouts: As a long-time-G3-user I just can tell you, that you don't really need them. Normally I switch off the screen / lock it, if I put my phone away. Only when I wait for something to load, I take care, that the screen don't turn off. So setting the automatic screen timeout to 1 minute seems nice. You can choose whatever you want, but keep it under 5 minutes
And you should (if you don't do it) switch your screen off more frequently (when you put your phone away) and don't wait until the timeout does the job. Not a big deal, but very effective.
[CONNECTION TWEAKS]
1. Close to the timeout-settings there is another option for your Wifi-connection: How your W-LAN reacts, when your screen switches off. Thats often a big battery problem in connection with (inefficient) 3G networks. Check this setting under:
Settings -> Wireless Controls -> Wifi settings -> (press menu button) -> advanced -> Wi-Fi sleep policy: Set to [Never]
So your phone will never switch from Wifi to 3G (or 2G) when screen is turned off. The Wifi on a phone has less power consumption than 3G networks. And switching between them is even more worse than just have 3G in idle
2. Only use mobile data-connection if necessary:
This point is self-explanatory. If you don't shut this down completly (in order not to miss emails), switch to 2G networks (For faster switching use a widget or the power-control in your notification bar). This is a compromise between battery saving and connectivity. Better switch it off completly
3. Activate flight-mode sometimes.
Also self-explanatory: When you sleep, you don't need to get calls or messages. Just activate it before you go to sleep and deactivate it, when you wake up (or switch off your phone completly -> even more effective )
4. Deactivate Wifi if you can
When your preferred Wifi networks are out of range your phone tries to search for them constantly. This search routine needs more power than just being connected to one network. Tip: Switch off your Wifi when your leave your house. If this is too much work for you, use a bigger interval for the scanning. This value is set in the build.prop file (/system/build.prop) and can be edited with Root Explorer or anything similar. Search for this line: "wifi.supplicant_scan_interval=xyz". Set the "xyz" e.g. to "300", to scan every 5 minutes
5. Fast Dormancy:
[This option should be set properly to prevent higher battery drain!]
Only set this if your provider supports Fast Dormancy. If you enable this and your provider doesn't support it, you'll have higher battery drain. The other way around the same. Just look it up
Enable/Disable:
for stock-ROM: "Call" *#9900#
for other ROMs: build.prop -> Line "ro.ril.fast.dormancy.rule=" ("1" enable or "0" to disable)
[GENERAL TWEAKS]
1. Task-Killer:
DON'T. USE. AUTO-TASK-KILLER!!! NEVER.
http://lifehacker.com/5650894/andro...ed-what-they-do-and-why-you-shouldnt-use-them
Read this article and you'll get it.
For those TL/DR guys: When an auto killer kills an app, mostly the app will restart itself and will be killed the next time (mayber after 5 or 10 minutes, depends on auto-killing-interval). Restart - kill - restart - ... Bad for batteries.
A full RAM is great for Android, but a fully loaded CPU isn't. The RAM is managed perfectly by the system. For the CPU you should use some CPU-watching apps like "Watchdog". It watches the CPU load caused by apps every xy seconds and informs you when an app using too much CPU.
2. Widgets:
Every widget is using ressources. You should take care of it and only use those, which you really(!) need. A bouncing clock with flashing lights and seconds hand is not really useful and is draining battery like hell. Just check every widget and decide for yourself
[CPU TWEAKS]
This part is only for rooted phones and for those who understand, what I'm talking about
1. Frequencies:
Never set the lowest/minimus frequency to any higher value than the lowest one. How is a CPU supposed to sleep when it's artificially set to a higher frequency?
For OC phones: maximum of 800 MHz should work fine for most things.
2. SetCPU:
This is a powerful app. USE IT!
Profiles: You should set them like this:
Charging Any; Priority 100; max 1000 MHz; min 83/100 MHz (depends on kernel); ondemand
In Call; Priority 95; max 800 MHz; min 83/100 MHz; ondemand
01:00 - 06:00 (sleep time ); Priority 90; max 83/100 MHz; min 83/100 MHz; powersave
Screen OFF; Priority 85; max 200 MHZ; min 83/100 MHz; ondemand
Just play around with them and decide which are the bests for you and don't forget to enable them
Voltages:
You can trouble-free set the voltage for 400MHz - 1000 MHz down by -50 mV. If it causes freezes, try -25 mV. Done? Save and Set -> both in top-right-corner. Tick -> Set on boot (bottom-left)
Governor:
I recommend the ondemand-govenor.
Now I'll explain the settings:
powersave bias: When the governor recalculates the frequency, and the result is 800 MHz, it multiplies the value (800 MHz) with (1000 - x)/1000. E.g. if 300 is set: 800 MHz * (700/1000) = 800 * 0.7 = 560 MHz -> New frequency = 600 MHz (nearest to 560). I recommend = 0.
ignore nice load: On Linux systems (like Android) there are processes which are "nice". There don't want the CPU to jump to higher frequencies. And we don't want it as well: Don't ignore while recalculating -> Set to 0
up treshold: If the CPU load goes above this value, it will jump to the maximum frequency which is set (e.g. 800 MHz). Should be set between 75 - 85.
sampling rate: The governor will recalculate the frequency every xyz µs (1 / 1.000.000 seconds) I use: 20000
sampling down factor: When your CPU jumps to the highest frequency, the next recalculation will be in [sampling down factor] * [sampling rate] µs. It means, your CPU will last longer in higher frequencies before recalculating. Default = 90 (when the sampling rate is at 20000 µs = default, your CPU will last 1,8 seconds on the highest frequency). I recommend = 20.
Don't forget to tick: set with profiles, and set on boot.
If you don't did this before: Untick "Set on Boot"-Option in your CM-Settings -> Performance -> CPU - section. Otherwise your new SetCPU option won't work properly
[OTHER TWEAKS]
NEVER CLOSE APPS WITH PRESSING THE HOME BUTTON, USE THE BACK BUTTON! please
Don't use Live Wallpapers.
Keep an eye on the build-in-battery-consumption menu -> Settings -> About Phone -> Battery Usage
Disable Auto-Rotation if not necessary.
Disable Bluetooth.
Disable Settings -> Location & Security -> Use Wireless Networks
Disable (only when not needed!) Settings -> Accounts & Sync -> Auto-Sync
You'll have to sync every app manually (no more "new Email" popups in notification bar)
Disable [Open Market / Play Store] -> [Menu Button] -> Settings -> Update notifications
Settings -> CM Settings -> Performance:
Enable JIT for better performance
Disable Boot animation for faster boot.
VM-Heap = 32 or 48 MB (not less)
You can hit "thanks" if you want, and maybe someone can make this thread sticky, so everyone can see it
Hope you liked it
And, of course, you can post some more tips, so we can expend this list
save battery g3
hello
i am zsolt
and i would like say that i have alredy probed all roms for galaxy 3
foryo, gb, ics, aokp
my opinion that froyo is a good rom but insufficiently stable, all kernel probed but the best was Kyorarom Ascendency (v0.5.2 - JPU Based) with own kernel
i have 4-5 days battery life average usage!!! important set cpu ondemand 83-800 Mhz if possible,not use live wallpapper and delete stock gallery.apk and google-maps!
aokp rom is very very good, but so still to much defects! with Latest G3mod build by Arakmar 12/04/2012.zip i have set 83-800 Mhz ondemand (not setcpu,in rom control) turn off gps,wifi,data and i was 3% under 21h!!! (i used 4-5calls, and 30 minutes gps whit igo) that is excellent!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
and now i use [ROM][CM7.2] Kyrillos' ROM v10.2 because in aokp the video isn't smooth. in kyrillos almost good! same sets here like aokp and same kernel!
19h under i have used 4 times call, and 15 minutes gps, and 40 minutes video playing still i have 88% baterry power!!!!! GREAT!!!!!
to my mind the kernel is very very important for how much battery uses our phone!!!!
thanks
Great guide!
good detail . thany you for your guide
save battery
hello
i am zsolt again
best option is turn off wifi, gps, 3g/2g, but when you use that
another, set cpu ondemand on oc version 100-800Mhz, non-oc 222-667Mhz and set screen off 83-333Mhz
the root of the matter...... the kernel......sure!!!!
best kernel(which best powersave,but not very smoothly) till now g3mod 2.5 non-oc kernel(because i not play), but to whomsoever not enough the oc version is too good!!!
thanks!
As zsolt64 said, kernel is very important when we talk about the battery. Anyway, good and useful "how to". Thanks!:good:

[Q] Adjusting screen brightness via SeekBar

Such a simple thing but it's literally driving me crazy.
How do I use WindowManager.LayoutParams and SeekBar in conjuction to adjust the brightness within the app (It doesn't have to change system wide settings, although if that's easier why not)
Supovitz said:
Such a simple thing but it's literally driving me crazy.
How do I use WindowManager.LayoutParams and SeekBar in conjuction to adjust the brightness within the app (It doesn't have to change system wide settings, although if that's easier why not)
Click to expand...
Click to collapse
It's very easy.
Basically, you have parameter "screenBrightness" in your LayoutParams object.
It's minimal value is 0.0, and it's maximum value is 1.0.
Let's say you have SeekBar with maximum value of 255.
So, in your OnSeekBarChangeListener you must have something like this:
Code:
[user=439709]@override[/user]
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mLayoutParams=(float)(progress/seekBar.getMax()); //we need to scale our brightness from SeekBar max value to the value //between 0 and 1.
mWindowManager.updateViewLayout(mView, mLayoutParams);
}
mWindowManager is an instance of WindowManager.
mView is a View which you have to attach to the window. It can be a dummy view with no children, just don't forget to remove it before finishing your app.
Please note that this settings won't persist after you remover your dummy View.

Possible Fix For Touchscreen Issues/Misses (Updated 08/29)

SEE UPDATE BELOW
After doing some more digging on surfaceflinger, atd, and their related libs, I found some interesting entries in a "strings" analysis of libinputflinger.so. Loads of stuff on touch calibration. I noticed some repeated strings that looked like they're assigned to different properties. You can see this clearly by entering:
Code:
strings /system/lib/libinputflinger.so | grep -iE '(^touch\.|[ ][ ]touch\.)'| sed -e 's/^[ \t]*//' | sort -n | uniq
The terminal returns
Code:
touch.coverage.calibration
touch.coverage.calibration: box
touch.coverage.calibration: none
touch.deviceType
touch.distance.calibration
touch.distance.calibration: none
touch.distance.calibration: scaled
touch.distance.scale
touch.distance.scale: %0.3f
touch.gestureMode
touch.orientation.calibration
touch.orientation.calibration: interpolated
touch.orientation.calibration: none
touch.orientation.calibration: vector
touch.orientationAware
touch.pressure.calibration
touch.pressure.calibration: amplitude
touch.pressure.calibration: none
touch.pressure.calibration: physical
touch.pressure.scale
touch.pressure.scale: %0.3f
touch.size.bias
touch.size.bias: %0.3f
touch.size.calibration
touch.size.calibration: area
touch.size.calibration: box
touch.size.calibration: diameter
touch.size.calibration: geometric
touch.size.calibration: none
touch.size.isSummed
touch.size.isSummed: %s
touch.size.scale
touch.size.scale: %0.3f
touch.wake
I looked up some of strings on the net, and lo and behold, they're build.prop entries! You can see the props above that have different strings to assign to them. The ones with a "%0.3f" refer to a number value, and the one with "%s" is a boolean 0/1.
I've only done a little testing, but I found a baseline of improvement values to make our touch screens more responsive. Some of the properties I couldn't find info on, so I'm testing some values like touch.distance.scale. I feel like I have definitely noticed improvements though. I'm no longer so pissed off using my phone, and the frequency of misses overall seems significantly lower. It's acceptable now. Here's what I'm using now at the end of my build.prop:
Code:
##### touch ######
touch.deviceType=touchScreen
# (geometric, diameter, box, area)
touch.size.calibration=geometric
touch.size.scale=100
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.1
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=interpolated
# (box, none)
touch.coverage.calibration=box
For detailed information on these touch properties, read here(search for the property you're interested in; the page is pretty long). Some are self-explanatory and others we'll just need to test more. Check them out and see if any calibration values make a significant change. Just copy the above code and paste to the bottom of /system/build.prop with a nice file manager like Solid Explorer. Warning: Adding these entries in the build.prop will change the default touch properties. You can always change them back to stock by removing or commenting the entries from build.prop. I assume most values are aafe, but I can't be sure.
Also worth noting. I found some additional build.prop values to make Android snappier. The fling/swipe velocity make a big difference. Not sure what the others correlate to.
Code:
##### touch related #####
view.touch_slop=2
view.scroll_friction=1.5
view.minimum_fling_velocity=25
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
ro.min_pointer_dur=8
windowsmgr.max_events_per_sec=200
EDIT: For detailed information on these touch properties, read here.
I'm gonna add some "profiles" of touch settings to use down here.
This one is for a Nexus 4 I believe. I'm trying it out now, and it seems pretty good. My goal is to emulate the touch experience I had with that phone.
Code:
##### touch ######
touch.deviceType=touchScreen
touch.orientationAware=1
# (geometric, diameter, box, area)
touch.size.calibration=diameter
touch.size.scale=10
touch.size.bias=0
touch.size.isSummed=0
# (amplitude, physical, none)
touch.pressure.calibration=amplitude
touch.pressure.scale=0.005
touch.gestureMode=pointer
# (interpolated, vector, none)
touch.orientation.calibration=none
UPDATE
Hey guys, so here's an update to what I've found out about the touch screen and its issues. I apologize for my low activity on xda. I've been real busy working on some linux projects.
First, in order for the touch.* settings to work, they need to be put in an .idc (input device configuration) file with the name of the device. For the G4, that is: /system/usr/idc/touch_dev.idc.
If you have another phone or want to check, you can get the name of your touch screen device with the terminal command:
Code:
for i in /dev/input/event*; do j="$(getevent -i $i | grep -i touch)"; j=${j#*name: }; [[ -z $j ]] || echo ${j//\"/}; done
Before you go try out the .idc file, I want to warn you that certain settings will disable the touch screen. If this happens, you'll need to use adb to delete or move /system/usr/idc/touch_dev.idc somewhere else so that it doesn't get loaded when the phone boots. These are some settings you must NOT change in the .idc file:
Code:
touch.deviceType = touchScreen
touch.coverage.calibration = box
These are the settings I'm currently using:
Code:
touch.deviceType = touchScreen
touch.orientationAware = 1
touch.size.calibration = diameter
touch.size.scale = 1
touch.size.bias = 0
touch.size.isSummed = 0
touch.pressure.calibration = physical
touch.pressure.scale = 0.001
touch.orientation.calibration = none
touch.distance.calibration = none
touch.distance.scale = 0
touch.coverage.calibration = box
touch.gestureMode = spots
MultitouchSettleInterval = 1ms
MultitouchMinDistance = 1px
TapInterval = 1ms
TapSlop = 1px
I'm not sure if the Multitouch* and Tap* settings work or if adding more values from libinputflinger will work. There's little documentation on using settings that don't begin with "touch." You might have to do some experimentation and try other entries in the "strings /system/lib/libinputflinger.so" readout. I would also try using the first settings I posted if these don't seem to help.
Another thing I found out is that this phone performs better with low entropy. You can monitor your current entropy level in the terminal:
Code:
watch "cat /proc/sys/kernel/random/entropy_avail"
It's usually around 2000+ and peaks at 4096 with high activity which is where I think lag comes in. I found that lowering it to under 1000 average cut out the lag spikes I was getting:
Code:
echo 16 > /proc/sys/kernel/random/read_wakeup_threshold
echo 16 > /proc/sys/kernel/random/write_wakeup_threshold
I went ahead and added that to an init.d script. This doesn't have any side effects I've noticed besides possible increased battery life, since the "hwrng" process that generates entropy has no work to do. In case you don't have init.d, make sure busybox is installed, run this command in the terminal, and you'll have init.d startup:
Code:
mount -o remount,rw /system; echo "sleep 300 && run-parts /system/etc/init.d" >> /system/etc/init.qcom.post_boot.sh; mount -o remount,ro /system
One last thing to mention. The touch device has a little section in sysfs under: /sys/devices/virtual/input/lge_touch. There's some interesting information you can find there, values you can change, and tests you can run. Any file with a name ending in "test" can be run by opening the file, yes sysfs files are weird like this. All tests pass for me except "abs_test":
Code:
cat /sys/devices/virtual/input/lge_touch/abs_test
> ========RESULT=======
> Absolute Sensing Short Test : RESULT: Fail
> Absolute Sensing Open Test : RESULT: Fail
I haven't seen other people with or without touch screen issues run this test, so it may or may not be an indicator that something's wrong with the touch screen or its kernel-side drivers. By the way, this doesn't require superuser. You can check this on any device and even use a good text editor like QuickEdit to open the file and generate test results.
At this point, I'm fairly content with the new improvements I've made, but my best bet on a complete fix would be upgraded touch drivers. The "Advanced In-Cell Touch" device this phone uses is pretty new. There's a good chance this technology has drivers that don't have all the bugs worked out. This is something we'll have to wait on. On the other hand, if LGE handed over a bootloader unlock method and some source files, I'd be just fine with that too.
What "issues" is this attempting to fix
kyle1867 said:
What "issues" is this attempting to fix
Click to expand...
Click to collapse
Probably the horrible touch response many users experience.
Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?
Sent from my LG-H811 using XDA Free mobile app
Wow nice job man.
Is it possible to address the swipe registering as taps through this or do you think this will also address it?
Harmtan2 said:
Is this something that we can copy and paste into the end of the build prop, or is it replacing stuff that is already there?
Sent from my LG-H811 using XDA Free mobile app
Click to expand...
Click to collapse
You'll have to add almost all of them.
Yes bro am too facing the touch problem in my intex aqua star power. The problem is when we keep the finger the screen shakes and also in 100% of my usage 20% touch mismatches . On first i irritated and now i habituated with this touch. [emoji28]
Sent from my Aqua Star Power using Tapatalk
The build.prop edits seem to be making the difference. ?
Sent From My LG G4
Rydah805 said:
The build.prop edits seem to be making the difference. ?
Sent From My LG G4
Click to expand...
Click to collapse
would you say that double tap to wake is improved as well?
esmenikmatixx said:
would you say that double tap to wake is improved as well?
Click to expand...
Click to collapse
Hmm, you know what, it is.
Sent From My LG G4
esmenikmatixx said:
would you say that double tap to wake is improved as well?
Click to expand...
Click to collapse
I would say so I have all these except the new ones he posted an an script from another post an I do see some improvements defiantly double tap to wake
GUGUITOMTG4 said:
You'll have to add almost all of them.
Click to expand...
Click to collapse
Soooo... can you run through this with me? I'm not a novice but I'm trying to figure out how to add them? I can't simply text edit the build.prop on my phone or pull/push from my computer?
This post is the reason why I'm glad we now have root.
Akomack said:
Soooo... can you run through this with me? I'm not a novice but I'm trying to figure out how to add them? I can't simply text edit the build.prop on my phone or pull/push from my computer?
Click to expand...
Click to collapse
Yes, you can manually edit it and or push pull it, but sometimes it causes bootloop when edited as a plain text. I would suggest using a build prop editor app from Play Store (I use Build Prop Editor by JRummy. It's Also built in in Rom Toolbox). You will have to copy-paste line by line. I'm gonna try those settings, but in my case, my screen sometimes misses when the phone gets hot. I attribute my touchscreen issues to the Lag LG injected on thermal files.
GUGUITOMTG4 said:
Yes, you can manually edit it and or push pull it, but sometimes it causes bootloop when edited as a plain text. I would suggest using a build prop editor app from Play Store (I use Build Prop Editor by JRummy. It's Also built in in Rom Toolbox). You will have to copy-paste line by line. I'm gonna try those settings, but in my case, my screen sometimes misses when the phone gets hot. I attribute my touchscreen issues to the Lag LG injected on thermal files.
Click to expand...
Click to collapse
Do you have to be rooted to do that?
Hendrycks said:
Do you have to be rooted to do that?
Click to expand...
Click to collapse
Yes you do
Sent from my LG-H811 using Tapatalk
Hi,
yesterday I bought a G4 H815.
I have the following problem: If my phone is on the bed next to me, or lying on a table, the touchscreen response is terrible. If I'm holding it in my hand, there's no problem. If it's charging and so lying on the bed, there's no problem either.
I took a few photos with my Optimus Black, since I could't take any screenshots of the issue:
this is with my phone lying on the bed:
and here holding it in my hands, producing no problems at all.
what is this? It's bloody annonying and totally unacceptable from a phone of this level, And yes... I would use it without holding it, just placing it on my bed next to me, but you can see how it is performing like so...
is my display faulty, or what?
Thanks man.
It's indeed more responsive. Especially double tap to wake is working good now.
*justintime* said:
Thanks man.
It's indeed more responsive. Especially double tap to wake is working good now.
Click to expand...
Click to collapse
I didnt feel a difference can you post a screenshot of your buildprop? Thanks in advance
Maybe im doing it wrong
Sent from my LG-H811 using Tapatalk
Just edit with es file Explorer.
And get the build.prop in the system folder. Not the other one.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

[TBUI] TBUI Watch face tool. Editor for one of the FitcloudPro watch face format.

hi all again,
still in "beta", but seems works fine enough to public and allow to use this format even more effective than in vendors watch faces.
what does mean "TBUI"? it's just a tag in watch face (further "wf") file, what allow you identify it. you may find it at the end of all of this type of watch faces. just open it in any editor/viewer, go at the end of the file and you'll se it:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
it's a very flexible format, perhaps a next version of "PUSH" (yep, a similar tag again). at least it looks similar but have more powerful abilities.
this format allow you to use in any combinations a lot of elements such as:
- clock hands (as discrete as smooth)
- digital data: time markers (49 in variants), sensors data (48 in variants)
- sequential frame-based elements (time, month, progress-bars, rolled-up elements... - 30 items)
- localizeable tags (chinesse/non chinesse)
- animations (sequential frames)
- buttons to call device menu items
- internal wf configuration (ability to enable/disable some groups of elements "on the fly")
and you not limited in one item per type (if you want).
but before to continue, to be honest I'd must warn:
WARNING - theoretically you may brick your device and may not recover it without special knowledge. while I'd investigated this format it happed few times in case of wrong frames compression. now it's solved and must not happens, but chances still not a zero. for sample, few days ago I've known what a zero mirror point for clock hands may cause stuck your device too. I did set a foolproof protection for exactly this issue, but can't check all of possibilities because of over 150 available elements.
ok. if you'd not escaped yet, let's continue.
Spoiler: few screenshots of interface
editor was maked closer to the file format as maximum as possible, so you must understand few basic definitions:
- frame - just an image
- char set - required for elements what uses strings to display. technically. it's a group of assignments frames to characters/symbols. if you use some char set for element, then each char in string what must be displayed, would be replaced by assigned frame. if the char would not assigned, than it'll be skipped.
- ui element - a part of a wf what do something. display some sort of data or mark some region for some action.
- region - rarely uses. if you not in plane to make a hard wf, than you may just ignore it. treat it as "layer". it assign new start point of a coordinate for child elements, but have no affect for sequential of global drawing queue and not cut elements if it's draws out of region area. each region have it's own "sets" - a group of elements what must be shown at once. what det must be shown, may be configured by special element class.
so in this case, editor have a 4 "subeditors": "UI" ("UI items" and "Regions") and "Resources" ("Char Sets" and "Frames")
main interface controls:
horizontal control panel:
"X" - remove element
"A" - add new element as next
"U" - up at one position
"D" - down at one position
"+"/"-" - expand/collapse element
vertical control panel (for ui items editor only):
"+"/"-" - expand/collapse element
"H" - hide element on branch
"L" - ignore element on branch (would be displayed, but would be ignored by mouse)
available classes:
Spoiler: Overlay
just a frame as is. used parameters:
Code:
Target ID - id of a frame
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Spoiler: ClockHands
used parameters:
Code:
Target ID - id of a first frame in chain or alone frame id
X, Y - top left corner coordinates
X2, Y2 - coordinates of a mirror/rotate point
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
elements:
CHHoursHand16, CHMinutesHand16, CHSecondsHand16 - uses 16 sequential frames from "N" to "E". works as a discrete clock hands. all other frames would be used as a mirrored via lines goes through mirror point (x2, y2)
CHHoursHand1, CHMinutesHand1, CHSecondsHand1 - uses only one frame ("N"). would be rotated around x2, y2. works as a discrete clock hands. a lot of cpu usage - reduce size of a frame as possible.
CHHoursHandSmooth, CHMinutesHandSmooth, CHSecondsHandSmooth - uses only one frame ("N"). would be rotated around x2, y2. works as a smooth clock hands. a lot of cpu usage - reduce size of a frame as possible.
Spoiler: Char2FrameTime
various elements what display time parts (hours, minutes, seconds, date, month, year, day of the week in different variants) as a numeric values
used parameters:
Code:
Target ID - id of a char set
X, Y - top left corner coordinates
X2, Y2 - used only for calendar table parts as a size of a cell
Align - align of an element to x, y point
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Params 1 - second field only - kerning (interval between chars)
Spoiler: Char2FrameStatistic
various elements what display sensors data (steps, hear rate, o2, battery level etc. in different variants) as a numeric values
used parameters:
Code:
Target ID - id of a char set
X, Y - top left corner coordinates
Align - align of an element to x, y point
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Params 1 - second field only - kerning (interval between chars)
Spoiler: Localizable
elements what display various tags for chinesse and non-chenesse localizations ("am/pm","bpp","o2","km"/"ml" etc. )
each item must have two sequential frames: for "chinesse" locale, then for "non-chinesse" locale.
useless if you have no plans to make a chinesse variant.
used parameters:
Code:
Target ID - id of a first frame (chinesse)
X, Y - top left corner coordinates
Align - align of an element to x, y point
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Spoiler: SequentialFrames
various elements displays some data as sequential frames. like a progress-bars of some data, month etc.
used parameters:
Code:
Target ID - id of a first frame in chain
X, Y - top left corner coordinates
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Spoiler: Specialized
some sort of elements what not assigned to any other classes
used parameters:
Code:
Target ID - id of a first frame in chain
X, Y - top left corner coordinates
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Spoiler: OverlayGroup
not analyzed yet
Spoiler: Button
uses to call internal watch menus if exists
used parameters:
Code:
X, Y - top left corner coordinates
X2, Y2 - width and height of a button
Parent Region ID - as named
Set ID - as named for region assigned in "Parent Region ID"
Spoiler: RegionSettings
selecting id of a set what must be shown in appropriate region. works like a button, but have a some specific.
used parameters:
Code:
X, Y - top left corner coordinates
X2, Y2 - width and height of a button
Region Type - how it must be used - via internal config or by tap
Params 1 - for "RSConfig" only. first field as a count of a selectable items
Params 2 - for "RSConfig" only. list of frames id what would be used as a thumbnails for selection menu
sorry for so short manual, it's a bit hard to write that's all on not my first language. you may use an original watch faces to learn how it works in details or ask me here or in pm.
~200 original watch faces for dm50 (466x466) available on my gdrive you may use it as a sample or just a template/resources.
download link TBUIWFTool.zip
Spoiler: list of tested compatible devices
- DM50, Lemfo (466х466)
- HD11, Huadai (240x280)
- HK28 (368х448)
- HK46 (360x360)
- i20, Colmi (360x360)
- i30, Colmi (390?x390?)
- i31, Colmi (466x466)
- C60, Colmi (240x280)
- C80, Colmi (368x448)
- LA24, Linwear, Tiroki (360х360)
- LF26 Max, Lemfo (360х360)
- Vibe 7 Pro, Zeblaze (466x466)
- x7, Gejian (360x360)
Spoiler: not tested devices with TBUI wf
- Dizo Watch R, Realme (360х360)
- HK3Pro (360х360)
- L20, microwear (240x280)
- W3Pro+, XO (360х360)
all devices except dm50 tested by other users, not by me.
watch face for sample:
it was maked by request (converted from push 240x240 to tbui 360x360) and because my watch have a 466x466 resolution it looks shifted. but on 360x360 would be fine.
if you hold tap on display to get watch face selector, you'll see a little gear icon at bottom of preview:
tap it and you'll enter in internal config menu:
you can setup:
- ability to show/hide weather applet
- using static or roll-up month/day elements
- using battery level by 10% or by 1%
- select discrete seconds clock hand or smooth
also it have a few buttons in regular mode:
- weather (by tap weather applet)
- data (by tap steps)
- heart rate (by tap heart or it's numbers)
- timer (by center of a clock)
Very good
I tried running the tool in a clean Windows 11 VM, and it wont start. Does it require a runtime or framework (eg, .NET, Python, etc.) to be installed?
EDIT: Nevermind, Windows' had blocked the file. Anyone else has this problem, right-click->propoerties->unblock. Windows does not give a helpful error message when failing to run. FYI I also got a hit in Windows Defender, which immediately deleted this when I first downloaded it. I scanned in in Kaspersky online and it appears to be clean, so it appears to be a false-positive, but that might have something to do with why Windows is making it so hard to run it.
danjayh said:
...Does it require a runtime or framework (eg, .NET, Python, etc.) to be installed?
...
Click to expand...
Click to collapse
.net 4.7.2 only.
danjayh said:
...FYI I also got a hit in Windows Defender, which immediately deleted this when I first downloaded it...
Click to expand...
Click to collapse
I use it on win 10 and never seen nothing similar. also never heard about this issue (shared on other forum from march).
also it's not finished and would be updated. m.b. even not an once.
Great work... But how I can upload to Colmi i30?
Thanks!
EDIT: Learned to upload and all ok, thanks again!
It's possible to easy convert 466px to 390px? Or need export and import resized all frames?
Jean-DrEaD said:
It's possible to easy convert 466px to 390px? Or need export and import resized all frames?
Click to expand...
Click to collapse
no. resizing in ".net" is a... not a good quality point. you must resize frames via external specialized tools. I use a xnview (for sample). it have a fine enough algorithms and batch processing.
with next build you'll be allowed to remove all frames by one click (already implemented in debugging build). also I'll integrate local browser (at first) for viewing graphical resources of local watch face files and export it or import to current watch face.
at this time, in debugging build it supports push format for viewing too (editing not in plans, just only as sourse of images). seems public build would be able at this week.
in plans some other formats and add web browser too.

Categories

Resources