Changeset 12591
- Timestamp:
- 11/21/11 12:54:18 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosy/main/MCosy.cc
r10035 r12591 118 118 ZdAz MCosy::GetSePos() const 119 119 { 120 const Double_t pa = fMac1 ? (Double_t)fMac1->GetPdoPos2()/fMac1->GetPosRes() 120 const Double_t pa = fMac1 ? (Double_t)fMac1->GetPdoPos2()/fMac1->GetPosRes() : 0; 121 121 const Double_t p1 = fMac2 ? (Double_t)fMac2->GetPdoPos2()/fMac2->GetPosRes() : 0; 122 122 … … 261 261 pointing.Zd(-pointing.Zd()); 262 262 pointing.Az(pointing.Az()+180); 263 //gLog << "ZD=-ZD Az+=180" << endl;264 263 } 265 264 266 265 const ZdAz se = GetSePos()*TMath::TwoPi(); // [rad] 267 266 const ZdAz unbendedse = fBending.CorrectBack(se)*TMath::RadToDeg(); // ist pointing 268 269 //gLog << "Unbended: " << unbendedse.Zd() << " " << unbendedse.Az() << endl;270 267 271 268 do … … 275 272 break; 276 273 277 //gLog << "AZ += " << TMath::Sign(360., d) << endl;278 279 274 pointing.Az(pointing.Az()+TMath::Sign(360., d)); 275 280 276 } while (1); 281 277 … … 484 480 Int_t MCosy::Proc(int msg, void *mp) 485 481 { 482 cout << "*** Received " << hex << msg << endl; 486 483 switch (msg) 487 484 { … … 498 495 499 496 case WM_TPOINT: 497 #ifdef FACT 498 fStarguider->fTPoint->SetDown(kTRUE); 499 #else 500 500 { 501 501 //cout << "WM_TPoint: start." << endl; … … 545 545 //cout << "WM_TPoint: done. (return 0xaffe)" << endl; 546 546 } 547 break; 548 547 #endif 548 break; 549 549 case WM_STARGTPOINT: 550 550 if (fStarguider) … … 574 574 } 575 575 //cout << "WM_TrackPosition: done. (return 0xabcd)" << endl; 576 break; 577 578 case WM_LEDS: 579 { 580 if (!CheckNetwork()) 581 return 0xebb0; 582 583 const Long_t *u = (Long_t*)mp; 584 585 fMac1->SetLedVoltage(u[0]); 586 fMac2->SetLedVoltage(u[1]); 587 } 576 588 break; 577 589 … … 898 910 { 899 911 tout.Start(999); 900 fCom->SendReport(fStatus, f RaDec, fHourAngle, fZdAzSoll, bendist, fTrackingError, armed,901 fStarguider ? fStarguider->GetStarguiderMode() : 0 );912 fCom->SendReport(fStatus, fMJD, fRaDec, fHourAngle, fZdAzSoll, bendist, fTrackingError, armed, 913 fStarguider ? fStarguider->GetStarguiderMode() : 0, ((stat1&0xffff)<<16)|(stat2&0xffff)); 902 914 } 903 915 904 916 fWin->UpdateWeather(*fCom); 905 917 fWin->Update(bendist, fTrackingError, /*fVelocity, fOffset,*/ 906 fRaDec, fZdAzSoll, fStatus, ((stat1&0xff )<<8)|(stat2&0xff), HasConnection(), armed, statzd, stataz);918 fRaDec, fZdAzSoll, fStatus, ((stat1&0xffff)<<16)|(stat2&0xffff), HasConnection(), armed, statzd, stataz); 907 919 908 920 gLog.UpdateGui(); … … 993 1005 MCosy::MCosy(MEnv &env, MDriveCom *com) 994 1006 : Network(), fObservatory(MObservatory::kMagic1), fStarguider(NULL), 995 fMac1(0), fMac2(0), f Status(MDriveCom::kStopped), fOutTp(0), fOutRep(0)1007 fMac1(0), fMac2(0), fMJD(0), fStatus(MDriveCom::kStopped), fOutTp(0), fOutRep(0) 996 1008 { 997 1009 const Int_t id1 = env.GetValue("Az_Id", 1);
Note:
See TracChangeset
for help on using the changeset viewer.