This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
reprapfirmware-dc42/Reprap.h
David Crocker 9edaed4ac1 Further improvements to web upload and tidy-up
Further improved web file upload speed
Dealt with Eclipse code analysis warnings
Made some more functions and parameters const-correct
2014-01-30 14:26:45 +00:00

81 lines
1.7 KiB
C++

/****************************************************************************************************
RepRapFirmware - Reprap
RepRap is a simple class that acts as a container for an instance of all the others.
-----------------------------------------------------------------------------------------------------
Version 0.1
21 May 2013
Adrian Bowyer
RepRap Professional Ltd
http://reprappro.com
Licence: GPL
****************************************************************************************************/
#ifndef REPRAP_H
#define REPRAP_H
class RepRap
{
public:
RepRap();
void EmergencyStop();
void Init();
void Spin();
void Exit();
void Interrupt();
void Diagnostics();
bool Debug() const;
void SetDebug(bool d);
Platform* GetPlatform() const;
Move* GetMove() const;
Heat* GetHeat() const;
GCodes* GetGCodes() const;
Webserver* GetWebserver() const;
private:
Platform* platform;
bool active;
Move* move;
Heat* heat;
GCodes* gCodes;
Webserver* webserver;
bool debug;
};
inline Platform* RepRap::GetPlatform() const { return platform; }
inline Move* RepRap::GetMove() const { return move; }
inline Heat* RepRap::GetHeat() const { return heat; }
inline GCodes* RepRap::GetGCodes() const { return gCodes; }
inline Webserver* RepRap::GetWebserver() const { return webserver; }
inline bool RepRap::Debug() const { return debug; }
inline void RepRap::SetDebug(bool d)
{
debug = d;
if(debug)
{
platform->Message(HOST_MESSAGE, "Debugging enabled\n");
webserver->HandleReply("Debugging enabled\n", false);
platform->PrintMemoryUsage();
}
else
{
webserver->HandleReply("", false);
}
}
inline void RepRap::Interrupt() { move->Interrupt(); }
#endif