re:pub
Dependents: 200_yotsuba_21 200_yotuba_21_uiChange
sensorGen.h@6:fc6e4c814d3f, 2021-03-05 (annotated)
- Committer:
- THtakahiro702286
- Date:
- Fri Mar 05 06:30:54 2021 +0000
- Revision:
- 6:fc6e4c814d3f
- Parent:
- 5:8ed76df0196b
- Child:
- 7:a0cf2b2ca433
- Child:
- 8:e11be46f5480
mawarikometa
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
piroro4560 | 0:03658c55ab2e | 1 | #ifndef SENSORGEN_H |
piroro4560 | 0:03658c55ab2e | 2 | #define SENSORGEN_H |
piroro4560 | 0:03658c55ab2e | 3 | |
piroro4560 | 0:03658c55ab2e | 4 | #include "camera.h" |
piroro4560 | 0:03658c55ab2e | 5 | #include "line.h" |
piroro4560 | 0:03658c55ab2e | 6 | #include "jy901.h" |
piroro4560 | 4:f651e59a9805 | 7 | #include "main.h" |
piroro4560 | 0:03658c55ab2e | 8 | |
THtakahiro702286 | 6:fc6e4c814d3f | 9 | #define CAMCENTERX 165 |
THtakahiro702286 | 6:fc6e4c814d3f | 10 | #define CAMCENTERY 115 |
THtakahiro702286 | 5:8ed76df0196b | 11 | |
piroro4560 | 4:f651e59a9805 | 12 | class sensorgen |
piroro4560 | 4:f651e59a9805 | 13 | { |
piroro4560 | 0:03658c55ab2e | 14 | public : |
piroro4560 | 4:f651e59a9805 | 15 | sensorgen(); |
piroro4560 | 0:03658c55ab2e | 16 | |
piroro4560 | 0:03658c55ab2e | 17 | void sensorloop(); |
piroro4560 | 0:03658c55ab2e | 18 | |
piroro4560 | 0:03658c55ab2e | 19 | // float jy901(); |
piroro4560 | 0:03658c55ab2e | 20 | |
piroro4560 | 0:03658c55ab2e | 21 | // float hcsr04(); |
piroro4560 | 0:03658c55ab2e | 22 | |
piroro4560 | 0:03658c55ab2e | 23 | // float camera(); |
piroro4560 | 0:03658c55ab2e | 24 | |
piroro4560 | 4:f651e59a9805 | 25 | int line[6]; |
piroro4560 | 0:03658c55ab2e | 26 | float angle; |
piroro4560 | 0:03658c55ab2e | 27 | float angleLimit; |
piroro4560 | 0:03658c55ab2e | 28 | float ballAngle; |
piroro4560 | 0:03658c55ab2e | 29 | float ballRange; |
piroro4560 | 4:f651e59a9805 | 30 | bool ballKeep; |
piroro4560 | 0:03658c55ab2e | 31 | float blueAngle; |
piroro4560 | 0:03658c55ab2e | 32 | float blueRange; |
piroro4560 | 0:03658c55ab2e | 33 | float yellowAngle; |
piroro4560 | 0:03658c55ab2e | 34 | float yellowRange; |
piroro4560 | 4:f651e59a9805 | 35 | bool ballSig, blueSig, yellowSig; |
piroro4560 | 0:03658c55ab2e | 36 | //private: |
piroro4560 | 0:03658c55ab2e | 37 | Thread thread; |
piroro4560 | 4:f651e59a9805 | 38 | Line *_line[6]; |
piroro4560 | 4:f651e59a9805 | 39 | Cam camera; |
piroro4560 | 4:f651e59a9805 | 40 | JY901 jy; |
piroro4560 | 4:f651e59a9805 | 41 | Timer ballTimeout; |
piroro4560 | 4:f651e59a9805 | 42 | Timer blueTimeout; |
piroro4560 | 4:f651e59a9805 | 43 | Timer yellowTimeout; |
piroro4560 | 4:f651e59a9805 | 44 | bool ballTimeoutState,blueTimeoutState,yellowTimeoutState; |
piroro4560 | 4:f651e59a9805 | 45 | int angleCount; |
piroro4560 | 4:f651e59a9805 | 46 | int ballx,bally,bluex,bluey,yellowx,yellowy; |
piroro4560 | 4:f651e59a9805 | 47 | float tempAngle,rawAngle; |
piroro4560 | 4:f651e59a9805 | 48 | int ballkeepcount,ballcount,yellowcount,bluecount; |
piroro4560 | 0:03658c55ab2e | 49 | }; |
piroro4560 | 0:03658c55ab2e | 50 | |
piroro4560 | 0:03658c55ab2e | 51 | #endif |