generated from sirlilpanda/kicad-project-template-actionless
Got controller connected and working, buttons broken
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
idf_component_register(SRCS "wacky_bully.c"
|
||||
REQUIRES "drv8701" freertos
|
||||
REQUIRES bt "drv8701" freertos xbox_controller
|
||||
INCLUDE_DIRS ".")
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "freertos/idf_additions.h"
|
||||
#include "portmacro.h"
|
||||
#include "soc/gpio_num.h"
|
||||
#include "xbox_controller.h"
|
||||
|
||||
|
||||
drv8701_task_config_t motor1 = {
|
||||
@@ -30,6 +31,8 @@ void app_main(void)
|
||||
{
|
||||
printf("Starting\n");
|
||||
|
||||
init_controller();
|
||||
|
||||
xTaskCreate(drv8701_task, "Motor1 Task", 2048, (void *)&motor1, 4, NULL);
|
||||
xTaskCreate(drv8701_task, "Motor2 Task", 2048, (void *)&motor2, 4, NULL);
|
||||
xTaskCreate(drv8701_task, "Motor3 Task", 2048, (void *)&motor3, 4, NULL);
|
||||
@@ -38,6 +41,7 @@ void app_main(void)
|
||||
vTaskDelay(500 / portTICK_PERIOD_MS);
|
||||
float motor1_vel = 0.0;
|
||||
while(true) {
|
||||
print_state();
|
||||
motor1_vel = motor1_vel + 0.1;
|
||||
if (motor1_vel > 1.0)
|
||||
motor1_vel = -1.0;
|
||||
|
||||
Reference in New Issue
Block a user