Files
ptprnt/src/main.cpp

38 lines
775 B
C++

#include <iostream>
#include <memory>
#include "IPrinter.hpp"
#include "P700Printer.hpp"
#include "Usb.hpp"
#include <libusb-1.0/libusb.h>
#include <spdlog/spdlog.h>
using namespace ptprnt;
void setupLogger() {
spdlog::set_level(spdlog::level::debug);
spdlog::info("Starting ptprnt {}", PROJ_VERSION);
}
int main(int argc, char** argv) {
setupLogger();
auto usb = std::make_shared<driver::Usb>();
auto maybeDevs = usb->getDevices();
if(!maybeDevs.has_value()) {
spdlog::error("No USB devices found");
return -1;
}
auto driver = std::make_unique<driver::P700Driver>(usb);
//auto printer = std::make_unique<printer::P700Printer>(std::move(driver));
//printer::info info = printer->getInfo();
return 0;
}