From 2cda6e708248cd375406a25a5ee86fb79a7246ef Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 4 May 2000 05:10:32 +0000 Subject: [PATCH] ADF tuner fixes so that it goes from 100 to 1299 without decimal steps. The left button moves by 1, and the right button moves by 25. --- src/Cockpit/sp_panel.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Cockpit/sp_panel.cxx b/src/Cockpit/sp_panel.cxx index a1ab6842f..a502b7fc4 100644 --- a/src/Cockpit/sp_panel.cxx +++ b/src/Cockpit/sp_panel.cxx @@ -689,19 +689,19 @@ createADFRadio (int x, int y) inst->addAction(0, SIX_W * 0.7, -SIX_W * 0.07, SIX_W * 0.09, SIX_W * 0.14, new FGAdjustAction(FGBFI::getADFFreq, FGBFI::setADFFreq, - -0.05, 111.0, 999.95, true)); + -1.0, 100.0, 1299, true)); inst->addAction(0, SIX_W * 0.79, -SIX_W * 0.07, SIX_W * 0.09, SIX_W * 0.14, new FGAdjustAction(FGBFI::getADFFreq, FGBFI::setADFFreq, - 0.05, 111.0, 999.95, true)); + 1.0, 100.0, 1299, true)); inst->addAction(1, SIX_W * 0.7, -SIX_W * 0.07, SIX_W * 0.09, SIX_W * 0.14, new FGAdjustAction(FGBFI::getADFFreq, FGBFI::setADFFreq, - -5.0, 111.0, 999.95, true)); + -25.0, 100.0, 1299, true)); inst->addAction(1, SIX_W * 0.79, -SIX_W * 0.07, SIX_W * 0.09, SIX_W * 0.14, new FGAdjustAction(FGBFI::getADFFreq, FGBFI::setADFFreq, - 5.0, 111.0, 999.95, true)); + 25.0, 100.0, 1299, true)); // Layer 0: background FGTexturedLayer * layer = @@ -711,11 +711,11 @@ createADFRadio (int x, int y) // Layer: ADF frequency FGTextLayer * text = new FGTextLayer(SIX_W*2, SIX_W/2); - text->addChunk(new FGTextLayer::Chunk(FGBFI::getADFFreq, "%.2f")); + text->addChunk(new FGTextLayer::Chunk(FGBFI::getADFFreq, "%4.0f")); text->setPointSize(14); text->setColor(1.0, 0.5, 0.0); inst->addLayer(text); - inst->addTransformation(FGInstrumentLayer::XSHIFT, -SIX_W + 12); + inst->addTransformation(FGInstrumentLayer::XSHIFT, -SIX_W + 18); return inst; } -- 2.39.5