Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
b5d886f8
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b5d886f8
编写于
2月 05, 2019
作者:
X
Xiangquan Xiao
提交者:
GitHub
2月 05, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Canbus: Migrate to cyber file util. (#6748)
上级
177f1dc9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
19 addition
and
14 deletion
+19
-14
modules/canbus/tools/canbus_tester.cc
modules/canbus/tools/canbus_tester.cc
+4
-4
modules/canbus/vehicle/ge3/ge3_controller_test.cc
modules/canbus/vehicle/ge3/ge3_controller_test.cc
+4
-2
modules/canbus/vehicle/gem/gem_controller_test.cc
modules/canbus/vehicle/gem/gem_controller_test.cc
+2
-2
modules/canbus/vehicle/lincoln/lincoln_controller_test.cc
modules/canbus/vehicle/lincoln/lincoln_controller_test.cc
+2
-2
modules/canbus/vehicle/transit/transit_controller_test.cc
modules/canbus/vehicle/transit/transit_controller_test.cc
+2
-2
modules/canbus/vehicle/wey/wey_controller_test.cc
modules/canbus/vehicle/wey/wey_controller_test.cc
+5
-2
未找到文件。
modules/canbus/tools/canbus_tester.cc
浏览文件 @
b5d886f8
...
...
@@ -16,14 +16,14 @@
#include <thread>
#include "cyber/common/file.h"
#include "cyber/common/log.h"
#include "cyber/cyber.h"
#include "cyber/time/rate.h"
#include "cyber/common/log.h"
#include "gflags/gflags.h"
#include "modules/canbus/common/canbus_gflags.h"
#include "modules/common/adapters/adapter_gflags.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
using
apollo
::
control
::
ControlCommand
;
...
...
@@ -44,8 +44,8 @@ int main(int32_t argc, char **argv) {
node_
->
CreateWriter
<
ControlCommand
>
(
FLAGS_control_command_topic
);
ControlCommand
control_cmd
;
if
(
!
apollo
::
c
ommon
::
util
::
GetProtoFromFile
(
FLAGS_canbus_test_file
,
&
control_cmd
))
{
if
(
!
apollo
::
c
yber
::
common
::
GetProtoFromFile
(
FLAGS_canbus_test_file
,
&
control_cmd
))
{
AERROR
<<
"failed to load file: "
<<
FLAGS_canbus_test_file
;
return
-
1
;
}
...
...
modules/canbus/vehicle/ge3/ge3_controller_test.cc
浏览文件 @
b5d886f8
...
...
@@ -15,12 +15,14 @@
*****************************************************************************/
#include "modules/canbus/vehicle/ge3/ge3_controller.h"
#include <string>
#include "cyber/common/file.h"
#include "gtest/gtest.h"
#include "modules/canbus/proto/canbus_conf.pb.h"
#include "modules/canbus/proto/chassis.pb.h"
#include "modules/canbus/vehicle/ge3/ge3_message_manager.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
#include "modules/drivers/canbus/can_comm/can_sender.h"
...
...
@@ -36,7 +38,7 @@ class Ge3ControllerTest : public ::testing::Test {
virtual
void
SetUp
()
{
std
::
string
canbus_conf_file
=
"modules/canbus/testdata/conf/ge3_canbus_conf_test.pb.txt"
;
::
apollo
::
common
::
util
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
cyber
::
common
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
params_
=
canbus_conf_
.
vehicle_parameter
();
}
...
...
modules/canbus/vehicle/gem/gem_controller_test.cc
浏览文件 @
b5d886f8
...
...
@@ -18,12 +18,12 @@
#include <string>
#include "cyber/common/file.h"
#include "gtest/gtest.h"
#include "modules/canbus/proto/canbus_conf.pb.h"
#include "modules/canbus/proto/chassis.pb.h"
#include "modules/canbus/vehicle/gem/gem_message_manager.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
#include "modules/drivers/canbus/can_comm/can_sender.h"
...
...
@@ -39,7 +39,7 @@ class GemControllerTest : public ::testing::Test {
virtual
void
SetUp
()
{
std
::
string
canbus_conf_file
=
"/apollo/modules/canbus/testdata/conf/gem_canbus_conf_test.pb.txt"
;
::
apollo
::
common
::
util
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
cyber
::
common
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
params_
=
canbus_conf_
.
vehicle_parameter
();
}
...
...
modules/canbus/vehicle/lincoln/lincoln_controller_test.cc
浏览文件 @
b5d886f8
...
...
@@ -16,6 +16,7 @@
#include "modules/canbus/vehicle/lincoln/lincoln_controller.h"
#include "cyber/common/file.h"
#include "gtest/gtest.h"
#include "modules/canbus/proto/canbus_conf.pb.h"
...
...
@@ -23,7 +24,6 @@
#include "modules/canbus/proto/chassis_detail.pb.h"
#include "modules/canbus/vehicle/lincoln/lincoln_message_manager.h"
#include "modules/common/proto/vehicle_signal.pb.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
#include "modules/drivers/canbus/can_comm/can_sender.h"
...
...
@@ -40,7 +40,7 @@ class LincolnControllerTest : public ::testing::Test {
virtual
void
SetUp
()
{
std
::
string
canbus_conf_file
=
"/apollo/modules/canbus/testdata/conf/mkz_canbus_conf_test.pb.txt"
;
c
ommon
::
util
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
c
yber
::
common
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
params_
=
canbus_conf_
.
vehicle_parameter
();
control_cmd_
.
set_throttle
(
20.0
);
control_cmd_
.
set_brake
(
0.0
);
...
...
modules/canbus/vehicle/transit/transit_controller_test.cc
浏览文件 @
b5d886f8
...
...
@@ -18,12 +18,12 @@
#include <string>
#include "cyber/common/file.h"
#include "gtest/gtest.h"
#include "modules/canbus/proto/canbus_conf.pb.h"
#include "modules/canbus/proto/chassis.pb.h"
#include "modules/canbus/vehicle/transit/transit_message_manager.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
#include "modules/drivers/canbus/can_comm/can_sender.h"
...
...
@@ -39,7 +39,7 @@ class TransitControllerTest : public ::testing::Test {
virtual
void
SetUp
()
{
std
::
string
canbus_conf_file
=
"/apollo/modules/canbus/testdata/conf/transit_canbus_conf_test.pb.txt"
;
::
apollo
::
common
::
util
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
cyber
::
common
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
params_
=
canbus_conf_
.
vehicle_parameter
();
}
...
...
modules/canbus/vehicle/wey/wey_controller_test.cc
浏览文件 @
b5d886f8
...
...
@@ -15,12 +15,15 @@
*****************************************************************************/
#include "modules/canbus/vehicle/wey/wey_controller.h"
#include <string>
#include "cyber/common/file.h"
#include "gtest/gtest.h"
#include "modules/canbus/proto/canbus_conf.pb.h"
#include "modules/canbus/proto/chassis.pb.h"
#include "modules/canbus/vehicle/wey/wey_message_manager.h"
#include "modules/common/util/file.h"
#include "modules/control/proto/control_cmd.pb.h"
#include "modules/drivers/canbus/can_comm/can_sender.h"
...
...
@@ -36,7 +39,7 @@ class WeyControllerTest : public ::testing::Test {
virtual
void
SetUp
()
{
std
::
string
canbus_conf_file
=
"modules/canbus/testdata/conf/wey_canbus_conf_test.pb.txt"
;
::
apollo
::
common
::
util
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
cyber
::
common
::
GetProtoFromFile
(
canbus_conf_file
,
&
canbus_conf_
);
params_
=
canbus_conf_
.
vehicle_parameter
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录