/*
 * MIT License
 * Author: Mark Allyn
 *
 * knob_panel.cpp — stub: thread idles until hardware is attached.
 */

#include "knob_panel.h"
#include <chrono>

void KnobPanel::start() {
    running_ = true;
    thread_  = std::thread(&KnobPanel::run, this);
}

void KnobPanel::stop() {
    running_ = false;
    if (thread_.joinable())
        thread_.join();
}

void KnobPanel::run() {
    // Hardware not yet installed — sleep forever until stopped.
    while (running_)
        std::this_thread::sleep_for(std::chrono::seconds(1));
}
