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.
Dependencies: RemoteIR m3pi mbed-rtos mbed
LightCommunication.h@7:1d77c7e0208c, 2017-05-10 (annotated)
- Committer:
- Kristof@LAPTOP-FT09DA9V
- Date:
- Wed May 10 09:29:05 2017 +0200
- Revision:
- 7:1d77c7e0208c
- Parent:
- 5:5d2beac511c1
- Child:
- 9:8c5229dfab82
added communication
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 1 | // |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 2 | // Created by Kristof on 5/9/2017. |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 3 | // |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 4 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 5 | #ifndef PROJ2_LIGHTCOMMUNICATION_H |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 6 | #define PROJ2_LIGHTCOMMUNICATION_H |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 7 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 8 | #include <cstdint> |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 9 | #include "stdio.h" |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 10 | #include "rtos.h" |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 11 | #include "ReceiverIR.h" |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 12 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 13 | #define OWN_ID 1 |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 14 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 15 | class LightCommunication { |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 16 | public: |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 17 | LightCommunication(); |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 18 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 19 | virtual ~LightCommunication(); |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 20 | |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 21 | void getSerial(char * buf); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 22 | void getIRStyle(uint8_t* buf); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 23 | void receiveData(); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 24 | float toFloat(int8_t); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 25 | float right,left; |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 26 | bool needsToStop(); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 27 | Serial device; |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 28 | ReceiverIR ir_rx; |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 29 | Mutex mut; |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 30 | float getRight(float); |
| Kristof@LAPTOP-FT09DA9V | 7:1d77c7e0208c | 31 | float getLeft(float); |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 32 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 33 | }; |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 34 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 35 | |
| Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 36 | #endif //PROJ2_LIGHTCOMMUNICATION_H |
