mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 15:17:37 +03:00
Apply clang-format fixes
This commit is contained in:
parent
796e735452
commit
9abf48b055
@ -1,6 +1,7 @@
|
||||
#include "OpdsParser.h"
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
OpdsParser::~OpdsParser() {
|
||||
|
||||
@ -18,8 +18,8 @@ enum class OpdsEntryType {
|
||||
struct OpdsEntry {
|
||||
OpdsEntryType type = OpdsEntryType::NAVIGATION;
|
||||
std::string title;
|
||||
std::string author; // Only for books
|
||||
std::string href; // Navigation URL or epub download URL
|
||||
std::string author; // Only for books
|
||||
std::string href; // Navigation URL or epub download URL
|
||||
std::string id;
|
||||
};
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include <HardwareSerial.h>
|
||||
#include <SDCardManager.h>
|
||||
#include <Serialization.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "fontIds.h"
|
||||
|
||||
@ -246,7 +246,8 @@ void OpdsBookBrowserActivity::render() const {
|
||||
}
|
||||
|
||||
auto item = renderer.truncatedText(UI_10_FONT_ID, displayText.c_str(), renderer.getScreenWidth() - 40);
|
||||
renderer.drawText(UI_10_FONT_ID, 20, 60 + (i % PAGE_ITEMS) * 30, item.c_str(), i != static_cast<size_t>(selectorIndex));
|
||||
renderer.drawText(UI_10_FONT_ID, 20, 60 + (i % PAGE_ITEMS) * 30, item.c_str(),
|
||||
i != static_cast<size_t>(selectorIndex));
|
||||
}
|
||||
|
||||
renderer.displayBuffer();
|
||||
@ -342,8 +343,8 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book) {
|
||||
|
||||
Serial.printf("[%lu] [OPDS] Downloading: %s -> %s\n", millis(), downloadUrl.c_str(), filename.c_str());
|
||||
|
||||
const auto result = HttpDownloader::downloadToFile(
|
||||
downloadUrl, filename, [this](const size_t downloaded, const size_t total) {
|
||||
const auto result =
|
||||
HttpDownloader::downloadToFile(downloadUrl, filename, [this](const size_t downloaded, const size_t total) {
|
||||
downloadProgress = downloaded;
|
||||
downloadTotal = total;
|
||||
updateRequired = true;
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include <Epub.h>
|
||||
#include <GfxRenderer.h>
|
||||
#include <SDCardManager.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
@ -299,8 +300,8 @@ void HomeActivity::render() const {
|
||||
const int menuTileWidth = pageWidth - 2 * margin;
|
||||
constexpr int menuTileHeight = 45;
|
||||
constexpr int menuSpacing = 8;
|
||||
const int totalMenuHeight = static_cast<int>(menuItems.size()) * menuTileHeight +
|
||||
(static_cast<int>(menuItems.size()) - 1) * menuSpacing;
|
||||
const int totalMenuHeight =
|
||||
static_cast<int>(menuItems.size()) * menuTileHeight + (static_cast<int>(menuItems.size()) - 1) * menuSpacing;
|
||||
|
||||
int menuStartY = bookY + bookHeight + 15;
|
||||
// Ensure we don't collide with the bottom button legend
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#include "SettingsActivity.h"
|
||||
|
||||
#include <GfxRenderer.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "CrossPointSettings.h"
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <SPI.h>
|
||||
#include <WiFi.h>
|
||||
#include <builtinFonts/all.h>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "Battery.h"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "HttpDownloader.h"
|
||||
|
||||
#include <HardwareSerial.h>
|
||||
#include <HTTPClient.h>
|
||||
#include <HardwareSerial.h>
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
#include <memory>
|
||||
@ -32,7 +32,7 @@ bool HttpDownloader::fetchUrl(const std::string& url, std::string& outContent) {
|
||||
}
|
||||
|
||||
HttpDownloader::DownloadError HttpDownloader::downloadToFile(const std::string& url, const std::string& destPath,
|
||||
ProgressCallback progress) {
|
||||
ProgressCallback progress) {
|
||||
const std::unique_ptr<WiFiClientSecure> client(new WiFiClientSecure());
|
||||
client->setInsecure();
|
||||
HTTPClient http;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user