first build attempt
This commit is contained in:
32
src/knob_panel.h
Normal file
32
src/knob_panel.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* MIT License
|
||||
* Author: Mark Allyn
|
||||
*
|
||||
* knob_panel.h — Thread 3 stub: future hardware encoder panel.
|
||||
*
|
||||
* When physical encoders are installed, KnobPanel will read them via
|
||||
* GPIO/serial and write to SharedRenderState under Mutex A. Until
|
||||
* then, the thread starts but idles immediately without touching
|
||||
* SharedRenderState. The keyboard equivalents in PPIScope handle
|
||||
* the same state fields in the meantime.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include "shared_render_state.h"
|
||||
|
||||
class KnobPanel {
|
||||
public:
|
||||
explicit KnobPanel(SharedRenderState& srs) : srs_(srs) {}
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
private:
|
||||
void run();
|
||||
|
||||
SharedRenderState& srs_;
|
||||
std::thread thread_;
|
||||
std::atomic<bool> running_{false};
|
||||
};
|
||||
Reference in New Issue
Block a user