Login |  Register



Welcome
Welcome to engineeringdiy

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Inclinometer addon developement - rotate image inside kodi
PostPosted: Sat Jan 16, 2016 4:27 pm 
Joined: Tue Oct 06, 2015 3:01 pm
Posts: 122
Hi, I am developing inclinometer addon.
I am using MPU-6050 Six-Axis Gyro + Accelerometer.
I have a simple working addon made in python (background, back and home button) and in the background of this addon there is code that return radians or degrees of MPU-6050.

And now I have a problem: How can I rotate image inside kodi addon?

I found this function:
Code:
<animation effect="rotate" end="30" center="360,288" time="200">Focus</animation>


But, how can I write that in Python?
Code:
.setAnimations()


:?


Report this post
Profile  Offline
 
 Post subject: Re: Inclinometer addon developement - rotate image inside ko
PostPosted: Thu Feb 11, 2016 4:23 pm 
Joined: Mon Oct 20, 2014 7:58 pm
Posts: 135
Do you want the sreen to stay in the same position while your car is rolling over? :D :D :D


Report this post
Profile  Offline
 
 Post subject: Re: Inclinometer addon developement - rotate image inside ko
PostPosted: Thu Feb 11, 2016 9:56 pm 
Joined: Fri May 22, 2015 8:46 pm
Posts: 314
nichnormal wrote:
Do you want the sreen to stay in the same position while your car is rolling over? :D :D :D


:D :D ! Keel over !!


Report this post
Profile  Offline
 
 Post subject: Re: Inclinometer addon developement - rotate image inside ko
PostPosted: Sat Mar 05, 2016 2:13 pm 
Joined: Tue Oct 06, 2015 3:01 pm
Posts: 122
Well guys, I really need help... :cry:

Kamion wrote:
How can I rotate image inside kodi addon?

I found this function:
Code:
<animation effect="rotate" end="30" center="360,288" time="200">Focus</animation>


But, how can I write that in Python?
Code:
.setAnimations()


:?


Report this post
Profile  Offline
 
 Post subject: Re: Inclinometer addon developement - rotate image inside ko
PostPosted: Mon Mar 07, 2016 3:38 pm 
Site Admin
Joined: Sat Sep 27, 2014 3:39 pm
Posts: 20
Hi,

Check http://mirrors.xbmc.org/docs/python-docs/stable/xbmcgui.html#ControlImage, setAnimation().

Kamion wrote:
Well guys, I really need help... :cry:

Kamion wrote:
How can I rotate image inside kodi addon?

I found this function:
Code:
<animation effect="rotate" end="30" center="360,288" time="200">Focus</animation>


But, how can I write that in Python?
Code:
.setAnimations()


:?


Report this post
Profile  Offline
 
 Post subject: Re: Inclinometer addon developement - rotate image inside ko
PostPosted: Sun Mar 13, 2016 5:35 pm 
Joined: Tue Oct 06, 2015 3:01 pm
Posts: 122
Image

This is my code to rotate image constantly for 360deg.
Code:
self.imageRotate = xbmcgui.ControlImage (x, y, w, h,  "image.png")
self.addControl(self.imageRotate)
self.imageRotate.setAnimations([('Conditional', 'effect=rotate end=-360 center=auto time=10000 loop=true reversible=false condition=true')])


Report this post
Profile  Offline
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests

Panel

Top You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Search for:
Jump to:  


cron
suspicion-preferred