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@1:76cff32344d1, 2017-05-09 (annotated)
- Committer:
- Kristof@LAPTOP-FT09DA9V.home
- Date:
- Tue May 09 23:02:13 2017 +0200
- Revision:
- 1:76cff32344d1
- Child:
- 2:70240992e869
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.home | 1:76cff32344d1 | 21 | static char * getSerial(); |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 22 | static uint8_t * getIRStyle(); |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 23 | static void receiveData(); |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 24 | static float toFloat(int8_t); |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 25 | static float right,left; |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 26 | static bool needsToStop(); |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 27 | static Serial * device; |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 28 | static ReceiverIR * ir_rx; |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 29 | static Mutex mut; |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 30 | static float getRight(float) const; |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 31 | |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 32 | static float getLeft(float) const; |
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 | |
Kristof@LAPTOP-FT09DA9V.home | 1:76cff32344d1 | 37 | #endif //PROJ2_LIGHTCOMMUNICATION_H |