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 QEI mbed-rtos
Revision 15:035e2ea34aef, committed 2020-10-20
- Comitter:
- takuma1
- Date:
- Tue Oct 20 04:28:59 2020 +0000
- Parent:
- 14:02411880ffb9
- Commit message:
- DCmotor
Changed in this revision
diff -r 02411880ffb9 -r 035e2ea34aef Hbridge.cpp
--- a/Hbridge.cpp Tue Mar 12 04:32:22 2013 +0000
+++ b/Hbridge.cpp Tue Oct 20 04:28:59 2020 +0000
@@ -32,12 +32,16 @@
IN.mode = 0; // モードを0にする
}else if( IN.mode==1 ){ // モードが1のとき
if( IN.fReverse==0 ){ // モータの回転が順方向のとき
- pwm_fwdIN = 1; pwm_rvsIN = 0; // fwdINのみオンにする
+ pwm_fwdIN = 1;
+ pwm_rvsIN = 0; // fwdINのみオンにする
}else{ // モータの回転が逆方向のとき
- pwm_fwdIN = 0; pwm_rvsIN = 1; // rvsINのみオンにする
+ pwm_fwdIN = 0;
+ pwm_rvsIN = 1; // rvsINのみオンにする
}
IN.fwdIN_us = IN.duty*1000000/PWM_FREQ; // fwdINをオンする時間幅を計算 ON time of pwm
- if( IN.fwdIN_us < TMIN ){ IN.fwdIN_us=TMIN;} // 時間幅が負のときはTMINにする
+ if( IN.fwdIN_us < TMIN ){
+ IN.fwdIN_us=TMIN;
+ } // 時間幅が負のときはTMINにする
pwm.attach_us(&pwm_out, IN.fwdIN_us); // fwdINをオンする時間幅経過後にタイムアウトでこの関数自身をコール setup pwmU to call pwm_out after t [us]
IN.rvsIN_us = 1000000/PWM_FREQ -IN.fwdIN_us; // rvsINをオンする時間幅を計算 OFF time of pwm
if( IN.rvsIN_us < TMIN ){ IN.rvsIN_us=TMIN;} // 時間幅が負のときはTMINにする
diff -r 02411880ffb9 -r 035e2ea34aef mbed-rtos.lib --- a/mbed-rtos.lib Tue Mar 12 04:32:22 2013 +0000 +++ b/mbed-rtos.lib Tue Oct 20 04:28:59 2020 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#9654a71f5a90 +http://mbed.org/users/mbed_official/code/mbed-rtos/#015df9e602b6
diff -r 02411880ffb9 -r 035e2ea34aef mbed.bld --- a/mbed.bld Tue Mar 12 04:32:22 2013 +0000 +++ b/mbed.bld Tue Oct 20 04:28:59 2020 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e2ed12d17f06 \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/dc225afb6914 \ No newline at end of file