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.
Fork of TLE5206_lib by
Diff: TLE5206_lib.cpp
- Revision:
- 2:610e4177e391
- Parent:
- 1:1117196d767b
- Child:
- 3:fa6c021ddefe
diff -r 1117196d767b -r 610e4177e391 TLE5206_lib.cpp
--- a/TLE5206_lib.cpp Wed Mar 13 18:33:48 2019 +0000
+++ b/TLE5206_lib.cpp Mon Mar 18 08:25:23 2019 +0000
@@ -12,12 +12,18 @@
if (duty_cycle < -1){
this->pwmIN1 = 0.99;
this->pwmIN2 = 0.0;
+ }else if (duty_cycle < -0.4){
+ this->pwmIN1 = -0.4;
+ this->pwmIN2 = 0.0;
}else if (duty_cycle < 0){
this->pwmIN1 = -duty_cycle;
this->pwmIN2 = 0.0;
- }else if (duty_cycle < 1){
- this->pwmIN1 = 0.0;
- this->pwmIN2 = duty_cycle;
+ }else if (duty_cycle < 0.4){
+ this.pwmIN1 = 0.0;
+ this.pwmIN2 = 0.4;
+ }else if (dutycycle < 1){
+ this.pwmIN1 = 0.0;
+ this.pwmIN2 = duty_cycle;
}else {
this->pwmIN1 = 0.0;
this->pwmIN2 = 0.99;
