Skip to content

Commit

Permalink
Merge pull request Ryper3D#1 from Addu3D/7-colors
Browse files Browse the repository at this point in the history
10 colors
  • Loading branch information
gonchogsm authored Dec 8, 2021
2 parents 0d0635a + 2d260d8 commit a9c66a9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 24 deletions.
3 changes: 2 additions & 1 deletion MM-control-01/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
#define STA_ERR_TMC2_PIN_ENA -26 //TMC2130 axis2 pin wirring error - ena signal

//number of extruders
#define EXTRUDERS 7
//#define EXTRUDERS 7
#define EXTRUDERS 10

//diagnostic functions
//#define _DIAG
Expand Down
4 changes: 2 additions & 2 deletions MM-control-01/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ void process_commands(FILE* inout)
if (value == 0) //! S0 return ok
fprintf_P(inout, PSTR("ok\n"));
else if (value == 1) //! S1 Read version
fprintf_P(inout, PSTR("%dok\n"), fw_version);
fprintf_P(inout, PSTR("%dok\n"), 107);
else if (value == 2) //! S2 Read build nr.
fprintf_P(inout, PSTR("%dok\n"), fw_buildnr);
fprintf_P(inout, PSTR("%dok\n"), 106);
else if (value == 3) //! S3 Read drive errors
fprintf_P(inout, PSTR("%dok\n"), DriveError::get());
}
Expand Down
7 changes: 5 additions & 2 deletions MM-control-01/permanent_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ static const uint16_t eepromEmpty = 0xffff; //!< EEPROM content when erased
// 1 == 0,0495
static const uint16_t eepromLengthCorrectionBase = 1975u; //!< legacy bowden length correction base (~98 mm)
// ULTRA SHORT
static const uint16_t eepromBowdenLenDefault = 1818u; //!< Default bowden length (~90 mm)

static const uint16_t eepromBowdenLenDefault = 1090u; //!< Default bowden length (~90 mm) El bueno de 7

//static const uint16_t eepromBowdenLenDefault = 910u; //!< Default bowden length (~90 mm) El bueno de 7
// SHORT
//static const uint16_t eepromBowdenLenDefault = 2020u; //!< Default bowden length (~100 mm)
//CLASSIC
//static const uint16_t eepromBowdenLenDefault = 2225u; //!< Default bowden length (~110 mm)
//LONGER
//static const uint16_t eepromBowdenLenDefault = 2500u; //!< Default bowden length (~123 mm)
static const uint16_t eepromBowdenLenMinimum = 1725u; //!< Minimum bowden length (~85 mm)
static const uint16_t eepromBowdenLenMinimum = 910u; //!< Minimum bowden length (~85 mm)
static const uint16_t eepromBowdenLenMaximum = 4000u; //!< Maximum bowden length (~198 mm)

void permanentStorageInit()
Expand Down
12 changes: 8 additions & 4 deletions MM-control-01/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
#include "pins.h"
#include "tmc2130.h"

int8_t filament_type[EXTRUDERS] = {-1, -1, -1, -1, -1, -1, -1};
//int16_t filament_type[EXTRUDERS] = {-1, -1, -1, -1, -1, -1, -1};
int16_t filament_type[EXTRUDERS] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
static bool isIdlerParked = false;

static const int idler_steps_after_homing = -130;
static const int idler_steps_after_homing = -266; // 10 colores
//static const int idler_steps_after_homing = -128;

static const int idler_steps = 1420 / 4; // 2 msteps = 180 / 4
static const int idler_parking_steps = (idler_steps / 2) + 40; // 40
static const int idler_steps = 1065 / 4; // 2 msteps = 180 / 4 // 10 colores
static const int idler_parking_steps = idler_steps ; // 40 // 10 colores
//static const int idler_steps = 1420 / 4; // 2 msteps = 180 / 4
//static const int idler_parking_steps = (idler_steps / 2) + 40; // 40


static int set_idler_direction(int _steps);
Expand Down
2 changes: 1 addition & 1 deletion MM-control-01/stepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "config.h"
#include <inttypes.h>

extern int8_t filament_type[EXTRUDERS];
extern int16_t filament_type[EXTRUDERS];

void home();
bool home_idler();
Expand Down
28 changes: 14 additions & 14 deletions MM-control-01/version.h.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//! @file

#ifndef VERSION_H_
#define VERSION_H_

static const uint16_t fw_version = 106; //!< example: 103 means version 1.0.3
static const uint16_t fw_buildnr = ${GIT_PARENT_COMMITS}; //!< number of commits preceeding current HEAD
#define FW_HASH "${GIT_COMMIT_HASH}"

//! @macro FW_LOCAL_CHANGES
//! @val 0 no changes in tracked local files
//! @val 1 some local git tracked files has been changed
#include "dirty.h"

//! @file
#ifndef VERSION_H_
#define VERSION_H_
static const uint16_t fw_version = 107; //!< example: 103 means version 1.0.3
static const uint16_t fw_buildnr = ${GIT_PARENT_COMMITS}; //!< number of commits preceeding current HEAD
#define FW_HASH "${GIT_COMMIT_HASH}"
//! @macro FW_LOCAL_CHANGES
//! @val 0 no changes in tracked local files
//! @val 1 some local git tracked files has been changed
#include "dirty.h"
#endif //VERSION_H_

0 comments on commit a9c66a9

Please sign in to comment.