elec350

Dependencies:   mbed

Fork of elec350 by Bob Merrison-Hort

Revision:
11:4685f33a2468
Parent:
10:021f19a9861f
Child:
12:ae626e46b996
--- a/soft_pwm.cpp	Wed Oct 21 19:52:30 2015 +0000
+++ b/soft_pwm.cpp	Wed Oct 21 20:01:11 2015 +0000
@@ -17,6 +17,16 @@
     this->dutyCycle = newDutyCycle;
 }
 
+float SoftPwm::getDutyCycle()
+{
+    return this->dutyCycle;
+}
+
+float SoftPwm::getPeriod()
+{
+    return this->period;
+}
+
 bool SoftPwm::isOn()
 {
     float phase = this->timer.read() / this->period;