Changeset 8865 for trunk/MagicSoft/Cosy/main
- Timestamp:
- 02/20/08 19:39:13 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MCosy.cc
r8864 r8865 406 406 407 407 //#ifdef EXPERT 408 // point.SetAccDec(0.4, 0.4);409 // point.SetVelocity(0.2); // fast: 0.6, slow: 0.2 408 //point.SetPointAccDec(0.3, 0.3); 409 //point.SetPointVelocity(0.3); 410 410 //#else 411 411 … … 413 413 // 414 414 point.SetPointAccDec(0.2, 0.1); 415 416 415 point.SetPointVelocity(0.1); 417 416 418 417 419 418 //#endif 420 421 // point.SetPointAccDec(0.4, 0.4);422 // point.SetPointVelocity(0.4);423 424 419 425 420 // original … … 428 423 // test 429 424 // return point.SetPosition(dst, kTRUE); 430 431 432 433 425 } 434 426 … … 565 557 fMac1->HandleError(); 566 558 fMac2->HandleError(); 567 if (fMac3)568 fMac3->HandleError();559 //if (fMac3) 560 // fMac3->HandleError(); 569 561 if (HasError() || HasZombie()) 570 562 return false; … … 700 692 //cout << "WM_TrackPosition: done. (return 0xabcd)" << endl; 701 693 return 0xabcd; 702 /* 694 703 695 case WM_ARM: 704 696 //cout << "WM_Position: start." << endl; 705 697 { 706 698 if (!CheckNetwork()) 707 return (void*)0xebb0;708 709 const bool arm = *((bool*)mp);710 if (arm)711 {699 return 0xebb0; 700 701 //const bool arm = *((bool*)mp); 702 //if (arm) 703 //{ 712 704 fMac1->Arm(); 713 705 fMac2->Arm(); 714 cout << "ARMED" << endl;715 }716 else717 {718 fMac1->Disarm();719 fMac2->Disarm();720 cout << "DISARMED" << endl;721 }706 //cout << "ARMED" << endl; 707 //} 708 //else 709 //{ 710 // fMac1->Disarm(); 711 // fMac2->Disarm(); 712 //cout << "DISARMED" << endl; 713 //} 722 714 } 723 715 //cout << "WM_Position: done. (return 0x7777)" << endl; 724 return (void*)0x9999;725 */ 716 return 0x9999; 717 726 718 case WM_POSITION: 727 719 //cout << "WM_Position: start." << endl; … … 963 955 Bool_t mac1 = fMac1 && !fMac1->IsZombieNode(); 964 956 Bool_t mac2 = fMac2 && !fMac2->IsZombieNode(); 965 Bool_t mac3 = fMac3 && !fMac3->IsZombieNode();957 //Bool_t mac3 = fMac3 && !fMac3->IsZombieNode(); 966 958 967 959 Bool_t zd1 = fZd1 && !fZd1->IsZombieNode(); … … 971 963 Double_t x = 0; 972 964 Double_t y = 0; 973 y = mac1 ? fMac1->GetRes() : (mac3 ? fMac3->GetRes() : env.GetValue("Az_ResRE[re/U_mot]", 1500)); 965 // y = mac1 ? fMac1->GetRes() : (mac3 ? fMac3->GetRes() : env.GetValue("Az_ResRE[re/U_mot]", 1500)); 966 y = mac1 ? fMac1->GetRes() : env.GetValue("Az_ResRE[re/U_mot]", 1500); 974 967 x = mac2 ? fMac2->GetRes() : env.GetValue("Zd_ResRE[re/U_mot]", 1500); 975 968 kResRE.Set(x,y); … … 1278 1271 avail |= (fMac1 && !fMac1->IsZombieNode()) ? 0x01 : 0; 1279 1272 avail |= (fMac2 && !fMac2->IsZombieNode()) ? 0x02 : 0; 1280 avail |= (fMac3 && !fMac3->IsZombieNode()) ? 0x04 : 0;1273 //avail |= (fMac3 && !fMac3->IsZombieNode()) ? 0x04 : 0; 1281 1274 avail |= (fZd1 && !fZd1->IsZombieNode()) ? 0x08 : 0; 1282 1275 avail |= (fZd2 && !fZd2->IsZombieNode()) ? 0x10 : 0; … … 1284 1277 // avail |= (!(fStatus&MDriveCom::kError) && 1 ? 0x40 : 0; 1285 1278 1279 Bool_t armed = kTRUE; 1280 1281 armed &= fMac1 && fMac1->IsArmed(); 1282 armed &= fMac2 && fMac2->IsArmed(); 1283 1286 1284 if (HasError()) 1287 1285 SetStatus(MDriveCom::kError); … … 1296 1294 fWin->UpdateWeather(*fCom); 1297 1295 fWin->Update(bendist, fTrackingError, fVelocity, /*fOffset,*/ 1298 fRaDec, fZdAzSoll, fStatus, avail );1296 fRaDec, fZdAzSoll, fStatus, avail, armed); 1299 1297 1300 1298 gLog.UpdateGui(); … … 1497 1495 fMac1=new Macs(id1, "Mac/Az"); 1498 1496 fMac2=new Macs(id3, "Mac/Zd"); 1499 if (id2>=0)1500 fMac3=new Macs(id2, "Mac/Az-Sync");1497 //if (id2>=0) 1498 // fMac3=new Macs(id2, "Mac/Az-Sync"); 1501 1499 1502 1500 fZd1=new ShaftEncoder(id4, "SE/Zd1"); … … 1519 1517 SetNode(fMac1); 1520 1518 SetNode(fMac2); 1521 if (id2>=0)1522 SetNode(fMac3);1519 //if (id2>=0) 1520 // SetNode(fMac3); 1523 1521 SetNode(fZd1); 1524 1522 SetNode(fZd2); … … 1618 1616 MCosy::MCosy(MEnv &env, const char *addr, const char *pointing) 1619 1617 : Network(), fObservatory(MObservatory::kMagic1), fStarguider(NULL), 1620 fZd1(0), fZd2(0), fAz(0), fMac1(0), fMac2(0), fMac3(0),1618 fZd1(0), fZd2(0), fAz(0), fMac1(0), fMac2(0), /*fMac3(0),*/ 1621 1619 fBackground(kBgdNone), fTriggerDisplay(kFALSE), fStatus(MDriveCom::kStopped), 1622 1620 fOutTp(0), fOutRep(0) … … 1721 1719 delete fMac1; 1722 1720 delete fMac2; 1723 if (fMac3)1724 delete fMac3;1721 //if (fMac3) 1722 // delete fMac3; 1725 1723 1726 1724 gLog << inf2 << "Deleting MGCosy." << endl; -
trunk/MagicSoft/Cosy/main/MCosy.h
r8862 r8865 87 87 Macs *fMac1; 88 88 Macs *fMac2; 89 Macs *fMac3;89 //Macs *fMac3; 90 90 91 91 MGCosy *fWin;
Note:
See TracChangeset
for help on using the changeset viewer.