fix and log
This commit is contained in:
18
main.cpp
18
main.cpp
@@ -219,6 +219,7 @@ int main(int argc, char* argv[])
|
|||||||
cout << "tlak = " << pressure << endl;
|
cout << "tlak = " << pressure << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (vm.count("temperature")) {
|
if (vm.count("temperature")) {
|
||||||
cout << temperature << endl;
|
cout << temperature << endl;
|
||||||
}
|
}
|
||||||
@@ -235,24 +236,31 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("brightness")) {
|
if (vm.count("brightness")) {
|
||||||
serial.writeString(str(format("bright %d\r\n") % brightness));
|
string s = str(format("bright %d\r\n") % brightness);
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "SET " << s ;
|
||||||
|
serial.writeString(s);
|
||||||
|
boost::this_thread::sleep(posix_time::milliseconds(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("saturation")) {
|
if (vm.count("saturation")) {
|
||||||
serial.writeString(str(format("satur %d\r\n") % saturation));
|
string s = str(format("satur %d\r\n") % saturation);
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "SET " << s ;
|
||||||
|
serial.writeString(s);
|
||||||
|
boost::this_thread::sleep(posix_time::milliseconds(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.count("contrast")) {
|
if (vm.count("contrast")) {
|
||||||
serial.writeString(str(format("contr %d\r\n") % contrast));
|
string s = str(format("contr %d\r\n") % contrast);
|
||||||
|
BOOST_LOG_TRIVIAL(debug) << "SET " << s ;
|
||||||
|
serial.writeString(s);
|
||||||
|
boost::this_thread::sleep(posix_time::milliseconds(100));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (vm.count("capture")) {
|
if (vm.count("capture")) {
|
||||||
|
|
||||||
|
|
||||||
serial.writeString("capture\r\n");
|
serial.writeString("capture\r\n");
|
||||||
boost::this_thread::sleep(posix_time::milliseconds(100));
|
boost::this_thread::sleep(posix_time::milliseconds(100));
|
||||||
|
|
||||||
serial.setTimeout(posix_time::milliseconds(500));
|
serial.setTimeout(posix_time::milliseconds(500));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user