📄 linedetector.java
字号:
package nanovm.nibo.drivers;/** * Encapsulates the information about the two * IR-reflex-sensors for line detection. You will have to call the update * Method first to get actual values. * @author Nils Springob */public class LineDetector { /** * Maximum value from IR-sensor */ public static final int MAXIMUM = 255; /** * Minimum value from IR-sensor */ public static final int MINIMUM = 0; /** * Measure the reflex values on both sides and update the values. */ public static native void update(); /** * Get the difference between the measurement with and without IR-enlightment * from the left line sensor. * @return measured value */ public static native int getLeftRel(); /** * Get the difference between the measurement with and without IR-enlightment * from the right line sensor. * @return measured value */ public static native int getRightRel(); /** * Get the measured value from the left line sensor with IR-enlightment. * @return measured value */ public static native int getLeftAbs(); /** * Get the measured value from the right line sensor with IR-enlightment. * @return measured value */ public static native int getRightAbs();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -