資源簡介
基于角速度環、角度環和速度環的串級控制方案,使小車能夠在電磁賽道上面平穩運行,還有環島識別程序,可靠穩定。程序在中斷里實現周期控制,速度控制100ms,角度控制10ms,角速度控制2ms。

代碼片段和文件信息
/******************************************************************************
*
*?Freescale?Semiconductor?Inc.
*?(c)?Copyright?2013?Freescale?Semiconductor?Inc.
*?ALL?RIGHTS?RESERVED.
*
***************************************************************************
*
*?THIS?SOFTWARE?IS?PROVIDED?BY?FREESCALE?“AS?IS“?AND?ANY?EXPRESSED?OR
*?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE?IMPLIED?WARRANTIES
*?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.
*?IN?NO?EVENT?SHALL?FREESCALE?OR?ITS?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT
*?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES
*?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR
*?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)
*?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT
*?STRICT?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING
*?IN?ANY?WAY?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF
*?THE?POSSIBILITY?OF?SUCH?DAMAGE.
*
***************************************************************************//*!
*
*?@file?assert.c
*
*?@author?Freescale
*
*?@version?0.0.1
*
*?@date?Jun.?25?2013
*
*?@brief?provide?macro?for?software?assertions.?
*
*???????ASSERT?macro?defined?in?assert.h?calls?assert_failed().
*******************************************************************************/
#include?“common.h“
const?char?ASSERT_FAILED_STR[]?=?“Assertion?failed?in?%s?at?line?%d\n“;
/********************************************************************/
void
assert_failed(char?*file?int?line)
{
????int?i;
????
????//printf(ASSERT_FAILED_STR?file?line);
????while?(1)
????{
//????????platform_led_display(0xFF);
????????for?(i?=?100000;?i;?i--)?;
//????????platform_led_display(0x00);
????????for?(i?=?100000;?i;?i--)?;
????}
}
/********************************************************************/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????90145??2018-01-15?20:45??29\LQ_KEAZ128demo.ewd
?????文件??????60841??2018-06-10?10:34??29\LQ_KEAZ128demo.ewp
?????文件?????141855??2018-06-10?10:34??29\LQ_KEAZ128demo.ewt
?????文件????????168??2017-11-05?12:00??29\LQ_KEAZ128demo.eww
?????文件???????1947??2017-11-05?11:48??29\src\common\assert.c
?????文件???????1789??2014-03-13?17:47??29\src\common\assert.h
?????文件???????3226??2017-11-05?11:46??29\src\common\common.h
?????文件???????2019??2017-11-05?12:20??29\src\common\io.c
?????文件???????1684??2015-06-03?14:58??29\src\common\io.h
?????文件???????7392??2014-03-13?17:47??29\src\common\memtest.c
?????文件???????1833??2014-03-13?17:47??29\src\common\memtest.h
?????文件??????14836??2017-11-22?17:34??29\src\common\printf.c
?????文件???????3829??2014-03-13?17:47??29\src\common\queue.c
?????文件???????2034??2014-03-13?17:47??29\src\common\queue.h
?????文件???????3851??2014-03-13?17:47??29\src\common\startup.c
?????文件???????1596??2014-03-13?17:47??29\src\common\startup.h
?????文件???????2426??2014-03-13?17:47??29\src\common\stdlib.h
?????文件???????1976??2014-03-13?17:47??29\src\common\typedef.h
?????文件???????9477??2014-03-13?17:47??29\src\common\uif.c
?????文件???????4099??2014-03-13?17:47??29\src\common\uif.h
?????文件???????1914??2018-03-18?10:07??29\src\config?files\128KB_Pflash.icf
?????文件???????2081??2014-05-15?21:27??29\src\config?files\16KB_RAM.icf
?????文件???????2039??2014-12-04?17:07??29\src\config?files\KEAZ128xxx4.icf
?????文件???????3373??2015-06-02?23:19??29\src\cpu\arm_cm0.c
?????文件???????2928??2015-06-03?14:28??29\src\cpu\arm_cm0.h
?????文件????????601??2014-03-17?08:42??29\src\cpu\crt0.s
?????文件???????1156??2017-11-05?12:20??29\src\cpu\isr.h
?????文件???????3572??2017-11-07?10:25??29\src\cpu\start.c
?????文件???????1451??2014-03-13?17:47??29\src\cpu\start.h
?????文件???????8161??2017-11-06?10:57??29\src\cpu\sysinit.c
............此處省略107個文件信息
評論
共有 條評論