|
|
@ -90,12 +90,12 @@ void motor_drive_set_packages_ctr(double position) { |
|
|
|
// uint8_t strbuffer[20] = {0}; |
|
|
|
|
|
|
|
position_int = position * 100; |
|
|
|
ESP_LOGI(MOTOR_DRIVE, "%d", position_int); |
|
|
|
// ESP_LOGI(MOTOR_DRIVE, "%d", position_int); |
|
|
|
|
|
|
|
if (position_int != 0) { |
|
|
|
while ((position_int / 0XFF) > 0) { |
|
|
|
position_remainder = position_int & 0XFF; |
|
|
|
ESP_LOGI(MOTOR_DRIVE, "position_remainder :%d", position_remainder); |
|
|
|
// ESP_LOGI(MOTOR_DRIVE, "position_remainder :%d", position_remainder); |
|
|
|
buffer[position_buffer_size] = position_remainder; |
|
|
|
position_buffer_size += 1; |
|
|
|
position_int = position_int >> 8; |
|
|
|