Ignore:
Timestamp:
08/29/01 11:23:55 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/devdrv
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.cc

    r912 r918  
    1515ShaftEncoder::ShaftEncoder(BYTE_t nodeid, ostream &out=cout) : NodeDrv(nodeid, out), fLabel(NULL)
    1616{
    17     //
    18     // Show information
    19     //
    20     //    pthread_create(&fThread, NULL, MapUpdateThread, this);
    21 
    2217}
    2318
    2419ShaftEncoder::~ShaftEncoder()
    2520{
    26     //    pthread_cancel(fThread);
    2721}
    2822
     
    9185    cout << endl;
    9286}
    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
    10988void ShaftEncoder::DisplayVal()
    11089{
     
    133112    }
    134113}
    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
    166115void ShaftEncoder::HandlePDOType0(BYTE_t *data)
    167116{
  • trunk/MagicSoft/Cosy/devdrv/shaftencoder.h

    r910 r918  
    44#include "timer.h"
    55#include "nodedrv.h"
    6 
    7 #include <pthread.h>
    86
    97class TGLabel;
     
    2220
    2321    Timer fTime;
    24 
    25     //    pthread_t fThread;
    26     //    static void *MapUpdateThread(void *se);
    27     //    void UpdateThread();
    2822
    2923    void HandlePDOType0(BYTE_t *data);
Note: See TracChangeset for help on using the changeset viewer.