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: mbed X_NUCLEO_PLC01A1 ros_lib_melodic
lamp_module.cpp@3:ea5cfd721b53, 2020-08-30 (annotated)
- Committer:
- yamadola
- Date:
- Sun Aug 30 06:39:43 2020 +0000
- Revision:
- 3:ea5cfd721b53
- Parent:
- 1:ef4b86795d79
This code includes all functions for Amabie.; However, I have never debugged it with the real body.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| yamadola | 1:ef4b86795d79 | 1 | #include "lamp_module.h" |
| yamadola | 1:ef4b86795d79 | 2 | |
| yamadola | 1:ef4b86795d79 | 3 | LampModule::LampModule(uint8_t LampPin, PLCController *pPlcController) |
| yamadola | 1:ef4b86795d79 | 4 | :_Lamp(LampPin, pPlcController), _uvState(0){} |
| yamadola | 1:ef4b86795d79 | 5 | |
| yamadola | 1:ef4b86795d79 | 6 | void LampModule::init(){ |
| yamadola | 1:ef4b86795d79 | 7 | } |
| yamadola | 1:ef4b86795d79 | 8 | |
| yamadola | 1:ef4b86795d79 | 9 | void LampModule::setUVPower(uint8_t pow){ |
| yamadola | 1:ef4b86795d79 | 10 | if(pow){ |
| yamadola | 1:ef4b86795d79 | 11 | _Lamp.On(); |
| yamadola | 1:ef4b86795d79 | 12 | _uvState = 1; |
| yamadola | 1:ef4b86795d79 | 13 | }else{ |
| yamadola | 1:ef4b86795d79 | 14 | _Lamp.Off(); |
| yamadola | 1:ef4b86795d79 | 15 | _uvState = 0; |
| yamadola | 1:ef4b86795d79 | 16 | } |
| yamadola | 1:ef4b86795d79 | 17 | } |