technoshop.laser_turret_debug/serial_stream.h
Julien Oculi 403f9181e3 feat!: WIP convert all motor controls to stack based task pool
This commit close this branch with WIP implementation of a stack based
task pool system to handle long running action (motor move) of
the kissStepper lib (that need a long `while`). The goal was to
allow handling of incomming serrial messages and motion cancellation
during stepper control loop.
2025-07-25 14:59:37 +02:00

29 lines
477 B
C++

#ifndef SERIAL_STREAM_H
#define SERIAL_STREAM_H
#include "HardwareSerial.h"
#include "turret.h"
class SerialStream {
public:
SerialStream();
~SerialStream();
SerialStream &connect(HardwareSerial &serial);
SerialStream &disconnect();
SerialStream &bind(Turret &turret);
SerialStream &unbind();
SerialStream &loop();
private:
// TEMP to keep this in mind
int _internal_buffer;
HardwareSerial *_serial = nullptr;
Turret *_turret = nullptr;
};
#endif