I'm working at the gyro already up and down works already and I have found another example where the rolling also works but I have to modify the code for my project.
Maybe you could help me with this.
This is what works so far:panel horz_pan =
{
bmap = "horzupper.tga";
pos_x = 512;
pos_y = 464;
layer = 6;
flags = OVERLAY, VISIBLE;
}
panel horizont_pan =
{
window (536, 488, 80, 80, hudhorizont.bmp, 0, hoehe);
flags = VISIBLE;
layer = 5;
}
//instrument horizont
function horizontkippen()
{
horizont_pan.center_x = 576;
horizont_pan.center_y = 496+32;
}
and this is the aprt that needs to be modified for my needs://instrument horizont
function horizontkippen()
{
horizont_pan.center_x = 576;
horizont_pan.center_y = 496+32;
while (1)
{
//pitch sidewards
horizont_pan.angle = integer(-roll);
//Horizont auf Neigungshöhe einstellen
pitch=-tillt+185;
wait(1);
}
}
And last but not least a screenshot of my project:Speedometer, Altimeter and compass are already working
