Glade Panels with deltaFSD

A successful Glade panel working with deltaFSD requires a large number of elements to be working correctly.

Whilst all of these are standard/default settings and no special software (other than Glade) itself is required, there a a lot of opportunities for something to go wrong.

We suggest that you work through the following notes - they should help highlight where the problems lie (if there are any).

The sample Glade panel code is intended to demonstrate how things fit together. A number of shortcuts have been taken in the interests of keeping things simple. Please email us at the deltaFSD team if you spot any bugs or improvements.

1. Create a new Glade project

Start up Glade and create a new project.

Typical settings for the general project options would be:

     Project Directory: /YourGladeHome/Projects/car
     Project Name: Car
     Program Name: car
     Project File: car.glade

Set the C options to suit your environment. (You don't need Gettext support.)

Leave the project empty.

2. Checkout your empty project

Click the "Build the Source Code" button in Glade.

Close down Glade and go to /YourGladeHome/Projects/car.

Build the empty project:

     autogen.sh
     make

This should produce an executable:

     /YourGladeHome/Projects/car/src/car

This will run but produce no display.

3. Replace the project file

Copy in (overwrite) the Glade project file with the one provided with deltaFSD:

     cp /deltaFSDhome/samples/gladepanel/car.glade /YourGladeHome/Projects/car/car.glade

Restart Glade and select your car project

The main Glade window should now show two windows

Click the "Build the Source Code" button.

Close Glade and copy the sample main.c into the src directory (this will overwrite the autogenerated version):

     cp /deltaFSDhome/samples/gladepanel/main.c /YourGladeHome/Projects/car/src/main.c

Go (back) to /YourGladeHome/Projects/car/ and rebuild the executable:

     make

You should get some warnings but no errors.

Try running the executable:

     src/car

This should produce the message:

     Connection failed

Since there is no deltaFSD server process running for your panel to talk to.

4. Checkout the deltaFSD end

Run deltaFSD.

Select Socket from the "Other functions" menu.

Set 2 inputs and 2 outputs for the function.

Leave the socket number set to the default 6739.

Restart the Glade executable:

     src/car

Your two panel windows should now appear.

If you attach Get functions to the inputs of your Socket function you should be able to change the dial displays in window2.

If you attach Print functions to the outputs of your Socket function you should be able to see the slider and button values from window 1.

(The Up/Down buttons produce only an instantaneous +1, -1 before reverting to 0.)

5. Put everything together

Close everything down and restart deltaFSD.

Read in the car model.

Restart your Glade panel and everything should spring into life.

Giving you something like:

Notes