mbed2 zad 5b
Dependencies: LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI
Servo/Servo.h@5:cafab5a4d1c9, 2020-06-09 (annotated)
- Committer:
- krzysiek99
- Date:
- Tue Jun 09 12:30:01 2020 +0000
- Revision:
- 5:cafab5a4d1c9
- Parent:
- 4:7855d3ab4c15
mbed2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krzysiek99 | 4:7855d3ab4c15 | 1 | #ifndef SERVO_H |
krzysiek99 | 4:7855d3ab4c15 | 2 | #define SERVO_H |
krzysiek99 | 4:7855d3ab4c15 | 3 | #include "ServoGui.h" |
krzysiek99 | 4:7855d3ab4c15 | 4 | enum ServoState{IDLE, CALLIB, IN_PROGRESS}; |
krzysiek99 | 4:7855d3ab4c15 | 5 | class Servo |
krzysiek99 | 4:7855d3ab4c15 | 6 | { |
krzysiek99 | 4:7855d3ab4c15 | 7 | public: |
krzysiek99 | 4:7855d3ab4c15 | 8 | enum ServoState eState; |
krzysiek99 | 4:7855d3ab4c15 | 9 | unsigned int uiCurrentPosition; |
krzysiek99 | 4:7855d3ab4c15 | 10 | unsigned int uiDesiredPosition; |
krzysiek99 | 4:7855d3ab4c15 | 11 | Servo(unsigned int uiInitialPosition = 0); |
krzysiek99 | 4:7855d3ab4c15 | 12 | enum DetectorState eReadDetector(void); |
krzysiek99 | 4:7855d3ab4c15 | 13 | void Callib(void); |
krzysiek99 | 4:7855d3ab4c15 | 14 | void GoTo(unsigned int uiPosition); |
krzysiek99 | 4:7855d3ab4c15 | 15 | void Automat(void); |
krzysiek99 | 4:7855d3ab4c15 | 16 | private: |
krzysiek99 | 4:7855d3ab4c15 | 17 | ServoGui MyGui; |
krzysiek99 | 4:7855d3ab4c15 | 18 | }; |
krzysiek99 | 4:7855d3ab4c15 | 19 | #else |
krzysiek99 | 4:7855d3ab4c15 | 20 | #error "This class was definied previously" |
krzysiek99 | 4:7855d3ab4c15 | 21 | #endif |