mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-19 14:33:45 +02:00
Changes made based on pr feedback.
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
class MonitoringManager {
|
||||
public:
|
||||
MonitoringManager() = default;
|
||||
~MonitoringManager() = default;
|
||||
|
||||
void setup();
|
||||
void start();
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user