Skip to content

Commit 1c2dc58

Browse files
committed
fix: code opt
1 parent 4baa815 commit 1c2dc58

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

infinite_sense_core/src/ptp.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66

77
namespace infinite_sense {
88

9-
namespace {
109
constexpr char func_name[] = "f";
1110
constexpr char func_type_a[] = "a";
1211
constexpr char func_type_b[] = "b";
13-
} // namespace
1412

15-
void Ptp::SetUsbPtr(const std::shared_ptr<serial::Serial>& serial_ptr) {
16-
serial_ptr_ = serial_ptr;
17-
}
13+
void Ptp::SetUsbPtr(const std::shared_ptr<serial::Serial>& serial_ptr) { serial_ptr_ = serial_ptr; }
1814

1915
void Ptp::SetNetPtr(const std::shared_ptr<UDPSocket>& net_ptr, const std::string& target_ip,
2016
const unsigned short port) {
@@ -95,8 +91,7 @@ void Ptp::SendJson(const nlohmann::json& data) const {
9591
}
9692

9793
uint64_t Ptp::GetCurrentTimeUs() {
98-
return std::chrono::duration_cast<std::chrono::microseconds>(
99-
std::chrono::system_clock::now().time_since_epoch())
94+
return std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch())
10095
.count();
10196
}
10297

0 commit comments

Comments
 (0)