/[H7]/branches/linux-serial/serial1.cpp
ViewVC logotype

Diff of /branches/linux-serial/serial1.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 62 by torben, Mon Feb 5 10:10:18 2007 UTC revision 63 by torben, Tue Feb 6 14:01:59 2007 UTC
# Line 42  int main(int argc, char* argv[]) Line 42  int main(int argc, char* argv[])
42                    
43          try          try
44          {          {
45                    int count =0;
46                    serial.open(argv[1], CSerial::Baud9600);
47                    while(1)
48                    {
49                            try{
50                                    std::cout << "Potmeter: " << serial.readTarget(5) << std::endl;
51                            }
52                            catch (timeout_error& e)
53                            {
54                                    std::cout << "Restarting ..." << std::endl;
55                                    serial.close();
56                                    Sleep(50);
57                                    serial.open(argv[1], CSerial::Baud9600);
58                                    Sleep(50);
59                            }
60                            std::cout << count++ << std::endl;
61                            Sleep(50);
62                    }
63    
64                  serial.open(argv[1], CSerial::Baud9600);                  serial.open(argv[1], CSerial::Baud9600);
65                  // tænd lysdiode S3&S4 / RB1&RB2                  // tænd lysdiode S3&S4 / RB1&RB2

Legend:
Removed from v.62  
changed lines
  Added in v.63

  ViewVC Help
Powered by ViewVC 1.1.20