diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs index 914089a..61074d1 100644 --- a/.settings/org.eclipse.cdt.core.prefs +++ b/.settings/org.eclipse.cdt.core.prefs @@ -67,16 +67,16 @@ environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPIL environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.ELF.CMD/value=arm-none-eabi-g++ environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.ELF.FLAGS/delimiter=\; environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.ELF.FLAGS/operation=replace -environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.ELF.FLAGS/value=-Os -Wl,--gc-sections +environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.ELF.FLAGS/value=-O2 -Wl,--gc-sections environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.FLAGS/delimiter=\; environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.FLAGS/operation=replace -environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.FLAGS/value=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single\=500 -Dprintf\=iprintf +environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.C.FLAGS/value=-c -g -O2 -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single\=500 -Dprintf\=iprintf environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.CMD/delimiter=\; environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.CMD/operation=replace environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.CMD/value=arm-none-eabi-g++ environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.FLAGS/delimiter=\; environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.FLAGS/operation=replace -environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.FLAGS/value=-c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single\=500 -fno-rtti -fno-exceptions -Dprintf\=iprintf +environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.CPP.FLAGS/value=-c -g -O2 -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single\=500 -fno-rtti -fno-exceptions -Dprintf\=iprintf environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.DEFINE/delimiter=\; environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.DEFINE/operation=replace environment/project/it.baeyens.arduino.core.toolChain.release.674980254/A.COMPILER.DEFINE/value=-DARDUINO\= diff --git a/Configuration.h b/Configuration.h index e7b8c95..94d7112 100644 --- a/Configuration.h +++ b/Configuration.h @@ -24,8 +24,8 @@ Licence: GPL #define CONFIGURATION_H #define NAME "RepRapFirmware" -#define VERSION "0.78z-dc42" -#define DATE "2014-12-03" +#define VERSION "0.78za-dc42" +#define DATE "2014-12-15" #define AUTHORS "reprappro, dc42, zpl" // Other firmware that we might switch to be compatible with. diff --git a/GCodes.cpp b/GCodes.cpp index 84010c9..49c6468 100644 --- a/GCodes.cpp +++ b/GCodes.cpp @@ -27,7 +27,8 @@ const char GCodes::axisLetters[AXES] = {'X', 'Y', 'Z'}; -const float secondsToMinutes = 1.0/60.0; +const float minutesToSeconds = 60.0; +const float secondsToMinutes = 1.0/minutesToSeconds; GCodes::GCodes(Platform* p, Webserver* w) { @@ -369,7 +370,7 @@ bool GCodes::LoadMoveBufferFromGCode(GCodeBuffer *gb, bool doingG92, bool applyL if(gb->Seen(feedrateLetter)) { - moveBuffer[DRIVES] = gb->GetFValue() * distanceScale * secondsToMinutes; // G Code feedrates are in mm/minute; we need mm/sec + moveBuffer[DRIVES] = gb->GetFValue() * distanceScale * speedFactor; } // First do extrusion, and check, if we are extruding, that we have a tool to extrude with @@ -2777,7 +2778,7 @@ bool GCodes::HandleMcode(GCodeBuffer* gb) case 220: // Set/report speed factor override percentage if (gb->Seen('S')) { - float newSpeedFactor = gb->GetFValue()/(60.0 * 100.0); // include the conversion from mm/minute to mm/second + float newSpeedFactor = (gb->GetFValue()/100.0) * secondsToMinutes; // include the conversion from mm/minute to mm/second if (newSpeedFactor > 0) { speedFactorChange *= newSpeedFactor/speedFactor; @@ -2786,7 +2787,7 @@ bool GCodes::HandleMcode(GCodeBuffer* gb) } else { - reply.printf("Speed factor override: %.1f%%\n", speedFactor * (60.0 * 100.0)); + reply.printf("Speed factor override: %.1f%%\n", speedFactor * minutesToSeconds * 100.0); } break; diff --git a/Move.h b/Move.h index 0877e25..4645655 100644 --- a/Move.h +++ b/Move.h @@ -448,9 +448,7 @@ inline void Move::LiveCoordinates(float m[]) const } -// These are the actual numbers that we want to be the coordinates, so -// don't transform them. - +// These are the actual numbers that we want to be the coordinates, so don't transform them. inline void Move::SetLiveCoordinates(float coords[]) { for(int8_t drive = 0; drive <= DRIVES; drive++) diff --git a/Platform.cpp b/Platform.cpp index 2b25af2..098b4b4 100644 --- a/Platform.cpp +++ b/Platform.cpp @@ -762,6 +762,21 @@ void Platform::InitialiseInterrupts() active = true; // this enables the tick interrupt, which keeps the watchdog happy } +void Platform::SetInterrupt(float s) // Seconds +{ + if (s <= 0.0) + { + //NVIC_DisableIRQ(TC3_IRQn); + Message(BOTH_ERROR_MESSAGE, "Negative interrupt!\n"); + s = STANDBY_INTERRUPT_RATE; + } + uint32_t rc = (uint32_t)( (((long)(TIME_TO_REPRAP*s))*84l)/128l ); + TC_SetRA(TC1, 0, rc/2); //50% high, 50% low + TC_SetRC(TC1, 0, rc); + TC_Start(TC1, 0); + NVIC_EnableIRQ(TC3_IRQn); +} + //void Platform::DisableInterrupts() //{ // NVIC_DisableIRQ(TC3_IRQn); @@ -1199,23 +1214,6 @@ float Platform::GetFanRPM() : 0.0; // else assume fan is off or tacho not connected } -// Interrupts - -void Platform::SetInterrupt(float s) // Seconds -{ - if (s <= 0.0) - { - //NVIC_DisableIRQ(TC3_IRQn); - Message(BOTH_ERROR_MESSAGE, "Negative interrupt!\n"); - s = STANDBY_INTERRUPT_RATE; - } - uint32_t rc = (uint32_t)( (((long)(TIME_TO_REPRAP*s))*84l)/128l ); - TC_SetRA(TC1, 0, rc/2); //50% high, 50% low - TC_SetRC(TC1, 0, rc); - TC_Start(TC1, 0); - NVIC_EnableIRQ(TC3_IRQn); -} - //----------------------------------------------------------------------------------------------------- FileStore* Platform::GetFileStore(const char* directory, const char* fileName, bool write) diff --git a/Release/RepRapFirmware-0.78za-dc42.bin b/Release/RepRapFirmware-0.78za-dc42.bin new file mode 100644 index 0000000..eb5df99 Binary files /dev/null and b/Release/RepRapFirmware-0.78za-dc42.bin differ