Inclinometer addon developement
#1
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, bach 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??

Or do I need to start from scratch and make my addon in .xml so I can use <animation> tag and effect rotatex and rotatey?

I am a begginer, please help me. Huh
I really want to make this inclinometer addon.
Reply
#2
have you tried this:
http://mirrors.xbmc.org/docs/python-docs...Animations
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Is this the correct syntax?

self.obrnix=self.addControl(xbmcgui.ControlImage(self.w/2 - 143/2, 80, 143, 57, mediaPath + "xobrni.png",30))
self.obrnix.setAnimations([('focus', 'effect=rotatex end=90,247,220,56 time=0',)])
Reply
#4
Nobody?
Reply
#5
How do I turn this:
Code:
<animation effect="rotate" end="30" center="360,288" time="200">Focus</animation>

into this:
Code:
.setAnimations()

Please help me. Huh
Reply
#6
I can not belive this, is there really no function that rotates image in kodi??
Reply
#7
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')])
Reply

Logout Mark Read Team Forum Stats Members Help
Inclinometer addon developement0