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: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
devices/Device.cpp@0:2279181caaa1, 2014-10-25 (annotated)
- Committer:
- TimWoo
- Date:
- Sat Oct 25 00:11:12 2014 +0000
- Revision:
- 0:2279181caaa1
Initial Version,; Bare classes made for the main application and the devices that will be controlled.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TimWoo | 0:2279181caaa1 | 1 | #include "Device.h" |
| TimWoo | 0:2279181caaa1 | 2 | #include "../MODSERIAL/MODSERIAL.h" |
| TimWoo | 0:2279181caaa1 | 3 | |
| TimWoo | 0:2279181caaa1 | 4 | using namespace AjK; |
| TimWoo | 0:2279181caaa1 | 5 | |
| TimWoo | 0:2279181caaa1 | 6 | Device::Device(MODSERIAL* ms) |
| TimWoo | 0:2279181caaa1 | 7 | :_ms(ms), |
| TimWoo | 0:2279181caaa1 | 8 | _msg(0) |
| TimWoo | 0:2279181caaa1 | 9 | { |
| TimWoo | 0:2279181caaa1 | 10 | |
| TimWoo | 0:2279181caaa1 | 11 | } |
| TimWoo | 0:2279181caaa1 | 12 | |
| TimWoo | 0:2279181caaa1 | 13 | Device::~Device() |
| TimWoo | 0:2279181caaa1 | 14 | { |
| TimWoo | 0:2279181caaa1 | 15 | delete _ms; |
| TimWoo | 0:2279181caaa1 | 16 | } |
| TimWoo | 0:2279181caaa1 | 17 | |
| TimWoo | 0:2279181caaa1 | 18 | void Device::sendMessage() |
| TimWoo | 0:2279181caaa1 | 19 | { |
| TimWoo | 0:2279181caaa1 | 20 | if(sizeof(_msg)) { |
| TimWoo | 0:2279181caaa1 | 21 | _ms->printf("%s;", _msg); |
| TimWoo | 0:2279181caaa1 | 22 | } |
| TimWoo | 0:2279181caaa1 | 23 | } |
