-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CAN beep #14712
Add CAN beep #14712
Conversation
src/drivers/uavcan/sensors/beep.cpp
Outdated
@@ -0,0 +1,106 @@ | |||
/**************************************************************************** | |||
* | |||
* Copyright (c) 2014, 2015 PX4 Development Team. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (c) 2014, 2015 PX4 Development Team. All rights reserved. | |
* Copyright (c) 2020 PX4 Development Team. All rights reserved. |
UavcanUavcanBeep::init() | ||
{ | ||
/* | ||
* Setup timer and call back function for periodic updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this description to the header file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will modify
src/drivers/uavcan/sensors/beep.hpp
Outdated
@@ -0,0 +1,91 @@ | |||
/**************************************************************************** | |||
* | |||
* Copyright (c) 2014, 2015 PX4 Development Team. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright (c) 2014, 2015 PX4 Development Team. All rights reserved. | |
* Copyright (c) 2020 PX4 Development Team. All rights reserved. |
|
||
/** | ||
* @file beep.hpp | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a description here with @brief
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
/** | ||
* @brief The UavcanUavcanBeep class | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/drivers/uavcan/sensors/beep.hpp
Outdated
/* | ||
* Max update rate to avoid exessive bus traffic | ||
*/ | ||
static constexpr unsigned MAX_RATE_HZ = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static constexpr unsigned MAX_RATE_HZ = 100; | |
static constexpr unsigned MAX_RATE_HZ = 100; |
src/drivers/uavcan/sensors/beep.hpp
Outdated
uORB::Subscription _tune_control_sub{ORB_ID(tune_control)}; | ||
|
||
/* | ||
* libuavcan related things |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you replace with details on what each thing is doing instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
src/drivers/uavcan/sensors/beep.hpp
Outdated
*/ | ||
uavcan::Publisher<uavcan::equipment::indication::BeepCommand> _beep_pub; | ||
|
||
uavcan::TimerEventForwarder<TimerCbBinder> _timer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uavcan::TimerEventForwarder<TimerCbBinder> _timer; | |
uavcan::TimerEventForwarder<TimerCbBinder> _timer; |
src/drivers/uavcan/CMakeLists.txt
Outdated
@@ -130,6 +130,7 @@ px4_add_module( | |||
sensors/flow.cpp | |||
sensors/gnss.cpp | |||
sensors/mag.cpp | |||
sensors/beep.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please move this above and make sure it is alphabetically ordered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Add CAN buzzer