Skip to content
Snippets Groups Projects
Commit a3f16d08 authored by Karol Krizka's avatar Karol Krizka
Browse files

Fix includes.

parent ff4aa4c9
Branches serialcom
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ int main(int argc, char*argv[]) {
for (unsigned i=0; i<10; i++) {
logger(logINFO) << meter.sense();
//std::cout<<meter.sense()<<std::endl;
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
}
return 0;
......
......@@ -8,6 +8,7 @@
#include <cerrno>
#include <cstring>
#include <stdexcept>
loglevel_e loglevel;
......
......@@ -25,7 +25,7 @@ std::string PM6680::receive(std::string cmd) {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Sending: " << cmd;
cmd += "\r\n";
m_com->write(cmd);
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
m_com->write("++read eoi\n\r");
std::this_thread::sleep_for(std::chrono::milliseconds(m_wait));
std::string buf;
......@@ -38,17 +38,17 @@ void PM6680::init() {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Initialising: ";
logger(logDEBUG2) << this->receive("*IDN?");
this->send("*RST");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("INPUT:LEVEL:AUTO ON");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("INP:COUP DC");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("INP:IMP 1000000");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("INP:SLOP POS");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("INP:FILT ON");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("AVER:STATE ON");
}
......
......@@ -25,7 +25,7 @@ std::string PG8133A::receive(std::string cmd) {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Sending: " << cmd;
cmd += "\r\n";
m_com->write(cmd);
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
m_com->write("++read eoi\n\r");
std::this_thread::sleep_for(std::chrono::milliseconds(m_wait));
std::string buf;
......@@ -37,27 +37,27 @@ std::string PG8133A::receive(std::string cmd) {
void PG8133A::init() {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Initialising: ";
this->send("*RST");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("FUNC:SHAP SQU");
}
void PG8133A::setFreq(double value) {
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("FREQ " + std::to_string(value));
}
void PG8133A::setVoltHigh(double value) {
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT1:HIGH " + std::to_string(value));
}
void PG8133A::setVoltLow(double value) {
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT1:LOW " + std::to_string(value));
}
void PG8133A::setOutPut(double value) {
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("OUTP1 " + std::to_string(value));
}
......
......@@ -25,7 +25,7 @@ std::string WF33120A::receive(std::string cmd) {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Sending: " << cmd;
cmd += "\r\n";
m_com->write(cmd);
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
m_com->write("++read eoi\n\r");
std::this_thread::sleep_for(std::chrono::milliseconds(m_wait));
std::string buf;
......@@ -37,26 +37,26 @@ std::string WF33120A::receive(std::string cmd) {
void WF33120A::init() {
logger(logDEBUG2) << __PRETTY_FUNCTION__ << " -> Initialising: ";
this->send("*RST");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("FUNC:SHAP SQU");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT 1.2");
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT:OFFS 0.6");
}
void WF33120A::setFreq(double value) { //Frequency Hz
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("FREQ " + std::to_string(value));
}
void WF33120A::setVolt(double value) { //Amplitude V
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT " + std::to_string(value));
}
void WF33120A::setVoltOffset(double value) { //Offset V
sleep(1);
std::this_thread::sleep_for(std::chrono::seconds(1));
this->send("VOLT:OFFS " + std::to_string(value));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment