mirror of
https://github.com/modelec/odo_STM32.git
synced 2026-03-18 21:30:38 +01:00
value for new wheel
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
#define MAX_WAYPOINTS 16
|
||||
#define PWM_MAX 626.0f
|
||||
#define ENCODER_RES 2400.0f
|
||||
#define WHEEL_DIAMETER 0.081f
|
||||
#define WHEEL_DIAMETER 0.09735f
|
||||
#define WHEEL_RADIUS (WHEEL_DIAMETER/2.0f)
|
||||
#define WHEEL_BASE 0.287f
|
||||
#define WHEEL_BASE 0.2872f
|
||||
#define WHEEL_BASE_2 (WHEEL_BASE/2.0f)
|
||||
#define V_MAX 0.643f // m/s
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ void USB_Comm_OnReceive(uint8_t* Buf, uint32_t Len) {
|
||||
usb_rx_index = 0;
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
||||
// Répondre via USB
|
||||
static void USB_Comm_Send(const char* message) {
|
||||
@@ -288,7 +289,9 @@ void USB_Comm_Process(void) {
|
||||
int val = atoi(strtok(NULL, ";"));
|
||||
Comm_StartOdometry(val != 0);
|
||||
|
||||
USB_Comm_Send("OK;START\n");
|
||||
char msg[64];
|
||||
snprintf(msg, sizeof(msg), "OK;START;%d\n", val != 0);
|
||||
USB_Comm_Send(msg);
|
||||
}
|
||||
else if (strcmp(token, "MOTOR") == 0) {
|
||||
float left = atof(strtok(NULL, ";"));
|
||||
|
||||
Reference in New Issue
Block a user