增加云台相关指令
This commit is contained in:
24
test.c
24
test.c
@@ -5,6 +5,8 @@
|
||||
#include "by_cmd.h"
|
||||
#include "logc/log.h"
|
||||
|
||||
#include "by_serial.h"
|
||||
|
||||
char test_data[] = "hello world\r\n";
|
||||
char buff[20] = {0};
|
||||
|
||||
@@ -13,24 +15,10 @@ uint32_t buff_temp[20];
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// by_serial_t serial;
|
||||
// by_serial_init(&serial, "/dev/ttyTHS0");
|
||||
|
||||
// while (1) {
|
||||
// // by_serial_write(&serial, test_data, sizeof(test_data) - 1);
|
||||
// // if (0 < by_serial_read(&serial, buff, 1)) {
|
||||
// // printf("%c", buff[0]);
|
||||
// // }
|
||||
// if (by_serial_get_used_buffer_len(&serial) > 1) {
|
||||
// by_serial_read(&serial, buff, 6);
|
||||
// }
|
||||
// printf("used buff len %d\r\n", by_serial_get_used_buffer_len(&serial));
|
||||
// sleep(1);
|
||||
// }
|
||||
|
||||
by_cmd_init();
|
||||
|
||||
by_cmd_send_distance_x(20.0, 1000);
|
||||
if (by_cmd_init()) {
|
||||
log_error("Program exits abnormally");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user