Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
673d715f
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,发现更多精彩内容 >>
提交
673d715f
编写于
2月 12, 2019
作者:
A
Aaron Xiao
提交者:
Jiangtao Hu
2月 12, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Drivers: Migrate to cyber file util.
上级
be251cc3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
11 deletion
+14
-11
modules/drivers/canbus/can_client/can_client_tool.cc
modules/drivers/canbus/can_client/can_client_tool.cc
+5
-5
modules/drivers/canbus/sensor_canbus.h
modules/drivers/canbus/sensor_canbus.h
+2
-1
modules/drivers/radar/racobit_radar/racobit_radar_canbus_component.cc
...ers/radar/racobit_radar/racobit_radar_canbus_component.cc
+3
-2
modules/drivers/radar/ultrasonic_radar/ultrasonic_radar_canbus.cc
...drivers/radar/ultrasonic_radar/ultrasonic_radar_canbus.cc
+4
-3
未找到文件。
modules/drivers/canbus/can_client/can_client_tool.cc
浏览文件 @
673d715f
...
...
@@ -19,12 +19,12 @@
#include <memory>
#include <thread>
#include "cyber/common/file.h"
#include "cyber/common/log.h"
#include "gflags/gflags.h"
#include "modules/common/proto/error_code.pb.h"
#include "modules/common/time/time.h"
#include "modules/common/util/factory.h"
#include "modules/common/util/file.h"
#include "modules/drivers/canbus/can_client/can_client.h"
#include "modules/drivers/canbus/can_client/can_client_factory.h"
#include "modules/drivers/canbus/common/byte.h"
...
...
@@ -265,8 +265,8 @@ int main(int32_t argc, char **argv) {
auto
can_client_factory
=
CanClientFactory
::
Instance
();
can_client_factory
->
RegisterCanClients
();
if
(
!
apollo
::
c
ommon
::
util
::
GetProtoFromFile
(
FLAGS_can_client_conf_file_a
,
&
can_client_conf_a
))
{
if
(
!
apollo
::
c
yber
::
common
::
GetProtoFromFile
(
FLAGS_can_client_conf_file_a
,
&
can_client_conf_a
))
{
AERROR
<<
"Unable to load canbus conf file: "
<<
FLAGS_can_client_conf_file_a
;
return
1
;
...
...
@@ -287,8 +287,8 @@ int main(int32_t argc, char **argv) {
CANCardParameter
can_client_conf_b
;
std
::
unique_ptr
<
CanClient
>
client_b
;
if
(
!
FLAGS_only_one_send
)
{
if
(
!
apollo
::
c
ommon
::
util
::
GetProtoFromFile
(
FLAGS_can_client_conf_file_b
,
&
can_client_conf_b
))
{
if
(
!
apollo
::
c
yber
::
common
::
GetProtoFromFile
(
FLAGS_can_client_conf_file_b
,
&
can_client_conf_b
))
{
AERROR
<<
"Unable to load canbus conf file: "
<<
FLAGS_can_client_conf_file_b
;
return
1
;
...
...
modules/drivers/canbus/sensor_canbus.h
浏览文件 @
673d715f
...
...
@@ -28,6 +28,7 @@
#include <utility>
#include <vector>
#include "cyber/common/file.h"
#include "cyber/component/component.h"
#include "modules/common/adapters/adapter_manager.h"
...
...
@@ -109,7 +110,7 @@ class SensorCanbus : public apollo::cyber::Component {
template
<
typename
SensorType
>
bool
SensorCanbus
<
SensorType
>::
Init
()
{
// load conf
if
(
!
c
ommon
::
util
::
GetProtoFromFile
(
FLAGS_sensor_conf_file
,
&
canbus_conf_
))
{
if
(
!
c
yber
::
common
::
GetProtoFromFile
(
FLAGS_sensor_conf_file
,
&
canbus_conf_
))
{
return
OnError
(
"Unable to load canbus conf file: "
+
FLAGS_sensor_conf_file
);
}
...
...
modules/drivers/radar/racobit_radar/racobit_radar_canbus_component.cc
浏览文件 @
673d715f
...
...
@@ -20,6 +20,7 @@
#include "modules/drivers/radar/racobit_radar/racobit_radar_canbus_component.h"
#include "cyber/common/file.h"
#include "modules/common/adapters/adapter_gflags.h"
#include "modules/drivers/proto/racobit_radar.pb.h"
#include "modules/drivers/radar/racobit_radar/racobit_radar_message_manager.h"
...
...
@@ -45,8 +46,8 @@ bool RacobitRadarCanbusComponent::Init() {
ADEBUG
<<
"Canbus_conf:"
<<
racobit_radar_conf_
.
ShortDebugString
();
racobit_radar_writer_
=
node_
->
CreateWriter
<
RacobitRadar
>
(
FLAGS_racobit_radar_topic
);
if
(
!
::
apollo
::
common
::
util
::
GetProtoFromFile
(
ConfigFilePath
(),
&
racobit_radar_conf_
))
{
if
(
!
cyber
::
common
::
GetProtoFromFile
(
ConfigFilePath
(),
&
racobit_radar_conf_
))
{
return
OnError
(
"Unable to load canbus conf file: "
+
ConfigFilePath
()).
ok
();
}
...
...
modules/drivers/radar/ultrasonic_radar/ultrasonic_radar_canbus.cc
浏览文件 @
673d715f
...
...
@@ -14,9 +14,11 @@
* limitations under the License.
*****************************************************************************/
#include "modules/drivers/radar/ultrasonic_radar/ultrasonic_radar_canbus.h"
#include "cyber/common/file.h"
#include "modules/common/util/util.h"
#include "modules/drivers/proto/ultrasonic_radar.pb.h"
#include "modules/drivers/radar/ultrasonic_radar/ultrasonic_radar_canbus.h"
#include "modules/drivers/radar/ultrasonic_radar/ultrasonic_radar_message_manager.h"
/**
...
...
@@ -44,8 +46,7 @@ std::string UltrasonicRadarCanbus::Name() const {
apollo
::
common
::
Status
UltrasonicRadarCanbus
::
Init
(
const
std
::
string
&
config_path
,
const
std
::
shared_ptr
<::
apollo
::
cyber
::
Writer
<
Ultrasonic
>>&
writer
)
{
if
(
!
apollo
::
common
::
util
::
GetProtoFromFile
(
config_path
,
&
ultrasonic_radar_conf_
))
{
if
(
!
cyber
::
common
::
GetProtoFromFile
(
config_path
,
&
ultrasonic_radar_conf_
))
{
return
OnError
(
"Unable to load canbus conf file: "
+
config_path
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录