- Timestamp:
- 05/11/09 21:49:57 (16 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r9439 r9443 1 1 -*-*- END -*-*- 2 3 2009/05/11 Thomas Bretz (La Palma) 4 5 * cosy.cc: 6 - made compatible with newer MARS version 7 - added a connection check to the sps 8 - made ports settable by rc-file 9 10 * telesto.cc: 11 - made compatible with newer MARS version 12 13 * devdrv/dkc.[h,cc]: 14 - disarm when network is shut down 15 - changed acces to armed 16 - set default status to 0xff 17 - added IsRpmActive 18 19 * main/MTracking.cc: 20 - leave tracking loop when sps stopped tracking (e.g. 21 disarmed) 22 23 * tcpip/MTcpIpIO.cc: 24 - set debug level to get proper outout when MTcpIpO 25 creates a socket 26 27 2 28 3 29 2009/05/09 Thomas Bretz (La Palma) -
trunk/MagicSoft/Cosy/cosy.cc
r9439 r9443 115 115 // Evaluate arguments 116 116 // 117 MArgs arg(argc, argv , kTRUE);117 MArgs arg(argc, argv); 118 118 gLog.Setup(arg); 119 119 … … 131 131 const Bool_t kDebugMem = arg.HasOnlyAndRemove("--debug-mem"); 132 132 const Bool_t kDebugThreads = arg.HasOnlyAndRemove("--debug-threads"); 133 const Int_t ceco_tx = arg.GetIntAndRemove("--cc-tx=", 7314);//7304);134 const Int_t ceco_rx = arg.GetIntAndRemove("--cc-rx=", 7414);//7404);135 133 const TString kConfig = arg.GetStringAndRemove("--config=", ".cosyrc"); // ceco 136 134 Int_t kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0; … … 160 158 const Int_t channel = env.GetValue("DefaultCameraChannel", 0); 161 159 const TString sps = env.GetValue("IpAddressSPS", "sps"); 162 const TString ceco = env.GetValue("IpAddressCentralControl", "161.72.130.60"); 160 const TString ceco = env.GetValue("IpAddressCentralControl", "161.72.130.2"); 161 const Int_t ceco_rx = env.GetValue("PortCentralControlRX", 7404); 162 const Int_t ceco_tx = env.GetValue("PortCentralControlTX", 7304); 163 163 const TString powerswitch = env.GetValue("IpAddressPowerSwitch", ""); 164 164 const Int_t telescope = env.GetValue("Telescope", 1); … … 214 214 if (kDebugMem) 215 215 TObject::SetObjectStat(kTRUE); 216 217 // Check if a connection can be established 218 const Int_t save = gDebug; 219 gDebug = 1; 220 TSocket test(sps, 5357); 221 gDebug = save; 222 test.Close(); 216 223 217 224 // -
trunk/MagicSoft/Cosy/devdrv/dkc.cc
r9439 r9443 15 15 using namespace std; 16 16 17 #define EXPERT17 //#define EXPERT 18 18 19 19 Dkc::Dkc(const BYTE_t nodeid, const char *name) 20 20 : NodeDrv(nodeid, name), fMacId(2*nodeid+1), 21 21 fPdoPos1(0), fPdoPos2(0), fPosActive(0), fRpmActive(0), 22 fStatus(0 ), fStatusDKC(0), fStatusPdo3(0xff), fArmed(false),22 fStatus(0xff), fStatusDKC(0), fStatusPdo3(0xff), fArmed(false), 23 23 fReport(NULL),fLabel(NULL),fUpdPos(0) 24 24 { … … 367 367 // FIXME: This isn't called if the initialization isn't done completely! 368 368 // 369 370 369 SetRpmMode(FALSE); 370 Disarm(); 371 371 } 372 372 … … 515 515 void Dkc::HandlePDO3(const BYTE_t *data, const timeval_t &tv) 516 516 { 517 fArmed = data[2]&0x01;518 519 517 if (fStatus!=data[3]) 520 518 { 521 // data[3]&0x01; // motor not moving519 fArmed = data[3]&0x01; // armed status 522 520 fPosActive = data[3]&0x02; // positioning active 523 521 fRpmActive = data[3]&0x04; // RPM mode switched on -
trunk/MagicSoft/Cosy/devdrv/dkc.h
r9439 r9443 120 120 121 121 bool IsOperative() const { return fStatusPdo3==0xef; } 122 bool IsRpmActive() const { return fRpmActive; } 122 123 123 124 void HandleError(); -
trunk/MagicSoft/Cosy/main/MTracking.cc
r9439 r9443 363 363 // 364 364 usleep(1000000); // 1s 365 366 // 367 // If we would do it in the beginnign of the loop it can happen 368 // that we check before we got the feedback through the pdo 369 // 370 if (!fCosy->fMac1->IsRpmActive() || !fCosy->fMac2->IsRpmActive()) 371 break; 365 372 } 366 373 -
trunk/MagicSoft/Cosy/tcpip/MTcpIpIO.cc
r9439 r9443 15 15 16 16 #undef DEBUG 17 //#define DEBUG18 17 19 18 using namespace std; … … 46 45 gLog << all << "- Open send socket to " << addr << ":" << tx << endl; 47 46 47 const Int_t save = gDebug; 48 gDebug=1; 48 49 fTxSocket = new TSocket(addr, tx); 50 gDebug=save; 49 51 fTxSocket->SetOption(kNoBlock, 1); 50 52 -
trunk/MagicSoft/Cosy/telesto.cc
r8973 r9443 92 92 // Evaluate arguments 93 93 // 94 MArgs arg(argc, argv , kTRUE);94 MArgs arg(argc, argv); 95 95 gLog.Setup(arg); 96 96
Note:
See TracChangeset
for help on using the changeset viewer.