Changeset 1703 for trunk/MagicSoft/Cosy/devdrv/macs.cc
- Timestamp:
- 01/14/03 12:08:46 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/macs.cc
r1702 r1703 48 48 case 0x100a: 49 49 lout << "- " << GetNodeName() << ": Using Software Version V" << dec << (int)(val>>16) << "." << (int)(val&0xff) << endl; 50 fSoftVersion = val; 51 return; 52 53 case 0x100b: 54 // Do not display, this is used for CheckConnection 55 // lout << "Node ID: " << dec << val << endl; 50 56 return; 51 57 … … 221 227 } 222 228 223 void Macs::InitDevice(Network *net) 224 { 225 lout << "- " << GetNodeName() << ": MAC Init device." << endl; 226 NodeDrv::InitDevice(net); 227 lout << "- " << GetNodeName() << ": MAC Init device...done." << endl; 228 229 // SendSDO(0x4003, (LWORD_t)('E'<<24 | 'X'<<16 | 'I'<<8 'T')); 230 // WaitForSdo(0x4003, 0); 231 232 /* 233 lout << "- Requesting SDO 0x2002 (vel) of " << (int)GetId() << endl; 234 RequestSDO(0x2002); 235 WaitForSdo(0x2002); 236 237 lout << "- Requesting SDO 0x2003 of " << (int)GetId() << endl; 238 RequestSDO(0x2003); 239 WaitForSdo(0x2003); 240 241 lout << "- Requesting SDO 0x2004 of " << (int)GetId() << endl; 242 RequestSDO(0x2004); 243 WaitForSdo(0x2004); 244 */ 229 void Macs::CheckConnection() 230 { 231 RequestSDO(0x100b); 232 WaitForSdo(0x100b); 233 234 // FIXME! Not statically linked! 235 // if (fSoftVersion<0x00000035) 236 // fIsZombie = true; 237 } 238 239 240 void Macs::Init() 241 { 245 242 lout << "- " << GetNodeName() << ": Requesting Mac Software Version." << endl; 246 243 RequestSDO(0x100a); 247 244 WaitForSdo(0x100a); 248 245 249 if (IsZombie()) 250 return; 246 if (fIsZombie) 247 { 248 lout << GetNodeName() << " - InitDevice failed!" << endl; 249 return; 250 } 251 251 252 252 EnableTimeout(kFALSE); … … 259 259 SendSDO(0x3000, string('o', 'n')); 260 260 WaitForSdo(0x3000); 261 262 261 263 262 // SetHome(250000); … … 413 412 // or by a positioning command (POSA, ...) 414 413 // 415 lout << "- " << GetNodeName() << ": Starting Posi stion Sync Mode." << endl;414 lout << "- " << GetNodeName() << ": Starting Position Sync Mode." << endl; 416 415 SendSDO(0x3007, 1, string('s', 'y', 'n', 'c')); 417 416 WaitForSdo(0x3007, 1); … … 547 546 } 548 547 548 // FIXME? Handling of fIsZombie? 549 549 void Macs::HandleError() 550 550 {
Note:
See TracChangeset
for help on using the changeset viewer.