Changes made based on pr feedback.

This commit is contained in:
PhosphorosVR
2025-09-23 01:46:53 +02:00
parent 15641753f0
commit e47735c720
8 changed files with 48 additions and 50 deletions

View File

@@ -72,8 +72,8 @@ private:
bool finishedPattern = false;
#if defined(CONFIG_LED_EXTERNAL_CONTROL) && defined(CONFIG_LED_EXTERNAL_AS_DEBUG)
mutable bool hasStoredExternalDuty = false;
mutable uint32_t storedExternalDuty = 0; // raw 0-255
bool hasStoredExternalDuty = false;
uint32_t storedExternalDuty = 0; // raw 0-255
#endif
};

View File

@@ -1,3 +1,5 @@
#ifndef CURRENT_MONITOR_HPP
#define CURRENT_MONITOR_HPP
#pragma once
#include <cstdint>
#include <memory>
@@ -43,3 +45,5 @@ private:
size_t sample_idx_ = 0;
size_t sample_count_ = 0;
};
#endif

View File

@@ -6,8 +6,6 @@
class MonitoringManager {
public:
MonitoringManager() = default;
~MonitoringManager() = default;
void setup();
void start();

View File

@@ -97,10 +97,10 @@ static uvc_fb_t *UVCStreamHelpers::camera_fb_get_cb(void *cb_ctx)
// --- Frame pacing BEFORE grabbing a new camera frame ---
static int64_t next_deadline_us = 0; // next permitted capture time
static int rem_acc = 0; // fractional remainder accumulator
constexpr int target_fps = 60; // desired FPS
constexpr int64_t us_per_sec = 1000000; // 1e6 microseconds
constexpr int base_interval_us = us_per_sec / target_fps; // 16666
constexpr int rem_us = us_per_sec % target_fps; // 40 (distributed)
static const int target_fps = 60; // desired FPS
static const int64_t us_per_sec = 1000000; // 1e6 microseconds
static const int base_interval_us = us_per_sec / target_fps; // 16666
static const int rem_us = us_per_sec % target_fps; // 40 (distributed)
const int64_t now_us = esp_timer_get_time();
if (next_deadline_us == 0)