style: apply clang-format

This commit is contained in:
Daniel 2026-02-03 22:46:50 -08:00
parent f611cc9615
commit f3ec7b8800
7 changed files with 45 additions and 45 deletions

View File

@ -1,12 +1,14 @@
#pragma once
#include "../Activity.h"
#include "../../extension/AppLoader.h"
#include <GfxRenderer.h>
#include <MappedInputManager.h>
#include <functional>
#include <vector>
#include "../../extension/AppLoader.h"
#include "../Activity.h"
class AppsActivity : public Activity {
public:
using ExitCallback = std::function<void()>;

View File

@ -4,7 +4,6 @@
#include <EpdFontFamily.h>
#include <GfxRenderer.h>
#include <builtinFonts/all.h>
#include <esp_attr.h>
#include <esp_ota_ops.h>
#include <esp_system.h>
@ -17,7 +16,7 @@ namespace {
EpdFont ui12RegularFont(&ubuntu_12_regular);
EpdFont ui12BoldFont(&ubuntu_12_bold);
EpdFontFamily ui12FontFamily(&ui12RegularFont, &ui12BoldFont);
}
} // namespace
HelloWorldActivity::HelloWorldActivity(HalDisplay& display, HalGPIO& input)
: display_(display), input_(input), needsUpdate_(true) {}

View File

@ -1,10 +1,11 @@
#include "AppLoader.h"
#include <memory>
#include <esp_ota_ops.h>
#include <esp_partition.h>
#include <esp_system.h>
#include <memory>
#include "Battery.h"
namespace CrossPoint {
@ -85,8 +86,8 @@ AppManifest AppLoader::parseManifest(const String& path) {
}
if (fileSize > MAX_MANIFEST_SIZE) {
Serial.printf("[%lu] [AppLoader] Manifest file too large (%u bytes, max %u): %s\n",
millis(), fileSize, MAX_MANIFEST_SIZE, path.c_str());
Serial.printf("[%lu] [AppLoader] Manifest file too large (%u bytes, max %u): %s\n", millis(), fileSize,
MAX_MANIFEST_SIZE, path.c_str());
file.close();
return manifest;
}
@ -97,8 +98,8 @@ AppManifest AppLoader::parseManifest(const String& path) {
file.close();
if (bytesRead != fileSize) {
Serial.printf("[%lu] [AppLoader] Failed to read complete manifest file (read %u of %u bytes): %s\n",
millis(), bytesRead, fileSize, path.c_str());
Serial.printf("[%lu] [AppLoader] Failed to read complete manifest file (read %u of %u bytes): %s\n", millis(),
bytesRead, fileSize, path.c_str());
return manifest;
}
@ -113,8 +114,7 @@ AppManifest AppLoader::parseManifest(const String& path) {
const DeserializationError error = deserializeJson(doc, json);
if (error) {
Serial.printf("[%lu] [AppLoader] JSON parse error in %s: %s\n",
millis(), path.c_str(), error.c_str());
Serial.printf("[%lu] [AppLoader] JSON parse error in %s: %s\n", millis(), path.c_str(), error.c_str());
return manifest;
}
@ -307,8 +307,6 @@ String AppLoader::buildManifestPath(const String& appDir) const {
return path;
}
bool AppLoader::isSDReady() const {
return SdMan.ready();
}
bool AppLoader::isSDReady() const { return SdMan.ready(); }
}
} // namespace CrossPoint

View File

@ -1,10 +1,11 @@
#pragma once
#include <ArduinoJson.h>
#include <WString.h>
#include <vector>
#include <functional>
#include <SDCardManager.h>
#include <WString.h>
#include <functional>
#include <vector>
namespace CrossPoint {

View File

@ -15,9 +15,9 @@
#include "KOReaderCredentialStore.h"
#include "MappedInputManager.h"
#include "RecentBooksStore.h"
#include "activities/apps/AppsActivity.h"
#include "activities/boot_sleep/BootActivity.h"
#include "activities/boot_sleep/SleepActivity.h"
#include "activities/apps/AppsActivity.h"
#include "activities/browser/OpdsBookBrowserActivity.h"
#include "activities/home/HomeActivity.h"
#include "activities/home/MyLibraryActivity.h"

View File

@ -9,9 +9,9 @@
#include <algorithm>
#include "html/AppsPageHtml.generated.h"
#include "html/FilesPageHtml.generated.h"
#include "html/HomePageHtml.generated.h"
#include "html/AppsPageHtml.generated.h"
#include "util/StringUtils.h"
namespace {
@ -525,8 +525,8 @@ static bool isValidAppId(const String& appId) {
}
for (size_t i = 0; i < appId.length(); i++) {
const char c = appId.charAt(i);
const bool ok = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '.' ||
c == '_' || c == '-';
const bool ok =
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '.' || c == '_' || c == '-';
if (!ok) {
return false;
}