diff --git a/GCodes.h b/GCodes.h index 2c4f7f4..b3f0b49 100644 --- a/GCodes.h +++ b/GCodes.h @@ -27,7 +27,8 @@ class GCodes public: GCodes(Platform* p, Move* m, Heat* h, Webserver* w); - void spin(); + void Spin(); + void Init(); private: diff --git a/GCodes.ino b/GCodes.ino index 08896fe..8e7bf9e 100644 --- a/GCodes.ino +++ b/GCodes.ino @@ -28,6 +28,11 @@ GCodes::GCodes(Platform* p, Move* m, Heat* h, Webserver* w) move = m; heat = h; webserver = w; + Init(); +} + +void GCodes::Init() +{ lastTime = platform->time(); gcodePointer = 0; } @@ -39,7 +44,9 @@ void GCodes::ActOnGcode() platform->Message(HOST_MESSAGE, "\n"); } -void GCodes::spin() + + +void GCodes::Spin() { if(webserver->Available()) { diff --git a/Heat.h b/Heat.h index 67ae0ca..9fe90e4 100644 --- a/Heat.h +++ b/Heat.h @@ -37,7 +37,8 @@ class Heat public: Heat(Platform* p); - void spin(); + void Spin(); + void Init(); private: diff --git a/Heat.ino b/Heat.ino index 2039d79..0dfc9d2 100644 --- a/Heat.ino +++ b/Heat.ino @@ -24,12 +24,17 @@ Heat::Heat(Platform* p) { //Serial.println("Heat constructor"); platform = p; - lastTime = platform->time(); - //frac = 0; - //inc = 0.01; + Init(); } -void Heat::spin() +void Heat::Init() +{ + lastTime = platform->time(); + //frac = 0; + //inc = 0.01; +} + +void Heat::Spin() { unsigned long t = platform->time(); if(t - lastTime < 3000) diff --git a/Move.h b/Move.h index 49d4726..8a5db54 100644 --- a/Move.h +++ b/Move.h @@ -26,7 +26,8 @@ class Move public: Move(Platform* p); - void spin(); + void Init(); + void Spin(); private: diff --git a/Move.ino b/Move.ino index da46d46..ea9e516 100644 --- a/Move.ino +++ b/Move.ino @@ -24,14 +24,19 @@ Move::Move(Platform* p) { //Serial.println("Move constructor"); platform = p; + Init(); +} + +void Move::Init() +{ lastTime = platform->time(); platform->setDirection(X_AXIS, FORWARDS); platform->setDirection(Y_AXIS, FORWARDS); platform->setDirection(Z_AXIS, FORWARDS); - platform->setDirection(3, FORWARDS); + platform->setDirection(3, FORWARDS); } -void Move::spin() +void Move::Spin() { unsigned long t = platform->time(); if(t - lastTime < 300) diff --git a/Platform.h b/Platform.h index 69c9c3f..7874e60 100644 --- a/Platform.h +++ b/Platform.h @@ -368,7 +368,7 @@ inline void Platform::setInterrupt(long t) inline void Platform::interrupt() { - reprap->interrupt(); // Put nothing else in this function + reprap->Interrupt(); // Put nothing else in this function } //***************************************************************************************************************** diff --git a/Platform.ino b/Platform.ino index 863d97c..c1d2d9a 100644 --- a/Platform.ino +++ b/Platform.ino @@ -26,12 +26,12 @@ Licence: GPL void setup() { - reprap.init(); + reprap.Init(); } void loop() { - reprap.spin(); + reprap.Spin(); } //************************************************************************************************* diff --git a/RepRapFirmware.h b/RepRapFirmware.h index 37c8d02..350c8a6 100644 --- a/RepRapFirmware.h +++ b/RepRapFirmware.h @@ -38,14 +38,14 @@ class RepRap public: RepRap(); - void init(); - void spin(); + void Init(); + void Spin(); // Platform* getPlatform(); // Move* getMove(); // Heat* getHeat(); // GCodes* getGcodes(); // Webserver* getWebserver(); - void interrupt(); + void Interrupt(); private: diff --git a/RepRapFirmware.ino b/RepRapFirmware.ino index 88a534e..5d8ca65 100644 --- a/RepRapFirmware.ino +++ b/RepRapFirmware.ino @@ -53,7 +53,7 @@ RepRap reprap; //************************************************************************************************* -void RepRap::init() +void RepRap::Init() { platform = new Platform(this); move = new Move(platform); @@ -63,16 +63,16 @@ void RepRap::init() platform->Message(HOST_MESSAGE, "RepRapPro RepRap Firmware Started\n\n"); } -void RepRap::spin() +void RepRap::Spin() { platform->spin(); - move->spin(); - heat->spin(); - gcodes->spin(); + move->Spin(); + heat->Spin(); + gcodes->Spin(); webserver->spin(); } -void RepRap::interrupt() +void RepRap::Interrupt() { } diff --git a/SD-image/www/control.php~ b/SD-image/www/control.php~ new file mode 100644 index 0000000..739bf0b --- /dev/null +++ b/SD-image/www/control.php~ @@ -0,0 +1,130 @@ + + + + + + + +

RepRap: + +RepRapPro logo'; ?> +



+ +    Control    + +    Print    + +    Help    + + +    Settings    + +    Logout    + + +

'; ?> + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Move X Y Z
- mm+ mm
-100-10-1-0.10.1110100
+ +

Send a G Code:
+ + +

diff --git a/SD-image/www/logout.php~ b/SD-image/www/logout.php~ new file mode 100644 index 0000000..5752e07 --- /dev/null +++ b/SD-image/www/logout.php~ @@ -0,0 +1,6 @@ + + + + + + diff --git a/SD-image/www/passwd.php~ b/SD-image/www/passwd.php~ new file mode 100644 index 0000000..153b282 --- /dev/null +++ b/SD-image/www/passwd.php~ @@ -0,0 +1,13 @@ + + + + +

RepRap: + +
+ +
Password: + +

+ + diff --git a/SD-image/www/settings.php~ b/SD-image/www/settings.php~ new file mode 100644 index 0000000..6a76fbd --- /dev/null +++ b/SD-image/www/settings.php~ @@ -0,0 +1,30 @@ + + + + + + + +

RepRap: + +RepRapPro logo'; ?> +



+ +    Control    + +    Print    + +    Help    + + +    Settings    + +    Logout    + + +

'; ?> + +

Settings: allow user to rename machine, set password, set steps/mm etc etc and record the lot. + + +