Fix incorrectly renamed strings

pull/1/head
Slávek Banko 8 years ago
parent 533b9587fd
commit e8c90f7ea7

@ -83,7 +83,7 @@
<tip category="KStars|Navigation">
<html>
<p>The status bar displays the current sky coordinates of the mouse cursor,
in both Equatorial andQt::Horizontal coordinate systems.
in both Equatorial and Horizontal coordinate systems.
</p>
</html>
</tip>
@ -109,7 +109,7 @@
</tip>
<tip category="KStars|Navigation">
<html>
<p>To switch between Equatorial andQt::Horizontal coordinate
<p>To switch between Equatorial and Horizontal coordinate
systems, use the "View->Coordinates" menu item, or press the spacebar.
</p>
</html>

@ -57,7 +57,7 @@
#include "devicemanager.h"
#include "indistd.h"
LogEdit::LogEdit( TQWidget *parent, const char *name ) : KTextEdit( parent, name )
LogEdit::LogEdit( TQWidget *parent, const char *name ) : KTextEdit( parent, name )
{
setFrameStyle( TQFrame::StyledPanel );
setFrameShadow( TQFrame::Plain );
@ -69,11 +69,11 @@ void LogEdit::focusOutEvent( TQFocusEvent *e ) {
TQWidget::focusOutEvent(e);
}
ClickLabel::ClickLabel( TQWidget *parent, const char *name ) : TQLabel( parent, name )
ClickLabel::ClickLabel( TQWidget *parent, const char *name ) : TQLabel( parent, name )
{}
DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo,
TQWidget *parent, const char *name ) :
DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo,
TQWidget *parent, const char *name ) :
KDialogBase( KDialogBase::Tabbed, i18n( "Object Details" ), Close, Close, parent, name ) ,
selectedObject(o), ksw((KStars*)parent), Data(0), Pos(0), Links(0), Adv(0), Log(0)
{
@ -101,7 +101,7 @@ void DetailDialog::createGeneralTab()
{
TQFrame *DataTab = addPage(i18n("General"));
Data = new DetailsDataUI( DataTab, "general_data_tab" );
//Modify colors
Data->Names->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) );
Data->Names->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::HighlightedText ) );
@ -139,7 +139,7 @@ void DetailDialog::createGeneralTab()
TDEGlobal::locale()->formatNumber( s->mag(), 1 ) ) ); //show to tenths place
//distance
if ( s->distance() > 2000. || s->distance() < 0. ) // parallax < 0.5 mas
if ( s->distance() > 2000. || s->distance() < 0. ) // parallax < 0.5 mas
Data->Distance->setText( TQString(i18n("larger than 2000 parsecs", "> 2000 pc") ) );
else if ( s->distance() > 50.0 ) //show to nearest integer
Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg(
@ -158,18 +158,18 @@ void DetailDialog::createGeneralTab()
if ( s->isMultiple() && s->isVariable() ) {
Data->AngSizeLabel->setText( i18n( "the star is a multiple star", "multiple" ) + "," );
Data->AngSize->setText( i18n( "the star is a variable star", "variable" ) );
} else if ( s->isMultiple() )
} else if ( s->isMultiple() )
Data->AngSizeLabel->setText( i18n( "the star is a multiple star", "multiple" ) );
else if ( s->isVariable() )
else if ( s->isVariable() )
Data->AngSizeLabel->setText( i18n( "the star is a variable star", "variable" ) );
break; //end of stars case
case 9: //asteroids [fall through to planets]
case 10: //comets [fall through to planets]
case 2: //planets (including comets and asteroids)
ps = (KSPlanetBase *)selectedObject;
Data->Names->setText( ps->longname() );
//Type is "G5 star" for Sun
if ( ps->name() == "Sun" )
@ -177,7 +177,7 @@ void DetailDialog::createGeneralTab()
else
Data->Type->setText( ps->typeName() );
Data->Constellation->setText( ps->constellation( ksw->data()->csegmentList,
Data->Constellation->setText( ps->constellation( ksw->data()->csegmentList,
ksw->data()->cnameList ) );
//Magnitude: The moon displays illumination fraction instead
@ -191,20 +191,20 @@ void DetailDialog::createGeneralTab()
//Distance from Earth. The moon requires a unit conversion
if ( ps->name() == "Moon" ) {
Data->Distance->setText( i18n("distance in kilometers", "%1 km").arg(
Data->Distance->setText( i18n("distance in kilometers", "%1 km").arg(
TDEGlobal::locale()->formatNumber( ps->rearth()*AU_KM ) ) );
} else {
Data->Distance->setText( i18n("distance in Astronomical Units", "%1 AU").arg(
Data->Distance->setText( i18n("distance in Astronomical Units", "%1 AU").arg(
TDEGlobal::locale()->formatNumber( ps->rearth() ) ) );
}
//Angular size; moon and sun in arcmin, others in arcsec
if ( ps->angSize() ) {
if ( ps->name() == "Sun" || ps->name() == "Moon" )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
if ( ps->name() == "Sun" || ps->name() == "Moon" )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
TDEGlobal::locale()->formatNumber( ps->angSize() ) ) );
else
Data->AngSize->setText( i18n("angular size in arcseconds", "%1 arcsec").arg(
Data->AngSize->setText( i18n("angular size in arcseconds", "%1 arcsec").arg(
TDEGlobal::locale()->formatNumber( ps->angSize()*60.0 ) ) );
} else {
Data->AngSize->setText( "--" );
@ -236,7 +236,7 @@ void DetailDialog::createGeneralTab()
if ( ! oname.isEmpty() ) oname += ", ";
oname += "PGC " + TQString("%1").arg( dso->pgc() );
}
if ( ! oname.isEmpty() ) pname += ", " + oname;
Data->Names->setText( pname );
@ -252,20 +252,20 @@ void DetailDialog::createGeneralTab()
Data->Distance->setText( "--" );
//Only show decimal place for small angular sizes
if ( dso->a() > 10.0 )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
if ( dso->a() > 10.0 )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
int( dso->a() ) ) );
else if ( dso->a() )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
else if ( dso->a() )
Data->AngSize->setText( i18n("angular size in arcminutes", "%1 arcmin").arg(
TDEGlobal::locale()->formatNumber( dso->a(), 1 ) ) );
else
else
Data->AngSize->setText( "--" );
break;
}
//Common to all types:
Data->Constellation->setText( selectedObject->constellation( ksw->data()->csegmentList,
Data->Constellation->setText( selectedObject->constellation( ksw->data()->csegmentList,
ksw->data()->cnameList ) );
}
@ -307,7 +307,7 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
TQVBoxLayout *vlay = new TQVBoxLayout( PosTab, 0, 0 );
vlay->addWidget( Pos );
//Coordinates Section:
//Don't use TDELocale::formatNumber() for the epoch string,
//because we don't want a thousands-place separator!
@ -335,10 +335,10 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo
//Airmass is approximated as the secant of the zenith distance,
//equivalent to 1./sin(Alt). Beware of Inf at Alt=0!
if ( selectedObject->alt()->Degrees() > 0.0 )
Pos->Airmass->setText( TDEGlobal::locale()->formatNumber(
if ( selectedObject->alt()->Degrees() > 0.0 )
Pos->Airmass->setText( TDEGlobal::locale()->formatNumber(
1./sin( selectedObject->alt()->radians() ), 2 ) );
else
else
Pos->Airmass->setText( "--" );
//Rise/Set/Transit Section:
@ -447,10 +447,10 @@ void DetailDialog::createAdvancedTab()
{
// Don't create an adv tab for an unnamed star or if advinterface file failed loading
// We also don't need adv dialog for solar system objects.
if (selectedObject->name() == TQString("star") ||
ksw->data()->ADVtreeList.isEmpty() ||
selectedObject->type() == SkyObject::PLANET ||
selectedObject->type() == SkyObject::COMET ||
if (selectedObject->name() == TQString("star") ||
ksw->data()->ADVtreeList.isEmpty() ||
selectedObject->type() == SkyObject::PLANET ||
selectedObject->type() == SkyObject::COMET ||
selectedObject->type() == SkyObject::ASTEROID )
return;
@ -507,7 +507,7 @@ void DetailDialog::viewLink()
{
TQString URL;
if ( Links->InfoList->currentItem() != -1 &&
if ( Links->InfoList->currentItem() != -1 &&
Links->InfoList->isSelected( Links->InfoList->currentItem() ) )
URL = TQString( *selectedObject->InfoList.at( Links->InfoList->currentItem() ) );
else if ( Links->ImagesList->currentItem() != -1 )
@ -521,11 +521,11 @@ void DetailDialog::updateLists()
{
Links->InfoList->clear();
Links->ImagesList->clear();
TQStringList::Iterator itList = selectedObject->InfoList.begin();
TQStringList::Iterator itTitle = selectedObject->InfoTitle.begin();
TQStringList::Iterator itListEnd = selectedObject->InfoList.end();
for ( ; itList != itListEnd; ++itList ) {
Links->InfoList->insertItem(TQString(*itTitle));
itTitle++;
@ -548,10 +548,10 @@ void DetailDialog::editLinkDialog()
uint i;
TQString defaultURL , entry;
TQFile newFile;
KDialogBase editDialog(KDialogBase::Plain, i18n("Edit Link"), Ok|Cancel, Ok , this, "editlink", false);
TQFrame *editFrame = editDialog.plainPage();
editLinkURL = new TQLabel(i18n("URL:"), editFrame);
editLinkField = new TQLineEdit(editFrame, "lineedit");
editLinkField->setMinimumWidth(300);
@ -559,9 +559,9 @@ void DetailDialog::editLinkDialog()
editLinkLayout = new TQHBoxLayout(editFrame, 6, 6, "editlinklayout");
editLinkLayout->addWidget(editLinkURL);
editLinkLayout->addWidget(editLinkField);
currentItemIndex = Links->InfoList->currentItem();
if (currentItemIndex != -1 && Links->InfoList->isSelected(currentItemIndex))
{
defaultURL = *selectedObject->InfoList.at(currentItemIndex);
@ -590,8 +590,8 @@ void DetailDialog::editLinkDialog()
entry = selectedObject->name() + ":" + currentItemTitle + ":" + currentItemURL;
//FIXME: usage of verifyUserData() is pretty unclear
//verifyUserData() returns false if currentItemTitle/currentItemURL
//are not found in the user's list already. If they are, then that
//verifyUserData() returns false if currentItemTitle/currentItemURL
//are not found in the user's list already. If they are, then that
//item is removed.
switch (type)
{
@ -641,9 +641,9 @@ void DetailDialog::removeLinkDialog()
uint i;
TQString defaultURL, entry;
TQFile newFile;
currentItemIndex = Links->InfoList->currentItem();
if (currentItemIndex != -1 && Links->InfoList->isSelected(currentItemIndex))
{
defaultURL = *selectedObject->InfoList.at(currentItemIndex);
@ -697,7 +697,7 @@ bool DetailDialog::verifyUserData(int type)
TQString line, name, sub, title;
bool ObjectFound = false;
uint i;
switch (type)
{
case 0:
@ -766,7 +766,7 @@ bool DetailDialog::readUserFile(int type)//, int sourceFileType)
TQTextStream stream(&file);
dataList.clear();
// read all data into memory
while (!stream.eof())
dataList.append(stream.readLine());
@ -844,7 +844,7 @@ TQString DetailDialog::parseADVData(TQString link)
{
TQString subLink;
int index;
if ( (index = link.find("KSOBJ")) != -1)
{
link.remove(index, 5);
@ -904,13 +904,13 @@ void DetailDialog::centerTelescope()
bool useJ2000( false);
int selectedCoord(0);
SkyPoint sp;
// Find the first device with EQUATORIAL_EOD_COORD or EQUATORIAL_COORD and with SLEW element
// i.e. the first telescope we find!
INDIMenu *imenu = ksw->getINDIMenu();
for (unsigned int i=0; i < imenu->mgr.count() ; i++)
{
for (unsigned int j=0; j < imenu->mgr.at(i)->indi_dev.count(); j++)
@ -935,7 +935,7 @@ void DetailDialog::centerTelescope()
ConnectEle = indidev->findElem("CONNECT");
if (!ConnectEle) continue;
if (ConnectEle->state == PS_OFF)
{
KMessageBox::error(0, i18n("Telescope %1 is offline. Please connect and retry again.").arg(indidev->label));
@ -953,7 +953,7 @@ void DetailDialog::centerTelescope()
if (!DecEle) continue;
break;
//Qt::Horizontal
// Horizontal
case 1:
if (prop->perm == PP_RO) continue;
AzEle = prop->findElement("AZ");
@ -962,10 +962,10 @@ void DetailDialog::centerTelescope()
if (!AltEle) continue;
break;
}
onset = indidev->findProp("ON_COORD_SET");
if (!onset) continue;
onset->activateSwitch("SLEW");
indidev->stdDev->currentObject = selectedObject;
@ -1016,19 +1016,19 @@ void DetailDialog::centerTelescope()
}
prop->newText();
return;
}
}
// We didn't find any telescopes
KMessageBox::sorry(0, i18n("KStars did not find any active telescopes."));
}
void DetailDialog::showThumbnail() {
//No image if object is a star
if ( selectedObject->type() == SkyObject::STAR ||
if ( selectedObject->type() == SkyObject::STAR ||
selectedObject->type() == SkyObject::CATALOG_STAR ) {
Thumbnail->resize( Data->Image->width(), Data->Image->height() );
Thumbnail->fill( Data->paletteBackgroundColor() );
@ -1057,9 +1057,9 @@ void DetailDialog::showThumbnail() {
void DetailDialog::updateThumbnail() {
ThumbnailPicker tp( selectedObject, *Thumbnail, this, "thumbnaileditor" );
if ( tp.exec() == TQDialog::Accepted ) {
TQString fname = locateLocal( "appdata", "thumb-"
TQString fname = locateLocal( "appdata", "thumb-"
+ selectedObject->name().lower().replace( TQRegExp(" "), "" ) + ".png" );
Data->Image->setPixmap( *(tp.image()) );

@ -33,7 +33,7 @@ bool CApnCamera::Expose( double Duration, bool Light )
ULONG ExpTime;
unsigned short BitsPerPixel(0);
unsigned short UnbinnedRoiX;
unsigned short UnbinnedRoiY;
unsigned short UnbinnedRoiY;
unsigned short PreRoiSkip, PostRoiSkip;
unsigned short PreRoiRows, PostRoiRows;
unsigned short PreRoiVBinning, PostRoiVBinning;
@ -61,7 +61,7 @@ bool CApnCamera::Expose( double Duration, bool Light )
PostRoiSkip = m_ApnSensorInfo->m_TotalColumns -
m_ApnSensorInfo->m_ClampColumns -
PreRoiSkip -
PreRoiSkip -
UnbinnedRoiX;
TotalHPixels = UnbinnedRoiX + PreRoiSkip + PostRoiSkip + m_ApnSensorInfo->m_ClampColumns;
@ -71,9 +71,9 @@ bool CApnCamera::Expose( double Duration, bool Light )
UnbinnedRoiY = m_RoiPixelsV * m_RoiBinningV;
PreRoiRows = m_ApnSensorInfo->m_UnderscanRows +
PreRoiRows = m_ApnSensorInfo->m_UnderscanRows +
m_RoiStartY;
PostRoiRows = m_ApnSensorInfo->m_TotalRows -
PreRoiRows -
UnbinnedRoiY;
@ -133,14 +133,14 @@ bool CApnCamera::Expose( double Duration, bool Light )
{
PreRoiVBinning += PreRoiRows;
PostRoiVBinning = PostRoiRows;
PreRoiVBinning |= FPGA_BIT_ARRAY_FASTDUMP;
PostRoiVBinning |= FPGA_BIT_ARRAY_FASTDUMP;
PreRoiRows = 1;
PostRoiRows = 1;
}
// Issue the reset
RoiRegBuffer[0] = FPGA_REG_COMMAND_B;
@ -151,7 +151,7 @@ bool CApnCamera::Expose( double Duration, bool Light )
RoiRegData[1] = PreRoiSkip;
RoiRegBuffer[2] = FPGA_REG_ROI_COUNT;
// Number of ROI pixels. Adjust the 12bit operation here to account for an extra
// Number of ROI pixels. Adjust the 12bit operation here to account for an extra
// 10 pixel shift as a result of the A/D conversion.
if ( m_DataBits == Apn_Resolution_SixteenBit )
{
@ -282,7 +282,7 @@ bool CApnCamera::StopExposure( bool DigitizeData )
return true;
}
unsigned short CApnCamera::GetExposurePixelsH()
{
@ -365,10 +365,10 @@ void CApnCamera::write_ForceShutterOpen( bool ForceShutterOpen )
{
unsigned short RegVal;
Read( FPGA_REG_OP_A, RegVal );
if ( ForceShutterOpen )
RegVal |= FPGA_BIT_FORCE_SHUTTER;
else
else
RegVal &= ~FPGA_BIT_FORCE_SHUTTER;
Write( FPGA_REG_OP_A, RegVal );
@ -492,7 +492,7 @@ void CApnCamera::write_CameraMode( Apn_CameraMode CameraMode )
Write( FPGA_REG_OP_A, RegVal );
break;
}
switch ( CameraMode )
{
case Apn_CameraMode_Normal:
@ -525,7 +525,7 @@ void CApnCamera::write_DataBits( Apn_Resolution BitResolution )
if ( m_CameraInterface == Apn_Interface_NET )
{
// The network interface is 16bpp only. Changing the resolution
// The network interface is 16bpp only. Changing the resolution
// for network cameras has no effect.
return;
}
@ -537,7 +537,7 @@ void CApnCamera::write_DataBits( Apn_Resolution BitResolution )
// Change bit setting after the reset
Read( FPGA_REG_OP_A, RegVal );
if ( BitResolution == Apn_Resolution_TwelveBit )
RegVal |= FPGA_BIT_DIGITIZATION_RES;
@ -547,7 +547,7 @@ void CApnCamera::write_DataBits( Apn_Resolution BitResolution )
Write( FPGA_REG_OP_A, RegVal );
m_DataBits = BitResolution;
LoadClampPattern();
LoadSkipPattern();
LoadRoiPattern( m_RoiBinningH );
@ -578,16 +578,16 @@ Apn_Status CApnCamera::read_ImagingStatus()
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_IMAGING_ACTIVE) != 0 )
Active = true;
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_IMAGE_EXPOSING) != 0 )
Exposing = true;
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_IMAGE_DONE) != 0 )
Done = true;
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_FLUSHING) != 0 )
Flushing = true;
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_WAITING_TRIGGER) != 0 )
WaitOnTrigger = true;
@ -714,7 +714,7 @@ Apn_LedState CApnCamera::read_LedState( unsigned short LedId )
if ( LedId == 0 ) // LED A
RetVal = m_pvtLedStateA;
if ( LedId == 1 ) // LED B
RetVal = m_pvtLedStateB;
@ -779,7 +779,7 @@ Apn_CoolerStatus CApnCamera::read_CoolerStatus()
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_TEMP_AT_TEMP) != 0 )
CoolerAtTemp = true;
if ( (m_pvtStatusReg & FPGA_BIT_STATUS_TEMP_ACTIVE) != 0 )
CoolerActive = true;
@ -816,7 +816,7 @@ double CApnCamera::read_CoolerSetPoint()
double TempVal;
Read( FPGA_REG_TEMP_DESIRED, RegVal );
RegVal &= 0x0FFF;
TempVal = ( RegVal - APN_TEMP_SETPOINT_ZERO_POINT ) * APN_TEMP_DEGREES_PER_BIT;
@ -828,7 +828,7 @@ void CApnCamera::write_CoolerSetPoint( double SetPoint )
{
unsigned short RegVal;
double TempVal;
TempVal = SetPoint;
@ -839,7 +839,7 @@ void CApnCamera::write_CoolerSetPoint( double SetPoint )
TempVal = APN_TEMP_SETPOINT_MAX;
RegVal = (unsigned short)( (TempVal / APN_TEMP_DEGREES_PER_BIT) + APN_TEMP_SETPOINT_ZERO_POINT );
Write( FPGA_REG_TEMP_DESIRED, RegVal );
}
@ -852,7 +852,7 @@ void CApnCamera::write_CoolerBackoffPoint( double BackoffPoint )
{
unsigned short RegVal;
double TempVal;
TempVal = BackoffPoint;
// BackoffPoint must be a positive number!
@ -868,7 +868,7 @@ void CApnCamera::write_CoolerBackoffPoint( double BackoffPoint )
m_pvtCoolerBackoffPoint = TempVal;
RegVal = (unsigned short)( TempVal / APN_TEMP_DEGREES_PER_BIT );
Write( FPGA_REG_TEMP_BACKOFF, RegVal );
}
@ -902,7 +902,7 @@ double CApnCamera::read_TempCCD()
TempAvg = (unsigned short)(TempTotal / don);
m_pvtCurrentCcdTemp = ( (TempAvg - APN_TEMP_SETPOINT_ZERO_POINT)
m_pvtCurrentCcdTemp = ( (TempAvg - APN_TEMP_SETPOINT_ZERO_POINT)
* APN_TEMP_DEGREES_PER_BIT );
return m_pvtCurrentCcdTemp;
@ -931,7 +931,7 @@ double CApnCamera::read_TempHeatsink()
TempAvg = (unsigned short)(TempTotal / don);
m_pvtCurrentHeatsinkTemp = ( (TempAvg - APN_TEMP_HEATSINK_ZERO_POINT)
m_pvtCurrentHeatsinkTemp = ( (TempAvg - APN_TEMP_HEATSINK_ZERO_POINT)
* APN_TEMP_DEGREES_PER_BIT );
return m_pvtCurrentHeatsinkTemp;
@ -957,11 +957,11 @@ void CApnCamera::write_FanMode( Apn_FanMode FanMode )
OpRegA |= FPGA_BIT_TEMP_SUSPEND;
Write( FPGA_REG_OP_A, OpRegA );
do
{
do
{
Read( FPGA_REG_GENERAL_STATUS, RegVal );
} while ( (RegVal & FPGA_BIT_STATUS_TEMP_SUSPEND_ACK) == 0 );
}
switch ( FanMode )
@ -1006,7 +1006,7 @@ double CApnCamera::read_ShutterStrobePosition()
void CApnCamera::write_ShutterStrobePosition( double Position )
{
unsigned short RegVal;
if ( Position < APN_STROBE_POSITION_MIN )
Position = APN_STROBE_POSITION_MIN;
@ -1032,7 +1032,7 @@ void CApnCamera::write_ShutterStrobePeriod( double Period )
RegVal = (unsigned short)((Period - APN_STROBE_PERIOD_MIN) / APN_PERIOD_TIMER_RESOLUTION);
Write( FPGA_REG_SHUTTER_STROBE_PERIOD, RegVal );
m_pvtShutterStrobePeriod = Period;
}
@ -1060,7 +1060,7 @@ bool CApnCamera::read_VariableSequenceDelay()
unsigned short RegVal;
Read( FPGA_REG_OP_A, RegVal );
// variable delay occurs when the bit is 0
return ( (RegVal & FPGA_BIT_DELAY_MODE) == 0 );
return ( (RegVal & FPGA_BIT_DELAY_MODE) == 0 );
}
void CApnCamera::write_VariableSequenceDelay( bool VariableSequenceDelay )
@ -1088,7 +1088,7 @@ void CApnCamera::write_ImageCount( unsigned short Count )
Count = 1;
Write( FPGA_REG_IMAGE_COUNT, Count );
m_pvtImageCount = Count;
}
@ -1182,7 +1182,7 @@ void CApnCamera::write_TDIRate( double TdiRate )
if ( TdiRate < APN_TDI_RATE_MIN )
TdiRate = APN_TDI_RATE_MIN;
if ( TdiRate > APN_TDI_RATE_MAX )
TdiRate = APN_TDI_RATE_MAX;
@ -1289,15 +1289,15 @@ void CApnCamera::write_TestLedBrightness( double TestLedBrightness )
OpRegA |= FPGA_BIT_TEMP_SUSPEND;
Write( FPGA_REG_OP_A, OpRegA );
do
{
do
{
Read( FPGA_REG_GENERAL_STATUS, RegVal );
} while ( (RegVal & FPGA_BIT_STATUS_TEMP_SUSPEND_ACK) == 0 );
}
RegVal = (unsigned short)( (double)FPGA_MASK_LED_ILLUMINATION * (TestLedBrightness/100.0) );
Write( FPGA_REG_LED_DRIVE, RegVal );
Read( FPGA_REG_OP_B, RegVal );
@ -1332,7 +1332,7 @@ long CApnCamera::LoadVerticalPattern()
RegData |= FPGA_BIT_VRAM_ENABLE;
Write( FPGA_REG_OP_B, RegData );
WriteMultiSRMD( FPGA_REG_VRAM_INPUT,
WriteMultiSRMD( FPGA_REG_VRAM_INPUT,
m_ApnSensorInfo->m_VerticalPattern.PatternData,
m_ApnSensorInfo->m_VerticalPattern.NumElements );
@ -1356,14 +1356,14 @@ long CApnCamera::LoadClampPattern()
if ( m_DataBits == Apn_Resolution_SixteenBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_ClampPatternSixteen,
FPGA_REG_HCLAMP_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_ClampPatternSixteen,
FPGA_REG_HCLAMP_INPUT,
1 );
}
else if ( m_DataBits == Apn_Resolution_TwelveBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_ClampPatternTwelve,
FPGA_REG_HCLAMP_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_ClampPatternTwelve,
FPGA_REG_HCLAMP_INPUT,
1 );
}
@ -1387,14 +1387,14 @@ long CApnCamera::LoadSkipPattern()
if ( m_DataBits == Apn_Resolution_SixteenBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_SkipPatternSixteen,
FPGA_REG_HSKIP_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_SkipPatternSixteen,
FPGA_REG_HSKIP_INPUT,
1 );
}
else if ( m_DataBits == Apn_Resolution_TwelveBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_SkipPatternTwelve,
FPGA_REG_HSKIP_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_SkipPatternTwelve,
FPGA_REG_HSKIP_INPUT,
1 );
}
@ -1418,14 +1418,14 @@ long CApnCamera::LoadRoiPattern( unsigned short binning )
if ( m_DataBits == Apn_Resolution_SixteenBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_RoiPatternSixteen,
FPGA_REG_HRAM_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_RoiPatternSixteen,
FPGA_REG_HRAM_INPUT,
binning );
}
else if ( m_DataBits == Apn_Resolution_TwelveBit )
{
WriteHorizontalPattern( &m_ApnSensorInfo->m_RoiPatternTwelve,
FPGA_REG_HRAM_INPUT,
WriteHorizontalPattern( &m_ApnSensorInfo->m_RoiPatternTwelve,
FPGA_REG_HRAM_INPUT,
binning );
}
@ -1438,8 +1438,8 @@ long CApnCamera::LoadRoiPattern( unsigned short binning )
}
long CApnCamera::WriteHorizontalPattern( APN_HPATTERN_FILE *Pattern,
unsigned short RamReg,
long CApnCamera::WriteHorizontalPattern( APN_HPATTERN_FILE *Pattern,
unsigned short RamReg,
unsigned short Binning )
{
unsigned short i;
@ -1463,7 +1463,7 @@ long CApnCamera::WriteHorizontalPattern( APN_HPATTERN_FILE *Pattern,
DataArray[Index] = Pattern->RefPatternData[i];
Index++;
}
for ( i=0; i<Pattern->BinNumElements[BinNumber]; i++ )
{
DataArray[Index] = Pattern->BinPatternData[BinNumber][i];
@ -1493,8 +1493,8 @@ long CApnCamera::InitDefaults()
unsigned short PreRoiRows, PostRoiRows;
unsigned short PreRoiVBinning, PostRoiVBinning;
unsigned short UnbinnedRoiY; //Qt::Vertical ROI pixels
unsigned short UnbinnedRoiY; // Vertical ROI pixels
// Read the Camera ID register
Read( FPGA_REG_CAMERA_ID, CameraID );
@ -1640,7 +1640,7 @@ long CApnCamera::InitDefaults()
// printf("ReportedGainTwelveBit = %lf\n",m_ApnSensorInfo->m_ReportedGainTwelveBit);
printf("ReportedGainSixteenBit = %lf\n",m_ApnSensorInfo->m_ReportedGainSixteenBit);
printf("MinSuggestedExpTime = %lf\n",m_ApnSensorInfo->m_MinSuggestedExpTime);
printf("CoolingSupported = %u\n",m_ApnSensorInfo->m_CoolingSupported);
printf("CoolingSupported = %u\n",m_ApnSensorInfo->m_CoolingSupported);
printf("RegulatedCoolingSupported = %u\n",m_ApnSensorInfo->m_RegulatedCoolingSupported);
printf("TempSetPoint = %lf\n",m_ApnSensorInfo->m_TempSetPoint);
// printf("TempRegRate = %u\n",m_ApnSensorInfo->m_TempRegRate);
@ -1675,21 +1675,21 @@ long CApnCamera::InitDefaults()
LoadRoiPattern( m_RoiBinningH );
// Program default camera settings
Write( FPGA_REG_CLAMP_COUNT, m_ApnSensorInfo->m_ClampColumns );
Write( FPGA_REG_PREROI_SKIP_COUNT, m_ApnSensorInfo->m_PreRoiSkipColumns );
Write( FPGA_REG_ROI_COUNT, m_ApnSensorInfo->m_ImagingColumns );
Write( FPGA_REG_CLAMP_COUNT, m_ApnSensorInfo->m_ClampColumns );
Write( FPGA_REG_PREROI_SKIP_COUNT, m_ApnSensorInfo->m_PreRoiSkipColumns );
Write( FPGA_REG_ROI_COUNT, m_ApnSensorInfo->m_ImagingColumns );
Write( FPGA_REG_POSTROI_SKIP_COUNT, m_ApnSensorInfo->m_PostRoiSkipColumns +
m_ApnSensorInfo->m_OverscanColumns );
m_ApnSensorInfo->m_OverscanColumns );
// Since the default state of m_DigitizeOverscan is false, set the count to zero.
Write( FPGA_REG_OVERSCAN_COUNT, 0x0 );
Write( FPGA_REG_OVERSCAN_COUNT, 0x0 );
// Now calculate the vertical settings
UnbinnedRoiY = m_RoiPixelsV * m_RoiBinningV;
PreRoiRows = m_ApnSensorInfo->m_UnderscanRows +
PreRoiRows = m_ApnSensorInfo->m_UnderscanRows +
m_RoiStartY;
PostRoiRows = m_ApnSensorInfo->m_TotalRows -
PreRoiRows -
UnbinnedRoiY;
@ -1714,14 +1714,14 @@ long CApnCamera::InitDefaults()
}
// Program the vertical settings
Write( FPGA_REG_A1_ROW_COUNT, PreRoiRows );
Write( FPGA_REG_A1_ROW_COUNT, PreRoiRows );
Write( FPGA_REG_A1_VBINNING, PreRoiVBinning );
Write( FPGA_REG_A2_ROW_COUNT, m_RoiPixelsV );
Write( FPGA_REG_A2_VBINNING, (m_RoiBinningV | FPGA_BIT_ARRAY_DIGITIZE) );
Write( FPGA_REG_A3_ROW_COUNT, PostRoiRows );
Write( FPGA_REG_A3_VBINNING, PostRoiVBinning );
Write( FPGA_REG_A2_ROW_COUNT, m_RoiPixelsV );
Write( FPGA_REG_A2_VBINNING, (m_RoiBinningV | FPGA_BIT_ARRAY_DIGITIZE) );
Write( FPGA_REG_A3_ROW_COUNT, PostRoiRows );
Write( FPGA_REG_A3_VBINNING, PostRoiVBinning );
Write( FPGA_REG_VFLUSH_BINNING, m_ApnSensorInfo->m_VFlushBinning );
@ -1738,8 +1738,8 @@ long CApnCamera::InitDefaults()
{
Read( FPGA_REG_OP_A, RegVal );
RegVal |= FPGA_BIT_DISABLE_H_CLK;
RegVal |= FPGA_BIT_DISABLE_H_CLK;
Write( FPGA_REG_OP_A, RegVal );
}
@ -1765,7 +1765,7 @@ long CApnCamera::InitDefaults()
write_FanMode( Apn_FanMode_Medium );
// Initialize the LED states and the LED mode. There is nothing to output
// to the device since we issued our CLEAR early in the init() process, and
// to the device since we issued our CLEAR early in the init() process, and
// we are now in a known state.
m_pvtLedStateA = Apn_LedState_Expose;
m_pvtLedStateB = Apn_LedState_Expose;
@ -1790,7 +1790,7 @@ long CApnCamera::InitDefaults()
m_pvtImageInProgress = false;
m_pvtImageReady = false;
return 0;
}
@ -1840,9 +1840,9 @@ void CApnCamera::UpdateGeneralStatus()
// Read the general status register of the device
QueryStatusRegs( StatusReg,
HeatsinkTempReg,
CcdTempReg,
QueryStatusRegs( StatusReg,
HeatsinkTempReg,
CcdTempReg,
CoolerDriveReg,
VoltageReg,
TdiCounterReg,
@ -1859,13 +1859,13 @@ void CApnCamera::UpdateGeneralStatus()
m_pvtCoolerDrive = 100.0;
else
m_pvtCoolerDrive = ( (double)(CoolerDriveReg - 600) / 2600.0 ) * 100.0;
m_pvtCurrentCcdTemp = ( (CcdTempReg - APN_TEMP_SETPOINT_ZERO_POINT)
m_pvtCurrentCcdTemp = ( (CcdTempReg - APN_TEMP_SETPOINT_ZERO_POINT)
* APN_TEMP_DEGREES_PER_BIT );
m_pvtCurrentHeatsinkTemp = ( (HeatsinkTempReg - APN_TEMP_HEATSINK_ZERO_POINT)
m_pvtCurrentHeatsinkTemp = ( (HeatsinkTempReg - APN_TEMP_HEATSINK_ZERO_POINT)
* APN_TEMP_DEGREES_PER_BIT );
m_pvtInputVoltage = VoltageReg * APN_VOLTAGE_RESOLUTION;
// Update ShutterState

@ -157,7 +157,7 @@ public:
long ReadLine( long SkipPixels, long Pixels, unsigned short* pLineBuffer );
long Write( unsigned short reg, unsigned short val );
long Read( unsigned short reg, unsigned short& val );
////////////////////////////////////////////////////////////
// Camera Settings
@ -173,27 +173,27 @@ public:
// 7: image ready
bool read_Present(); // True if camera is present, false otherwise.
bool read_Shutter(); // Current shutter state, true = open, false = closed.
void write_Shutter( bool val );
bool read_ForceShutterOpen(); // True: Forces shutter permanently open. False: allows
void write_ForceShutterOpen( bool val ); // normal shutter operation.
bool read_LongCable(); // Long cable mode.
void write_LongCable( bool val );
void write_LongCable( bool val );
short read_Mode(); // First four bits map to Mode bits used for
void write_Mode( short val ); // special functions or camera configurations.
short read_TestBits(); // First four bits to Test bits used for
void write_TestBits( short val ); // troubleshooting.
short read_Test2Bits(); // First four bits map to Test2 bits used for
void write_Test2Bits( short val ); // special functions or camera configurations.
bool read_FastReadout(); // Fast readout mode (used for focusing).
void write_FastReadout( bool val ); // True means fast focus is on
void write_FastReadout( bool val ); // True means fast focus is on
bool read_UseTrigger(); // Triggered exposure mode.
void write_UseTrigger( bool val ); // True means triggered exposure is on.
@ -201,15 +201,15 @@ public:
bool m_HighPriority; // Bost thread priority level during download
short m_PPRepeat; // Delay used on parallel port systems.
short m_DataBits; // Digitization resolution, 8 - 18.
bool m_FastShutter; // Capable of 0.001 sec exposure resolution
bool m_GuiderRelays; // Capable of outputing autoguider signals
short m_MaxBinX, m_MaxBinY; // Maximum binning factors
short m_MaxBinX, m_MaxBinY; // Maximum binning factors
double m_MaxExposure; // Maximum exposure length
double m_MinExposure; // Minimum exposure length
@ -219,7 +219,7 @@ public:
// Cooler Settings
// N.B. DAC units = ( m_TempScale * CoolerSetPoint (deg. C ) ) + m_TempCalibration;
// N.B. Temperature (deg. C) = (DAC units - m_TempCalibration) / m_TempScale
double read_CoolerSetPoint(); // Returns/sets setpoint temperature in degrees
void write_CoolerSetPoint( double val ); // Celcius.
@ -229,7 +229,7 @@ public:
void write_CoolerMode( Camera_CoolerMode val );
double read_Temperature(); // Current temperature in degrees Celcius.
bool m_TempControl; // Temperature can be externally controlled
short m_TempCalibration; // Temperature calibration factor.
double m_TempScale; // Temperature scaling factor.
@ -238,20 +238,20 @@ public:
// Exposure Settings
// The following variables are latched in Expose method, until next Reset or GetImage
short m_BinX, m_BinY; //Qt::Horizontal and vertical binning.
short m_BinX, m_BinY; // Horizontal and vertical binning.
short m_StartX, m_StartY; // Zero based subframe start position in unbinned pixels.
short m_NumX, m_NumY; // Subframe size in binned pixels.
////////////////////////////////////////////////////////////
// Geometry Settings
// The following variables are latched in Expose method, until next Reset or GetImage
short m_Columns, m_Rows; // Total columns/rows on CCD (physical).
short m_ImgColumns, m_ImgRows; // Unbinned columns/rows in imaging area
short m_SkipC, m_SkipR; // Deleted data columns/rows not to be displayed or saved
short m_HFlush, m_VFlush; //Qt::Horizontal/Vertical flush binning.
short m_HFlush, m_VFlush; // Horizontal/Vertical flush binning.
short m_BIC, m_BIR; // Before Image Column/Row count (dark non-imaging pixels).
////////////////////////////////////////////////////////////
// CCD Settings
@ -291,7 +291,7 @@ public:
// Move the filterwheel to the home position - failure indicates no filterwheel
//attached or broken filterwheel
bool FilterHome();
// Move filterwheel to the given slot
void FilterSet( short Slot );
@ -341,7 +341,7 @@ public:
bool m_WaitingforLine; // camera is clocking and digitizing a row of data
short m_RegisterOffset; // Offset from base address used in parallel port systems.
short m_FilterPosition; // Current filter position
short m_FilterStepPos; // Current filter position in our internal array
@ -350,9 +350,9 @@ public:
Camera_Interface m_Interface; // String acronyms may be used in INI file.
// 0 or ISA: Industry Standard Architecture bus
// 1 or PPI: Parallel Port Interface
// 1 or PPI: Parallel Port Interface
// 2 or PCI: Peripheral Component Interface
Camera_SensorType m_SensorType; // 0 or CCD: Charge Coupled Device
// 1 or CMOS: Complementary Metal-Oxide-Silicon
@ -367,12 +367,12 @@ public:
// 7: At set point
// Latched public variables used during Exposure..GetImage sequence
short m_ExposureBinX, m_ExposureBinY; //Qt::Horizontal and vertical binning.
short m_ExposureBinX, m_ExposureBinY; // Horizontal and vertical binning.
short m_ExposureStartX, m_ExposureStartY; // Subframe start position in unbinned pixels.
short m_ExposureNumX, m_ExposureNumY; // Subframe size in binned pixels.
short m_ExposureColumns, m_ExposureRows; // Total columns/rows on CCD (physical).
short m_ExposureSkipC, m_ExposureSkipR; // Deleted data columns/rows not to be displayed or saved to disk.
short m_ExposureHFlush, m_ExposureVFlush; //Qt::Horizontal/Vertical flush binning.
short m_ExposureHFlush, m_ExposureVFlush; // Horizontal/Vertical flush binning.
short m_ExposureBIC, m_ExposureBIR; // Before Image Column/Row count (dark non-imaging pixels).
unsigned short m_ExposureAIC; // Calculated After Image Column count (dark non-imaging pixels).
unsigned short m_ExposureRemainingLines; // Number of lines to be clocked out by GetImage
@ -381,17 +381,17 @@ public:
////////////////////////////////////////////////////////////
// Write register shadow variables
unsigned short m_RegShadow[ NumWriteRegisters ];
unsigned short m_FastShutterBits_Mode; // Mask to enable fast shutter mode
unsigned short m_FastShutterBits_Test; // Mask to enable fast shutter mode
////////////////////////////////////////////////////////////
// Internal helper routines
void LoadLineCounter( unsigned short rows );
void LoadColumnLayout( unsigned short aic, unsigned short bic, unsigned short pixels );
void LoadTimerAndBinning( double Duration, unsigned short HBin, unsigned short VBin );
void StartFlushing();
void StopFlushing();
@ -408,7 +408,7 @@ private:
#ifdef WITHPPI
inline void RegisterSelect( unsigned short reg );
inline unsigned short INPW();
inline void OUTPW( unsigned short val );
inline void OUTPW( unsigned short val );
#endif
};

@ -554,7 +554,7 @@ LIBFLIAPI FLISetImageArea(flidev_t dev, long ul_x, long ul_y,
@param dev Camera to set horizontal bin factor of.
@param hbinQt::Horizontal bin factor.
@param hbin Horizontal bin factor.
@return Zero on success.
@return Non-zero on failure.
@ -577,7 +577,7 @@ LIBFLIAPI FLISetHBin(flidev_t dev, long hbin)
@param dev Camera to set vertical bin factor of.
@param vbinQt::Vertical bin factor.
@param vbin Vertical bin factor.
@return Zero on success.
@return Non-zero on failure.

File diff suppressed because it is too large Load Diff

@ -17,7 +17,7 @@
2003-08-09 Initial support for non-sidereal tracking
2004-01-15 redesigning the GUI to support INDI v1.2 and fix previous GUI bugs
and problems. The new GUI can easily incoperate extensions to the INDI
protocol as required.
protocol as required.
*/
@ -80,31 +80,31 @@
#define NINDI_STD 26
/* INDI standard property used across all clients to enable interoperability. */
const char * indi_std[NINDI_STD] =
const char * indi_std[NINDI_STD] =
{"CONNECTION", "DEVICE_PORT", "TIME", "SDTIME", "GEOGRAPHIC_COORD", "EQUATORIAL_COORD", "EQUATORIAL_EOD_COORD", "HORIZONTAL_COORD", "ABORT_MOTION", "ON_COORD_SET", "SOLAR_SYSTEM", "MOVEMENT", "PARK", "CCD_EXPOSE_DURATION", "CCD_TEMPERATURE", "CCD_FRAME", "CCD_FRAME_TYPE", "CCD_BINNING", "CCD_INFO", "CCDPREVIEW_STREAM", "CCDPREVIEW_CTRL", "VIDEO_STREAM", "FOCUS_SPEED", "FOCUS_MOTION", "FOCUS_TIMER", "FILTER_SLOT" };
/*******************************************************************
** INDI Device: The work-horse. Responsible for handling its
** child properties and managing signal and changes.
*******************************************************************/
INDI_D::INDI_D(INDIMenu *menuParent, DeviceManager *parentManager, TQString inName, TQString inLabel)
INDI_D::INDI_D(INDIMenu *menuParent, DeviceManager *parentManager, TQString inName, TQString inLabel)
{
name = inName;
label = inLabel;
parent = menuParent;
parentMgr = parentManager;
gl.setAutoDelete(true);
deviceVBox = menuParent->addVBoxPage(inLabel);
groupContainer = new TQTabWidget(deviceVBox);
msgST_w = new TQTextEdit(deviceVBox);
msgST_w->setReadOnly(true);
msgST_w->setMaximumHeight(100);
dataBuffer = (unsigned char *) malloc (1);
stdDev = new INDIStdDevice(this, parent->ksw);
curGroup = NULL;
@ -126,12 +126,12 @@ INDI_D::~INDI_D()
void INDI_D::registerProperty(INDI_P *pp)
{
if (isINDIStd(pp))
pp->pg->dp->INDIStdSupport = true;
stdDev->registerProperty(pp);
}
bool INDI_D::isINDIStd(INDI_P *pp)
@ -142,11 +142,11 @@ bool INDI_D::isINDIStd(INDI_P *pp)
pp->stdID = i;
return true;
}
return false;
}
/* Remove a property from a group, if there are no more properties
/* Remove a property from a group, if there are no more properties
* left in the group, then delete the group as well */
int INDI_D::removeProperty(INDI_P *pp)
{
@ -170,7 +170,7 @@ int INDI_D::setAnyCmd (XMLEle *root, char errmsg[])
{
XMLAtt *ap;
INDI_P *pp;
ap = findAtt (root, "name", errmsg);
if (!ap)
return (-1);
@ -208,7 +208,7 @@ int INDI_D::setValue (INDI_P *pp, XMLEle *root, char errmsg[])
return (-1);
}
}
/* allow changing the timeout */
ap = findXMLAtt (root, "timeout");
if (ap)
@ -225,13 +225,13 @@ int INDI_D::setValue (INDI_P *pp, XMLEle *root, char errmsg[])
return (setTextValue (pp, root, errmsg));
break;
case PG_BUTTONS:
case PG_BUTTONS:
case PG_LIGHTS:
case PG_RADIO:
case PG_RADIO:
case PG_MENU:
return (setLabelState (pp, root, errmsg));
break;
case PG_BLOB:
return (setBLOB(pp, root, errmsg));
break;
@ -256,7 +256,7 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[])
TQString elementName;
char iNumber[32];
double min, max;
for (ep = nextXMLEle (root, 1); ep != NULL; ep = nextXMLEle (root, 0))
{
if (strcmp (tagXMLEle(ep), "oneText") && strcmp(tagXMLEle(ep), "oneNumber"))
@ -270,15 +270,15 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[])
}
elementName = valuXMLAtt(ap);
lp = pp->findElement(elementName);
if (!lp)
{
snprintf(errmsg, ERRMSG_SIZE, "Error: unable to find element '%.64s' in property '%.64s'", elementName.ascii(), pp->name.ascii());
return (-1);
}
//fprintf(stderr, "tag okay, getting perm\n");
switch (pp->perm)
{
@ -295,18 +295,18 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[])
numberFormat(iNumber, lp->format.ascii(), lp->value);
lp->text = iNumber;
lp->read_w->setText(lp->text);
ap = findXMLAtt (ep, "min");
if (ap) { min = atof(valuXMLAtt(ap)); lp->setMin(min); }
ap = findXMLAtt (ep, "max");
if (ap) { max = atof(valuXMLAtt(ap)); lp->setMax(max); }
/*if (lp->spin_w)
{
lp->spin_w->setValue(lp->value);
lp->spinChanged(lp->value);