#pragma once

#include "../Common/ultrasonic.hpp"
#include "../config.hpp"

class CommonCenter {
public:
    static Ultrasonic& GetUltrasonic() {
        static Ultrasonic* instance = nullptr;
        if (instance == nullptr) {
            instance = new Ultrasonic(
                Config::kCaptureConfig.trigger, Config::kCaptureConfig.timer, Config::kCaptureConfig.channel);
        }
        return *instance;
    }
};
