Industrial SDL app, need Gauge widget

Hi group / list

I’m lucky enough to be a mechanical engineer at a factory where we are
using
the realtime extensions for RedHat Linux to develop a UI front end for
process
control. We have data aquisition cards gathering info from various
sensors and
devices and making the info available through a device which acts
similar to
/dev/urandom

The senior engineer has a licensed Motif and an XRT-Gauge demo which he
loves,
but we balk at XRT’s $2500 price tag. So we are seeking a better way.
This software
is internal stuff for our own private industrial computers which we
don’t intend to
sell, but just for our own use.

I am of the opinion that SDL would likely work wonderfully for our
purposes, but we
really need a gauge widget. I am planning on hacking one out and
releasing it under
the GPL or similar, but am a newbie to SDL other than using it.

What would be the best way to implemet the gauge widget? We need a round
dial where
we can make a red zone for pass / fail as it is our contention that our
shop workers have
a much easier time with familiar artifacts such as round dials :slight_smile:

Basically, our app gets info from a kernel device, when the user clicks
a button on the
screen, and the gauge registers the result.

Should we use, say a bitmap background, and a pointer which is rotated
in the center, or
perhaps a series of bitmap pointers corresponding to the angle? Does
anybody have a
proto-gauge widget already built?

Any help would be appreciated. Thanks!

Regards,

  • Doug

I am of the opinion that SDL would likely work wonderfully for our
purposes, but we
really need a gauge widget. I am planning on hacking one out and
releasing it under
the GPL or similar, but am a newbie to SDL other than using it.

You’re running fullscreen mode on svgalib, fbdev or similar…?

What would be the best way to implemet the gauge widget? We need a round
dial where
we can make a red zone for pass / fail as it is our contention that our
shop workers have
a much easier time with familiar artifacts such as round dials :slight_smile:

Basically, our app gets info from a kernel device, when the user clicks
a button on the screen, and the gauge registers the result.

(Why not a continously updating mode? Looks much cooler… :wink:

Should we use, say a bitmap background, and a pointer which is rotated
in the center, or
perhaps a series of bitmap pointers corresponding to the angle?

Yeah, that would probably be the best looking method, although it’s not as
flexible as a dynamically rendered one, which could be scaled and changed in
other ways without artifacts. Then again, GIMPing or digitizing a fixed image
is a lot easier.

You could take some photos of real gauges, scan (unless you have a high
quality digital camera), and remove the pointers with the GIMP. Render the
pointer using some SDL based drawing library that can do antialiazed polygons
for best results.

Does anybody have a proto-gauge widget already built?

Nope, but I might build one any day now, as I could use one anyway…

//David

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------> http://www.linuxaudiodev.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Tuesday 27 February 2001 10:41, B. Douglas Hilton wrote:

Douglas,

Have you looked at the FLTK widget set …
http://www.fltk.org/

It is also possible to use it in conjuction with SDL (in windowed mode).

Ciao
Andreas

“B. Douglas Hilton” wrote:> Hi group / list

I’m lucky enough to be a mechanical engineer at a factory where we are
using
the realtime extensions for RedHat Linux to develop a UI front end for
process
control. We have data aquisition cards gathering info from various
sensors and
devices and making the info available through a device which acts
similar to
/dev/urandom

The senior engineer has a licensed Motif and an XRT-Gauge demo which he
loves,
but we balk at XRT’s $2500 price tag. So we are seeking a better way.
This software
is internal stuff for our own private industrial computers which we
don’t intend to
sell, but just for our own use.

I am of the opinion that SDL would likely work wonderfully for our
purposes, but we
really need a gauge widget. I am planning on hacking one out and
releasing it under
the GPL or similar, but am a newbie to SDL other than using it.

What would be the best way to implemet the gauge widget? We need a round
dial where
we can make a red zone for pass / fail as it is our contention that our
shop workers have
a much easier time with familiar artifacts such as round dials :slight_smile:

Basically, our app gets info from a kernel device, when the user clicks
a button on the
screen, and the gauge registers the result.

Should we use, say a bitmap background, and a pointer which is rotated
in the center, or
perhaps a series of bitmap pointers corresponding to the angle? Does
anybody have a
proto-gauge widget already built?

Any help would be appreciated. Thanks!

Regards,

  • Doug


| Andreas Schiffler aschiffler at home.com |
| Senior Systems Engineer - Deskplayer Inc., Buffalo |
| 4707 Eastwood Cres., Niagara Falls, Ont L2E 1B4, Canada |
| +1-905-371-3652 (private) - +1-905-371-8834 (work/fax) |

Douglas,

Have you looked at the FLTK widget set …
http://www.fltk.org/

I also recomend FLTK as a light-weight GUI toolkit. :slight_smile:

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Should we use, say a bitmap background, and a pointer which is rotated
in the center, or
perhaps a series of bitmap pointers corresponding to the angle? Does
anybody have a
proto-gauge widget already built?

Personally I’d just put together a bitmapped gauge graphic and draw a
line for the pointer.
If you need some fast line drawing code I’ve written a fairly generic
example.

As someone else suggested, FLTK is good stuff. Might be worth a look.

-John–
Underfull \account (badness 10000) has occurred while \spend is active
John R. Hall - Student, Georgia Tech - Contractor, Loki Software

Douglas,

Have you looked at the FLTK widget set …
http://www.fltk.org/

I also recomend FLTK as a light-weight GUI toolkit. :slight_smile:

It’s really nice library but has one serious problem: it’s keyboard
handling on X11 is weird — it uses latin1-only home-made implementation
for compose-key/dead-key stuff (normal keys are limited to latin1…latin4
encodings) and maintainer refuses to support X11 input methods. Thanks to
this, FLTK cannot be fully used with ISO8859-15 locales for example.

Are there any plans to improve SDL’s keyboard handling on X11? It is also
very primitive and limited to latin1. Fortunately, SDL is not designed for
creating productivity applications and keyboard handling is not that
important :)On Tue, 27 Feb 2001, Sam Lantinga wrote:

Ville Hallik +372-52-77891

Are there any plans to improve SDL’s keyboard handling on X11? It is also
very primitive and limited to latin1.

definitely, input methods should be used. the current key handling is
just a stopgap. (at least it should be extended to latin15)

Fortunately, SDL is not designed for
creating productivity applications and keyboard handling is not that
important :slight_smile:

games are much more important, and I’d expect someone using a non-latin
script to help with this since I would probably miss something if I tried.

most great games have a lot of japanese symbols in the opening screen
or at least in the credits so obviously it’s a must for any serious
gaming library :slight_smile:

David Olofson wrote:

You’re running fullscreen mode on svgalib, fbdev or similar…?

Probably fullscreen X11, as we might need to call gnuplot or similar on
occasion to produce summaries.

(Why not a continously updating mode? Looks much cooler… :wink:

The operator needs to change parts in the test apparatus.

…flexible as a dynamically rendered one, which could be scaled and changed
in
other ways without artifacts. Then again, GIMPing or digitizing a fixed image
is a lot easier.

Hmm… I’ll have to ponder this.

You could take some photos of real gauges,

That would be really cool. Good idea. Thanks!

Hi,

I just browsed over there, and it seems like that and
BLT might work well for our purposes. Thanks for
all the help on this matter!

  • Doug> > Have you looked at the FLTK widget set …

http://www.fltk.org/

I also recomend FLTK as a light-weight GUI toolkit. :slight_smile: