Skip to content

Commit 831fe3c

Browse files
authored
右モータの回転方向を修正 (#95)
1 parent 9863ba3 commit 831fe3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/drivers/rtmouse_dev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ static void set_motor_freq(int freq, const int dev_side)
264264
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_L_BASE);
265265
} else if (dev_side == DEV_RIGHT) {
266266
motor_r_freq_is_positive = 1;
267-
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
267+
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
268268
}
269269
} else {
270270
if (dev_side == DEV_LEFT) {
@@ -273,7 +273,7 @@ static void set_motor_freq(int freq, const int dev_side)
273273
freq = -freq;
274274
} else if (dev_side == DEV_RIGHT) {
275275
motor_r_freq_is_positive = 0;
276-
rpi_gpio_set32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
276+
rpi_gpio_clear32(RPI_GPIO_P2MASK, 1 << MOTDIR_R_BASE);
277277
freq = -freq;
278278
}
279279
}

0 commit comments

Comments
 (0)