Ian Wolf
/
InjectorValveFourthMicro1
Fork of InjectorValveFourthMicro by
Revision 4:ffadadb4c946, committed 2017-09-07
- Comitter:
- iwolf32
- Date:
- Thu Sep 07 20:56:19 2017 +0000
- Parent:
- 3:0f441a513e2c
- Commit message:
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 07 20:31:32 2017 +0000 +++ b/main.cpp Thu Sep 07 20:56:19 2017 +0000 @@ -25,9 +25,11 @@ while(1){ - openvalue=(((1/frequency)*dutycycle/100)); + str.clear(); + openvalue=(((1/frequency)*(dutycycle/100))); offvalue=(1/frequency)-openvalue; - if (dutycycle!=0){ + if (dutycycle!=0){ + str.clear(); injector.on(); wait(openvalue); injector.off();