rotate a bitmap about it's centre

For general discussion related FlowStone
Post Reply
nimbusgb
Posts: 11
Joined: Sun Oct 09, 2011 5:55 am

rotate a bitmap about it's centre

Post by nimbusgb »

trying to rotate a bitmap of a compass card around its own centre.

Any pointers would be appreciated!
nimbusgb
Posts: 11
Joined: Sun Oct 09, 2011 5:55 am

Re: rotate a bitmap about it's centre

Post by nimbusgb »

might have sorted some of it but i need to calculate the centre of the plotted bitmap. If the gui display is resized then the centre of rotation moves and things go wrong.

I have attached a copy of my display but not sure if that encapsulates the bitmaps??

It should display this

Image


Can I just add how blown away I am at this! What a cracking piece of software! The manuals could do with a bit of work, working out where to put things like the redraw of a bitmap is mostly trial and error but 2 days ago I had not heard of Flowstone and in one evening I produced a working compass display, got a feed from a com port going, filtered out a csv stream and can control my display from a piece of hardware.

Excellent! I'll certainly be spreading the word to some of the user groups I am in!
Attachments
compass.fsm
(32.16 KiB) Downloaded 1376 times
Morph
Posts: 53
Joined: Tue Jul 13, 2010 1:59 pm

Re: rotate a bitmap about it's centre

Post by Morph »

Looks good!

To optimize the redrawing a bit you can change the Redraw primitive to a Redraw Area to make the redraw area as small as possible. Also using a Float Changed can reduce triggers when triggers are sent without changing value.
compass_redraw_area.fsm
(32.4 KiB) Downloaded 1415 times
fixstuff555
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm

Re: rotate a bitmap about it's centre

Post by fixstuff555 »

Well done.

I have to say that's one of the best looking graphic bitmaps I've seen on these forums.
horaceoz
Posts: 2
Joined: Sat Oct 22, 2011 5:08 am

Re: rotate a bitmap about it's centre

Post by horaceoz »

good work on the compass
used this with the phidgets 3/3/3 for spatial info for my Land Rover

does anyone know how to use the 3 axis compass readings to allow pitch and roll compensation?
Attachments
CarAttitudeMeter.fsm
Land Rover Attitude Meter
(63.9 KiB) Downloaded 1349 times
Embedded
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: rotate a bitmap about it's centre

Post by Embedded »

Depends what it is your controlling. But it will involve using the PID module to give nice progressive results.
horaceoz
Posts: 2
Joined: Sat Oct 22, 2011 5:08 am

Re: rotate a bitmap about it's centre

Post by horaceoz »

At the mo I am using the yaw for compass heading for testing but I would like to use the compass data
Post Reply