Kodi Community Forum

Full Version: Inclinometer addon developement
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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',)])
Nobody?
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
I can not belive this, is there really no function that rotates image in kodi??
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')])