blob: 116ceba5e26d0789ac148a0277f539a1642ede90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* SimpleFilamentSensor.h
*
* Created on: 20 Jul 2017
* Author: David
*/
#ifndef SRC_FILAMENTSENSORS_SIMPLEFILAMENTMONITOR_H_
#define SRC_FILAMENTSENSORS_SIMPLEFILAMENTMONITOR_H_
#include "FilamentMonitor.h"
class SimpleFilamentMonitor : public FilamentMonitor
{
public:
SimpleFilamentMonitor(unsigned int extruder, unsigned int type);
bool Configure(GCodeBuffer& gb, const StringRef& reply, bool& seen) override;
FilamentSensorStatus Check(bool isPrinting, bool fromIsr, uint32_t isrMillis, float filamentConsumed) override;
FilamentSensorStatus Clear() override;
void Diagnostics(MessageType mtype, unsigned int extruder) override;
bool Interrupt() override;
private:
void Poll();
bool highWhenNoFilament;
bool filamentPresent;
bool enabled;
};
#endif /* SRC_FILAMENTSENSORS_SIMPLEFILAMENTMONITOR_H_ */
|