FGATCDialogNew * FGATCDialogNew::_instance = NULL;
FGATCDialogNew::FGATCDialogNew()
+: _gui(NULL),
+ dialogVisible(true)
{
- dialogVisible = true;
}
FGATCDialogNew::~FGATCDialogNew()
void FGATCDialogNew::init() {
- // Add ATC-dialog to the command list
+ // Add ATC-dialog to the command list
globals->get_commands()->addCommand("ATC-dialog", FGATCDialogNew::popup );
- // Add ATC-freq-search to the command list
- globals->get_commands()->addCommand("ATC-freq-search", doFrequencySearch);
- globals->get_commands()->addCommand("ATC-freq-display", doFrequencyDisplay);
+ // Add ATC-freq-search to the command list
+ globals->get_commands()->addCommand("ATC-freq-search", doFrequencySearch);
+ globals->get_commands()->addCommand("ATC-freq-display", doFrequencyDisplay);
- // initialize properties polled in Update()
- //globals->get_props()->setStringValue("/sim/atc/freq-airport", "");
- globals->get_props()->setIntValue("/sim/atc/transmission-num", -1);
+ // initialize properties polled in Update()
+ //globals->get_props()->setStringValue("/sim/atc/freq-airport", "");
+ globals->get_props()->setIntValue("/sim/atc/transmission-num", -1);
}
_serviceable(true),
_rootNode(rootNode)
{
-
- componentForge["pid-controller"] = new CreateAndConfigureFunctor<PIDController,Component>();
- componentForge["pi-simple-controller"] = new CreateAndConfigureFunctor<PISimpleController,Component>();
- componentForge["predict-simple"] = new CreateAndConfigureFunctor<Predictor,Component>();
- componentForge["filter"] = new CreateAndConfigureFunctor<DigitalFilter,Component>();
- componentForge["logic"] = new CreateAndConfigureFunctor<Logic,Component>();
- componentForge["flipflop"] = new CreateAndConfigureFunctor<FlipFlop,Component>();
+ if (componentForge.empty())
+ {
+ componentForge["pid-controller"] = new CreateAndConfigureFunctor<PIDController,Component>();
+ componentForge["pi-simple-controller"] = new CreateAndConfigureFunctor<PISimpleController,Component>();
+ componentForge["predict-simple"] = new CreateAndConfigureFunctor<Predictor,Component>();
+ componentForge["filter"] = new CreateAndConfigureFunctor<DigitalFilter,Component>();
+ componentForge["logic"] = new CreateAndConfigureFunctor<Logic,Component>();
+ componentForge["flipflop"] = new CreateAndConfigureFunctor<FlipFlop,Component>();
+ }
if( configNode == NULL ) configNode = rootNode;