Commit 4e496bdd authored by fmg005's avatar fmg005

Added 100ms sleep to send command method

parent 4147df10
......@@ -76,7 +76,6 @@ void HardwareSimulator::SetIBP(int channel, double syst, double diast ) {
else if (syst > 99 && diast > 9 && diast < 100 && syst > diast) {
SendCommand("IBPP="+s_channel+","+s_syst+","+"0"+s_diast);
m_logger->info("IBP set to " +s_syst+ "/" +s_diast);
}
else if ( diast > syst) {
m_logger->warning("Systolic can't be less than Diastolic pressure: "+s_syst+"/"+s_diast);
......@@ -116,6 +115,7 @@ string HardwareSimulator::GetCurrentMode() {
size_t HardwareSimulator::SendCommand(string command) {
size_t bytes_sent = m_serial->write(command+"\r\n");
usleep(100); // sleep for 100ms
return bytes_sent;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment