Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 15, 2024
1 parent dbdb02e commit 91ecb81
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .idea/Lithium.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions doc/device/filterhweel.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ flowchart TD
B --> B2[Names]
B --> B3[Position]
B --> B4[Filters]
C --> C1[PostConnect]
C --> C2[GetInstance]
Expand Down Expand Up @@ -49,9 +49,9 @@ flowchart TD
G --> H[Yes] --> I[Import Missing Filters]
G --> J[No] --> K[Continue]
D --> L[No] --> M[End]
F --> N[Update Filter List]
N --> O{Profile Filters < Device Filters?}
O --> P[Yes] --> Q[Add Missing Filters]
O --> R[No] --> S{Profile Filters > Device Filters?}
Expand Down Expand Up @@ -86,7 +86,7 @@ flowchart TD
## Detailed Explanation

- **Initialization**: The constructor is responsible for setting up the `AscomFilterWheel` with the provided ID, name, and profile service. It also calls the base class constructor.

- **PostConnect**: This method ensures that the filters in the active profile are consistent with those available in the filter wheel device. It removes duplicates caused by data corruption, adds missing filters, and truncates excess filters. This process ensures that the filters are synchronized between the device and the software, preventing any operational issues.

- **GetInstance**: The method returns an appropriate instance of the filter wheel interface, depending on whether the device metadata is available.
2 changes: 1 addition & 1 deletion modules/lithium.cxxtools/include/proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ class NetworkProxy {
};
} // namespace lithium::cxxtools

#endif
#endif
2 changes: 1 addition & 1 deletion src/atom/components/dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class DispatchTimeout : public atom::error::Exception {
#define THROW_DISPATCH_TIMEOUT(...) \
throw DispatchTimeout(ATOM_FILE_NAME, ATOM_FILE_LINE, ATOM_FUNC_NAME, \
__VA_ARGS__);

class CommandDispatcher {
public:
explicit CommandDispatcher(std::weak_ptr<atom::meta::TypeCaster> typeCaster)
Expand Down
2 changes: 1 addition & 1 deletion src/client/astap/_component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ AstapComponent::AstapComponent(const std::string& name)
: Component(name), m_solver(std::make_shared<AstapSolver>("astap")) {
LOG_F(INFO, "AstapComponent Constructed");


}

AstapComponent::~AstapComponent() { LOG_F(INFO, "AstapComponent Destructed"); }
Expand Down
10 changes: 5 additions & 5 deletions src/client/planetarium/cdc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class CartesDuCiel {
tcp::resolver resolver(io_context_);
tcp::resolver::results_type endpoints = resolver.resolve(address, std::to_string(port));
connect(socket_, endpoints);

write(socket_, buffer(command));

boost::asio::streambuf response_buf;
read_until(socket_, response_buf, "\r\n");
std::istream response_stream(&response_buf);
Expand All @@ -39,7 +39,7 @@ class CartesDuCiel {
std::optional<std::pair<double, double>> extractCoordinates(const std::string& response) {
std::regex ra_pattern(R"(([0-9]{1,2})(h|:)([0-9]{1,2})(m|:)?([0-9]{1,2}(\.[0-9]+)?)?(s|:))");
std::regex dec_pattern(R"([\+|-]([0-9]{1,2})(d|:)([0-9]{1,2})(m|:)?([0-9]{1,2}(\.[0-9]+)?)?(s|:))");

std::smatch ra_match, dec_match;
if (std::regex_search(response, ra_match, ra_pattern) && std::regex_search(response, dec_match, dec_pattern)) {
double ra = std::stod(ra_match.str());
Expand Down Expand Up @@ -111,14 +111,14 @@ class CartesDuCiel {

int main() {
CartesDuCiel cdc("localhost", 3292);

auto target = cdc.getTarget();
if (target) {
fmt::print("Target: {} - RA: {}, Dec: {}\n", target->first, target->second.first, target->second.second);
} else {
fmt::print("No target selected or error occurred.\n");
}

auto site = cdc.getSite();
if (site) {
fmt::print("Site - Latitude: {}, Longitude: {}\n", site->first, site->second);
Expand Down
4 changes: 2 additions & 2 deletions src/client/weather/uranusmeteo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class UranusMeteo
bool updateGPS();
bool saveConfigItems(FILE *fp);
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp);

int PortFD = -1;
bool m_SetupComplete = false;
std::thread m_SkyQualityUpdateThread;
Expand Down Expand Up @@ -63,7 +63,7 @@ bool UranusMeteo::initProperties()
SensorData["Clouds"] = nlohmann::json::array();
SensorData["SkyQuality"] = nlohmann::json::array();
SensorData["GPS"] = nlohmann::json::array();

// Start the Sky Quality Update Thread
m_SkyQualityUpdateThread = std::thread(&UranusMeteo::measureSkyQuality, this);
return true;
Expand Down

0 comments on commit 91ecb81

Please sign in to comment.