diff --git a/Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.1.bin b/Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.2.bin similarity index 60% rename from Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.1.bin rename to Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.2.bin index 380e50a..3a455d0 100644 Binary files a/Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.1.bin and b/Release/Duet-0.6-0.8.5/Stable/RepRapFirmware-1.18.2.bin differ diff --git a/Release/Duet-WiFi/Stable/DuetWebControl-1.15a.bin b/Release/Duet-WiFi/Stable/DuetWebControl-1.15a.bin deleted file mode 100644 index 8032799..0000000 Binary files a/Release/Duet-WiFi/Stable/DuetWebControl-1.15a.bin and /dev/null differ diff --git a/Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.1.bin b/Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.2.bin similarity index 65% rename from Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.1.bin rename to Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.2.bin index b8c3759..5120d04 100644 Binary files a/Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.1.bin and b/Release/Duet-WiFi/Stable/DuetWiFiFirmware-1.18.2.bin differ diff --git a/Release/RADDS/Edge/RepRapFirmware-RADDS-1.18.1.bin b/Release/RADDS/Edge/RepRapFirmware-1.18.2.bin similarity index 63% rename from Release/RADDS/Edge/RepRapFirmware-RADDS-1.18.1.bin rename to Release/RADDS/Edge/RepRapFirmware-1.18.2.bin index e8015be..ac9cf80 100644 Binary files a/Release/RADDS/Edge/RepRapFirmware-RADDS-1.18.1.bin and b/Release/RADDS/Edge/RepRapFirmware-1.18.2.bin differ diff --git a/src/DuetNG/DueXn.cpp b/src/DuetNG/DueXn.cpp index f867840..837b948 100644 --- a/src/DuetNG/DueXn.cpp +++ b/src/DuetNG/DueXn.cpp @@ -18,17 +18,20 @@ namespace DuetExpansion const uint8_t DueXnAddress = 0x3E; // address of the SX1509B on the DueX0/DueX2/DueX5 - const uint16_t BoardTypePins = (1u << 14) | (1u << 15); + // The original DueX2 and DueX5 boards had 2 board ID pins, bits 14 an 15. + // The new ones use bit 15 for fan 8, so not we just have bit 14. + // If we want any more variants, they will have to use a different I2C address. + const uint16_t BoardTypePins = (1u << 14); const unsigned int BoardTypeShift = 14; - const ExpansionBoardType boardTypes[] = - { ExpansionBoardType::DueX5, ExpansionBoardType::DueX2, ExpansionBoardType::DueX0, ExpansionBoardType::none }; + const ExpansionBoardType boardTypes[] = { ExpansionBoardType::DueX5, ExpansionBoardType::DueX2 }; const unsigned int Fan3Bit = 12; const unsigned int Fan4Bit = 7; const unsigned int Fan5Bit = 6; const unsigned int Fan6Bit = 5; const unsigned int Fan7Bit = 4; - const uint16_t AllFanBits = (1u << Fan3Bit) | (1u << Fan4Bit) | (1u << Fan5Bit) | (1u << Fan6Bit) | (1u << Fan7Bit); + const unsigned int Fan8Bit = 15; + const uint16_t AllFanBits = (1u << Fan3Bit) | (1u << Fan4Bit) | (1u << Fan5Bit) | (1u << Fan6Bit) | (1u << Fan7Bit) | (1 << Fan8Bit); const unsigned int E2StopBit = 0; const unsigned int E3StopBit = 3; diff --git a/src/DuetNG/Pins_DuetNG.h b/src/DuetNG/Pins_DuetNG.h index f2a64da..d254cb1 100644 --- a/src/DuetNG/Pins_DuetNG.h +++ b/src/DuetNG/Pins_DuetNG.h @@ -114,8 +114,8 @@ const Pin VssaSensePin = 103; const Pin Z_PROBE_MOD_PIN = 34; // Digital pin number to turn the IR LED on (high) or off (low) on Duet v0.6 and v1.0 (PB21) // COOLING FANS -const size_t NUM_FANS = 8; -const Pin COOLING_FAN_PINS[NUM_FANS] = { 55, 58, 00, 212, 207, 206, 205, 204 }; +const size_t NUM_FANS = 9; +const Pin COOLING_FAN_PINS[NUM_FANS] = { 55, 58, 00, 212, 207, 206, 205, 204, 215 }; const Pin COOLING_FAN_RPM_PIN = 102; // PB6 on expansion connector // SD cards diff --git a/src/GCodes/GCodeQueue.cpp b/src/GCodes/GCodeQueue.cpp index f881e4e..410dca2 100644 --- a/src/GCodes/GCodeQueue.cpp +++ b/src/GCodes/GCodeQueue.cpp @@ -42,32 +42,42 @@ bool GCodeQueue::QueueCode(GCodeBuffer &gb, uint32_t segmentsLeft) bool queueCode = false; switch (gb.GetCommandLetter()) { - case 'G': + case 'G': { const int code = gb.GetIValue(); // Set active/standby temperatures queueCode = (code == 10 && gb.Seen('P')); - break; } + break; - case 'M': + case 'M': { const int code = gb.GetIValue(); + switch(code) + { + case 3: // spindle control + case 4: + case 5: + case 42: // set IO pin + case 106: // fan control + case 107: + case 104: // set temperatures and return immediately + case 140: + case 141: + case 144: + case 117: // display message + case 280: // set servo + case 300: // beep + case 420: // set RGB colour + queueCode = true; + break; - // Fan control - queueCode |= (code == 106 || code == 107); - - // Set temperatures and return immediately - queueCode |= (code == 104 || code == 140 || code == 141 || code == 144); - - // Display Message (LCD), Beep, RGB colour, Set servo position - queueCode |= (code == 117 || code == 300 || code == 280 || code == 420); - - // Valve control - queueCode |= (code == 126 || code == 127); - break; + default: + break; + } } + break; } // Does it make sense to queue this code? diff --git a/src/GCodes/GCodes2.cpp b/src/GCodes/GCodes2.cpp index 0d35b7f..7265227 100644 --- a/src/GCodes/GCodes2.cpp +++ b/src/GCodes/GCodes2.cpp @@ -958,9 +958,9 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, StringRef& reply) bool seenFanNum = false; int32_t fanNum = 0; // Default to the first fan gb.TryGetIValue('P', fanNum, seenFanNum); - if (fanNum < 0 || fanNum > (int)NUM_FANS) + if (fanNum < 0 || fanNum >= (int)NUM_FANS) { - reply.printf("Fan number %d is invalid, must be between 0 and %u", fanNum, NUM_FANS); + reply.printf("Fan number %d is invalid, must be between 0 and %u", fanNum, NUM_FANS - 1); } else { diff --git a/src/Storage/MassStorage.cpp b/src/Storage/MassStorage.cpp index 2084b35..5782a59 100644 --- a/src/Storage/MassStorage.cpp +++ b/src/Storage/MassStorage.cpp @@ -366,6 +366,7 @@ bool MassStorage::Mount(size_t card, StringRef& reply, bool reportSuccess) else { // Mount the file systems + memset(&fileSystems[card], 0, sizeof(FATFS)); // f_mount doesn't initialise the file structure, we must do it ourselves FRESULT mounted = f_mount(card, &fileSystems[card]); if (mounted != FR_OK) { diff --git a/src/Version.h b/src/Version.h index f5148ad..ea67d68 100644 --- a/src/Version.h +++ b/src/Version.h @@ -9,11 +9,11 @@ #define SRC_VERSION_H_ #ifndef VERSION -# define VERSION "1.18.1" +# define VERSION "1.18.2" #endif #ifndef DATE -# define DATE "2017-04-09" +# define DATE "2017-06-16" #endif #define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman"