mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-10 02:23:21 +00:00
pwm
This commit is contained in:
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
0
ESP-IDF_Robot/build/.ninja_lock
Normal file
@@ -1 +1 @@
|
|||||||
ref: refs/heads/main
|
4c2820d377d1375e787bcef612f0c32c1427d183
|
||||||
|
@@ -18,7 +18,7 @@ set(HEAD_HASH)
|
|||||||
file(READ "/home/alex/github/ESP-Nodes/ESP-IDF_Robot/build/CMakeFiles/git-data/HEAD" HEAD_CONTENTS LIMIT 1024)
|
file(READ "/home/alex/github/ESP-Nodes/ESP-IDF_Robot/build/CMakeFiles/git-data/HEAD" HEAD_CONTENTS LIMIT 1024)
|
||||||
|
|
||||||
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
|
||||||
set(GIT_DIR "/home/alex/github/ESP-Nodes/.git")
|
set(GIT_DIR "/home/alex/esp/v5.4.1/esp-idf/.git")
|
||||||
# handle git-worktree
|
# handle git-worktree
|
||||||
if(EXISTS "${GIT_DIR}/commondir")
|
if(EXISTS "${GIT_DIR}/commondir")
|
||||||
file(READ "${GIT_DIR}/commondir" GIT_DIR_NEW LIMIT 1024)
|
file(READ "${GIT_DIR}/commondir" GIT_DIR_NEW LIMIT 1024)
|
||||||
|
@@ -1 +1 @@
|
|||||||
c678bd753406bcff764c3d71ada9fb5318244f4f
|
4c2820d377d1375e787bcef612f0c32c1427d183
|
||||||
|
@@ -104,18 +104,19 @@ static void update_pwm (int rc_x, int rc_y) {
|
|||||||
m.motor4_rpm_pcm = 0;
|
m.motor4_rpm_pcm = 0;
|
||||||
}
|
}
|
||||||
// Forward & Turn Left
|
// Forward & Turn Left
|
||||||
if (x >= 1500 && y >= -8190 && y < 500) {
|
else if (x >= 1500 && y >= -8190 && y < 500) {
|
||||||
m.motor1_rpm_pcm = x;
|
if (y >= -8190 && y < 500) {
|
||||||
m.motor2_rpm_pcm = 8190;
|
m.motor1_rpm_pcm = x;
|
||||||
m.motor3_rpm_pcm = 0;
|
m.motor2_rpm_pcm = 8190;
|
||||||
m.motor4_rpm_pcm = 0;
|
m.motor3_rpm_pcm = 0;
|
||||||
}
|
m.motor4_rpm_pcm = 0;
|
||||||
// Forward & Turn Right
|
}
|
||||||
if (y >= 1500 && x >= 1000 && x < 8190) {
|
else if (y >= 1500) {
|
||||||
m.motor1_rpm_pcm = 8190;
|
m.motor1_rpm_pcm = 8190;
|
||||||
m.motor2_rpm_pcm = x;
|
m.motor2_rpm_pcm = x;
|
||||||
m.motor3_rpm_pcm = 0;
|
m.motor3_rpm_pcm = 0;
|
||||||
m.motor4_rpm_pcm = 0;
|
m.motor4_rpm_pcm = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m.motor1_rpm_pcm = 0;
|
m.motor1_rpm_pcm = 0;
|
||||||
|
Reference in New Issue
Block a user