12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
-
-
- #include <unistd.h>
- #include <iostream>
- #include "max31723.h"
- #include <signal.h>
-
- int doWork = 0;
- upm::MAX31723 *sensor = NULL;
-
- void
- sig_handler(int signo)
- {
- printf("got signal\n");
- if (signo == SIGINT) {
- printf("exiting application\n");
- doWork = 1;
- }
- }
-
- int
- main(int argc, char **argv)
- {
-
- sensor = new upm::MAX31723(7);
- usleep (1000000);
-
- while (!doWork) {
- std::cout << "Temperature " << sensor->getTemperature() << std::endl;
- usleep (1000000);
- }
-
-
- std::cout << "exiting application" << std::endl;
-
- delete sensor;
-
- return 0;
- }
|