Changeset 918 for trunk/MagicSoft/Cosy/devdrv
- Timestamp:
- 08/29/01 11:23:55 (23 years ago)
- Location:
- trunk/MagicSoft/Cosy/devdrv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc
r912 r918 15 15 ShaftEncoder::ShaftEncoder(BYTE_t nodeid, ostream &out=cout) : NodeDrv(nodeid, out), fLabel(NULL) 16 16 { 17 //18 // Show information19 //20 // pthread_create(&fThread, NULL, MapUpdateThread, this);21 22 17 } 23 18 24 19 ShaftEncoder::~ShaftEncoder() 25 20 { 26 // pthread_cancel(fThread);27 21 } 28 22 … … 91 85 cout << endl; 92 86 } 93 /* 94 void *ShaftEncoder::MapUpdateThread(void *data) 95 { 96 ShaftEncoder *se = (ShaftEncoder*) data; 97 98 // 99 // Detach thread (make sure that it is really removed from memory) 100 // 101 pthread_detach(pthread_self()); 102 setpriority(PRIO_PROCESS, 0, 5); 103 104 se->UpdateThread(); 105 106 return NULL; 107 } 108 */ 87 109 88 void ShaftEncoder::DisplayVal() 110 89 { … … 133 112 } 134 113 } 135 /* 136 void ShaftEncoder::UpdateThread() 137 { 138 return; 139 // 140 // check for a running thread and lock mutex 141 // 142 143 // 144 // Wait until the network and the output widget is initialized 145 // 146 while (!GetNetwork() || !fLabel) 147 usleep(1); 148 149 while (1) 150 { 151 usleep(40000); 152 //WaitForNextPdo1(); 153 154 // 155 // Update information 156 // 157 158 159 // 160 // make updated information visible 161 // 162 //gSystem->ProcessEvents(); ----> MCosy::GuiThread 163 } 164 } 165 */ 114 166 115 void ShaftEncoder::HandlePDOType0(BYTE_t *data) 167 116 { -
trunk/MagicSoft/Cosy/devdrv/shaftencoder.h
r910 r918 4 4 #include "timer.h" 5 5 #include "nodedrv.h" 6 7 #include <pthread.h>8 6 9 7 class TGLabel; … … 22 20 23 21 Timer fTime; 24 25 // pthread_t fThread;26 // static void *MapUpdateThread(void *se);27 // void UpdateThread();28 22 29 23 void HandlePDOType0(BYTE_t *data);
Note:
See TracChangeset
for help on using the changeset viewer.