Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Hideaki Tai
/
omni_main
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0f5b5594
authored
Jan 16, 2019
by
Hideaki Tai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add README
parent
9b0c896e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
README.md
+38
-0
No files found.
README.md
0 → 100644
View file @
0f5b5594
## ビルド
Visual Studio Code をインストールし、PlatformIO IDE のプラグインをインストールしてください。
## 速度・加減速を設定する
調整が必要になってくるのは、速度・加速度のパラメータぐらいかと思いますので、そこだけ記載します。
`src/main.cpp`
57行目 を変更することで変えられます。
```
C++
whill.speed(SPEEDMODE::RS232C, 60, 90, 90, 60, 90, 90, 60, 90, 90); // for new whill firmware
```
順に、前進の速度・加速度・減速度、後進の速度・加速度・減速度、回転の速度・加速度・減速度、です。
速度については、値が1上がると0.1
\[
km/s
\]
、速度が上がります。
また、ライブラリ内部で下記のように制限をかけています。
速度は60 (6km/s) 以上に上げると、電源電圧が下がったときに速度制限をWHILLのコントローラ内部でかけてしまうようになるので、60以下で使ってほしいとのことです。
```
C++
bool speed(SPEEDMODE mode, char f_m1, char f_a1, char f_d1, char r_m1, char r_a1, char r_d1, char t_m1, char t_a1, char t_d1)
{
f_m1 = constrain(f_m1, 8, 60); // less than 60 is better
f_a1 = constrain(f_a1, 10, 90);
f_d1 = constrain(f_d1, 40, 160);
r_m1 = constrain(r_m1, 8, 60); // less than 60 is better
r_a1 = constrain(r_a1, 10, 90);
r_d1 = constrain(r_d1, 40, 160);
t_m1 = constrain(t_m1, 8, 60); // less than 60 is better
t_a1 = constrain(t_a1, 10, 90);
t_d1 = constrain(t_d1, 40, 160);
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment