重新设置代码格式
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
#include "BaseStation.h"
|
||||
|
||||
|
||||
|
||||
namespace SSR {
|
||||
struct HULC_Status_Message;
|
||||
}
|
||||
|
||||
|
||||
std::optional<SSR::CPR::Position> BaseStation::get_pos() {
|
||||
std::lock_guard g(mtx);
|
||||
return SSR::CPR::Position{hulc.get_latitude(), hulc.get_longitude()};
|
||||
}
|
||||
void BaseStation::set_msg(const SSR::HULC_Status_Message& msg) {
|
||||
void BaseStation::set_msg(const SSR::HULC_Status_Message &msg) {
|
||||
std::lock_guard g(mtx);
|
||||
hulc = msg;
|
||||
if (handle_when_updated) handle_when_updated(msg);
|
||||
if (handle_when_updated)
|
||||
handle_when_updated(msg);
|
||||
}
|
||||
std::string BaseStation::to_string() {
|
||||
std::lock_guard g(mtx);
|
||||
return "BaseStation:[" + std::to_string(hulc.get_latitude()) + ", " + std::to_string(hulc.get_longitude()) + "]";
|
||||
return "BaseStation:[" + std::to_string(hulc.get_latitude()) + ", " +
|
||||
std::to_string(hulc.get_longitude()) + "]";
|
||||
}
|
||||
Psc::JSON BaseStation::to_Json() {
|
||||
std::lock_guard g(mtx);
|
||||
|
||||
Reference in New Issue
Block a user