Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Module/UVC.hpp@1:2594a70c1ddd, 2021-05-26 (annotated)
- Committer:
- _seminahn
- Date:
- Wed May 26 05:26:16 2021 +0000
- Revision:
- 1:2594a70c1ddd
- Child:
- 2:0de4854743f7
sonar num 11 -> 10
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| _seminahn | 1:2594a70c1ddd | 1 | #ifndef ZETA_STM_KINETIC_UVC_H_ |
| _seminahn | 1:2594a70c1ddd | 2 | #define ZETA_STM_KINETIC_UVC_H_ |
| _seminahn | 1:2594a70c1ddd | 3 | |
| _seminahn | 1:2594a70c1ddd | 4 | #include "std_msgs/Bool.h" |
| _seminahn | 1:2594a70c1ddd | 5 | #include "pinConfig.h" |
| _seminahn | 1:2594a70c1ddd | 6 | #include "ros.h" |
| _seminahn | 1:2594a70c1ddd | 7 | extern ros::NodeHandle nh; |
| _seminahn | 1:2594a70c1ddd | 8 | |
| _seminahn | 1:2594a70c1ddd | 9 | // this class control 4 modules |
| _seminahn | 1:2594a70c1ddd | 10 | class UVC { |
| _seminahn | 1:2594a70c1ddd | 11 | private: |
| _seminahn | 1:2594a70c1ddd | 12 | std_msgs::Bool* msg; |
| _seminahn | 1:2594a70c1ddd | 13 | |
| _seminahn | 1:2594a70c1ddd | 14 | //const variables |
| _seminahn | 1:2594a70c1ddd | 15 | const int _On = 1; |
| _seminahn | 1:2594a70c1ddd | 16 | const int _Off = 0; |
| _seminahn | 1:2594a70c1ddd | 17 | const bool _Run = true; |
| _seminahn | 1:2594a70c1ddd | 18 | const bool _Stop = false; |
| _seminahn | 1:2594a70c1ddd | 19 | |
| _seminahn | 1:2594a70c1ddd | 20 | DigitalOut uvc_p; |
| _seminahn | 1:2594a70c1ddd | 21 | DigitalOut uvc_n; |
| _seminahn | 1:2594a70c1ddd | 22 | |
| _seminahn | 1:2594a70c1ddd | 23 | public: |
| _seminahn | 1:2594a70c1ddd | 24 | UVC(PinName uvc_pin_p, PinName uvc_pin_n): |
| _seminahn | 1:2594a70c1ddd | 25 | uvc_p(uvc_pin_p,_Off),uvc_n(uvc_pin_n,_Off) |
| _seminahn | 1:2594a70c1ddd | 26 | { |
| _seminahn | 1:2594a70c1ddd | 27 | Init(); |
| _seminahn | 1:2594a70c1ddd | 28 | } |
| _seminahn | 1:2594a70c1ddd | 29 | void InitUVC(); |
| _seminahn | 1:2594a70c1ddd | 30 | void Init(); |
| _seminahn | 1:2594a70c1ddd | 31 | void ControlUVC(); |
| _seminahn | 1:2594a70c1ddd | 32 | void setMsg(std_msgs::Bool* msg); |
| _seminahn | 1:2594a70c1ddd | 33 | void control(); |
| _seminahn | 1:2594a70c1ddd | 34 | }; |
| _seminahn | 1:2594a70c1ddd | 35 | |
| _seminahn | 1:2594a70c1ddd | 36 | #endif |
| _seminahn | 1:2594a70c1ddd | 37 | // EOF |