Modifications

Sauter à la navigation Sauter à la recherche
Ligne 61 : Ligne 61 :  
<syntaxhighlight lang="C">unsigned int readLine(unsigned int *sensorValues, unsigned char readMode = QTR_EMITTERS_ON, unsigned char whiteLine = 0)</syntaxhighlight>
 
<syntaxhighlight lang="C">unsigned int readLine(unsigned int *sensorValues, unsigned char readMode = QTR_EMITTERS_ON, unsigned char whiteLine = 0)</syntaxhighlight>
   −
Operates the same as read calibrated, but with a feature designed for line following: this function returns an estimated position of the line. The estimate is made using a weighted average of the sensor indices multiplied by 1000, so that a return value of 0 indicates that the line is directly below sensor 0 (or was last seen by sensor 0 before being lost), a return value of 1000 indicates that the line is directly below sensor 1, 2000 indicates that it’s below sensor 2, etc. Intermediate values indicate that the line is between two sensors. The formula is:
+
Fonctionne de la même façon que {{fname|readCalibrated}}, but with a feature designed for line following: this function returns an estimated position of the line. The estimate is made using a weighted average of the sensor indices multiplied by 1000, so that a return value of 0 indicates that the line is directly below sensor 0 (or was last seen by sensor 0 before being lost), a return value of 1000 indicates that the line is directly below sensor 1, 2000 indicates that it’s below sensor 2, etc. Intermediate values indicate that the line is between two sensors. The formula is:
    
  <nowiki> 0*value0 + 1000*value1 + 2000*value2 + ...
 
  <nowiki> 0*value0 + 1000*value1 + 2000*value2 + ...
29 910

modifications

Menu de navigation