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: TS_DISCO_F746NG mbed BufferedSerial LCD_DISCO_F746NG mbed-rtos Trigo BSP_DISCO_F746NG
Diff: Motor.cpp
- Revision:
- 7:d51b8b7f9960
- Parent:
- 0:88706d6abbf7
- Child:
- 8:7788cc96e8ad
--- a/Motor.cpp Fri Nov 25 10:43:19 2016 +0000
+++ b/Motor.cpp Mon Nov 28 15:36:07 2016 +0000
@@ -4,8 +4,8 @@
void Motor::StartMotor_Scan()
{
- int period=40; //Frequency 25KHz
- int pulsewidth=24; //Duty cycle 60%
+ uint8_t period=40; //Frequency 25KHz
+ uint8_t pulsewidth=32; //Duty cycle 80%
period_us(period);
pulsewidth_us(pulsewidth);
@@ -14,8 +14,8 @@
void Motor::StopMotor_Scan()
{
- int period=40; //Frequency 0Hz
- int pulsewidth=0; //Duty cycle 0%
+ uint8_t period=40; //Frequency 0Hz
+ uint8_t pulsewidth=0; //Duty cycle 0%
period_us(period);
pulsewidth_us(pulsewidth);