Skip to content

Commit

Permalink
右モータの回転方向を修正 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeKato authored Nov 26, 2024
1 parent 9863ba3 commit 831fe3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/rtmouse_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void set_motor_freq(int freq, const int dev_side)
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_L_BASE);
} else if (dev_side == DEV_RIGHT) {
motor_r_freq_is_positive = 1;
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
}
} else {
if (dev_side == DEV_LEFT) {
Expand All @@ -273,7 +273,7 @@ static void set_motor_freq(int freq, const int dev_side)
freq = -freq;
} else if (dev_side == DEV_RIGHT) {
motor_r_freq_is_positive = 0;
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
freq = -freq;
}
}
Expand Down

0 comments on commit 831fe3c

Please sign in to comment.