26 className = this->staticMetaObject.className();
171 bool heartbeatToggle =
false;
190 emit
message(QString(
"<font color=\"#FF0000\">ERROR reading voltage sensor 1. Stopping %1!</font>").arg(
className));
205 emit
message(
"<font color=\"#FF0000\">ERROR reading voltage sensor 2. Stopping sensorThread!</font>");
286 if (!heartbeatToggle)
306 heartbeatToggle = !heartbeatToggle;
609 if (!heartbeatToggle)
617 heartbeatToggle = !heartbeatToggle;
629 unsigned char calibrationValue = 8;
639 return (n+calibrationValue);
651 unsigned char calibrationValue = 8;
654 if ((distance-calibrationValue) <= 0)
664 return (
iRDistance[distance-calibrationValue]);
672 qDebug(
"ERROR sensorThread, getMAmpere: wrong motor sensor");
690 qDebug(
"ERROR sensorThread, getVoltage: wrong voltage sensor");
704 qDebug(
"ERROR sensorThread, getContactValue: wrong contact number");
717 qDebug(
"ERROR: wrong ir sensor");
731 qDebug(
"ERROR: wrong ir sensor");
778 qDebug(
"ERROR: wrong motor sensor");
788 QString answer =
"error";
793 qDebug(
"ERROR: wrong motor sensor '%d' at resetDrivenDistance()", sensor);
809 if (answer ==
"*ok#")
819 emit
message(
"<font color=\"#FF0000\">ERROR resetting driven distance 1. Stopping sensorThread!</font>");
835 if (answer ==
"*ok#")
845 emit
message(
"<font color=\"#FF0000\">ERROR resetting driven distance 2. Stopping sensorThread!</font>");
867 unsigned char calibrationValue = 53;
872 qDebug(
"ERROR: wrong us sensor");
895 qDebug(
"ERROR: wrong motor sensor");
1037 if ( (sensorValue & 32768) == 32768)
1040 sensorValue -= 32768;
1043 sensorValue = sensorValue * -1;
1049 return ( (
float) sensorValue * (360.0 / 65536.0));
1087 qDebug(
"ERROR sensorThread, convertToVolt: wrong voltage sensor");
1293 qDebug(
"WARNING: wrong sensor number in readInfraredSensor()");
1329 qDebug(
"WARNING: wrong sensor number in readUltrasonicSensor()");
1337 QString answer =
"error";
1387 qDebug(
"WARNING: wrong sensor number in readVoltageSensor()");
1395 QString answer =
"error";
1442 qDebug(
"ERROR reading motor sensor 3 not implented yet!!");
1467 qDebug(
"ERROR reading motor sensor 4 not implented yet!!");
1494 qDebug(
"WARNING: wrong sensor number in readMotorSensor()");
1502 QString answer =
"error";
1552 qDebug(
"WARNING: wrong 'driven distance'' number in readDrivenDistance()");
1560 QString answer =
"error";
1631 qDebug(
"WARNING: wrong compass axis number in readCompassAxis()");
1729 qDebug(
"WARNING: wrong contact number in readContact()");