Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ test_output/

# Test image dumps (defense in depth)
*.pgm
*.ppm
*.ppm

# Generic compiled output
a.out
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <curl/curl.h>
#include <string>
#include <thread>
#include <unistd.h>

namespace {

Expand Down Expand Up @@ -73,6 +74,7 @@ int main() {
LOG_ERROR("curl_global_init failed");
return 1;
}
std::atexit(curl_global_cleanup);

// ---- Load configuration ----
Config cfg;
Expand Down Expand Up @@ -109,6 +111,7 @@ int main() {
if (!oled.begin(cfg.oledI2CAddr)) {
LOG_ERROR("Failed to open OLED on I2C bus at 0x"
<< std::hex << cfg.oledI2CAddr << std::dec);
close(lcdFd);
return 1;
}

Expand Down Expand Up @@ -208,6 +211,5 @@ int main() {
}
}

curl_global_cleanup();
return 0; // unreachable
}
}
Loading