Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
91ba54ae
Commit
91ba54ae
authored
Nov 24, 2014
by
MagoKimbra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add firmware test
parent
1f257b0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
175 additions
and
151 deletions
+175
-151
Marlin_main.cpp
MarlinKimbra/Marlin_main.cpp
+37
-27
language.h
MarlinKimbra/language.h
+138
-124
No files found.
MarlinKimbra/Marlin_main.cpp
View file @
91ba54ae
...
@@ -5932,28 +5932,30 @@ void setPwmFrequency(uint8_t pin, int val)
...
@@ -5932,28 +5932,30 @@ void setPwmFrequency(uint8_t pin, int val)
#ifdef FIRMWARE_TEST
#ifdef FIRMWARE_TEST
void
FirmwareTest
(){
void
FirmwareTest
(){
SERIAL_ECHO_START
;
SERIAL_ECHOLN
(
"---------- FIRMWARE TEST --------------"
);
SERIAL_ECHOLN
(
"INIZIO FIRMWARE TEST"
);
SERIAL_ECHOLN
(
"--------- by MarlinKimbra -------------"
);
SERIAL_ECHOLN
(
"Posizionare manualmente gli assi X, Y e z lontano dagli endstop"
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
"Dare il comando Y per andare avanti"
);
SERIAL_ECHOLN
(
MSG_FWTEST_01
);
SERIAL_ECHOLN
(
MSG_FWTEST_YES
);
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
while
(
serial_char
!=
'Y'
){
while
(
serial_char
!=
'Y'
){
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
}
}
SERIAL_ECHOLN
(
"Inizio controllo ENDSTOP"
);
SERIAL_ECHOLN
(
MSG_FWTEST_02
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
"***** ENDSTOP X *****"
);
SERIAL_ECHOLN
(
"***** ENDSTOP X *****"
);
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1
if
(
!
READ
(
X_MIN_PIN
)
^
X_MIN_ENDSTOP_INVERTING
){
if
(
!
READ
(
X_MIN_PIN
)
^
X_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP X APERTO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP X:
"
);
#elif defined(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1
#elif defined(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1
if
(
!
READ
(
X_MAX_PIN
)
^
X_MAX_ENDSTOP_INVERTING
){
if
(
!
READ
(
X_MAX_PIN
)
^
X_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP X APERTO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP X:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_OPEN
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"
Endstop X ER
R"
);
SERIAL_ECHOLN
(
"
X ENDSTOP ERRO
R"
);
#if X_HOME_DIR == -1
#if X_HOME_DIR == -1
SERIAL_ECHOLN
(
"Invertire valore in #define X_MIN_ENDSTOP_INVERTING"
);
SERIAL_ECHOLN
(
"Invertire valore in #define X_MIN_ENDSTOP_INVERTING"
);
#else
#else
...
@@ -5962,37 +5964,40 @@ void FirmwareTest(){
...
@@ -5962,37 +5964,40 @@ void FirmwareTest(){
return
;
return
;
}
}
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop X."
);
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop X."
);
SERIAL_ECHOLN
(
"Dare il comando Y per andare avanti"
);
SERIAL_ECHOLN
(
MSG_FWTEST_YES
);
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
while
(
serial_char
!=
'Y'
){
while
(
serial_char
!=
'Y'
){
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
}
}
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1
if
(
READ
(
X_MIN_PIN
)
^
X_MIN_ENDSTOP_INVERTING
){
if
(
READ
(
X_MIN_PIN
)
^
X_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP X CHIUSO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP X:
"
);
#elif defined(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1
#elif defined(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1
if
(
READ
(
X_MAX_PIN
)
^
X_MAX_ENDSTOP_INVERTING
){
if
(
READ
(
X_MAX_PIN
)
^
X_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP X CHIUSO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP X:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_HIT
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"Endstop X ERR! Controllare cavi e connessioni"
);
SERIAL_ECHO
(
"X "
);
SERIAL_ECHOLN
(
MSG_FWTEST_ENDSTOP_ERR
);
return
;
return
;
}
}
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
"***** ENDSTOP Y *****"
);
SERIAL_ECHOLN
(
"***** ENDSTOP Y *****"
);
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1
if
(
!
READ
(
Y_MIN_PIN
)
^
Y_MIN_ENDSTOP_INVERTING
){
if
(
!
READ
(
Y_MIN_PIN
)
^
Y_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP Y APERTO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP Y:
"
);
#elif defined(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1
#elif defined(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1
if
(
!
READ
(
Y_MAX_PIN
)
^
Y_MAX_ENDSTOP_INVERTING
){
if
(
!
READ
(
Y_MAX_PIN
)
^
Y_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP Y APERTO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP Y:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_OPEN
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"
Endstop Y ER
R"
);
SERIAL_ECHOLN
(
"
Y ENDSTOP ERRO
R"
);
#if Y_HOME_DIR == -1
#if Y_HOME_DIR == -1
SERIAL_ECHOLN
(
"Invertire valore in #define Y_MIN_ENDSTOP_INVERTING"
);
SERIAL_ECHOLN
(
"Invertire valore in #define Y_MIN_ENDSTOP_INVERTING"
);
#else
#else
...
@@ -6001,37 +6006,40 @@ void FirmwareTest(){
...
@@ -6001,37 +6006,40 @@ void FirmwareTest(){
return
;
return
;
}
}
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop Y."
);
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop Y."
);
SERIAL_ECHOLN
(
"Dare il comando Y per andare avanti"
);
SERIAL_ECHOLN
(
MSG_FWTEST_YES
);
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
while
(
serial_char
!=
'Y'
){
while
(
serial_char
!=
'Y'
){
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
}
}
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1
if
(
READ
(
Y_MIN_PIN
)
^
Y_MIN_ENDSTOP_INVERTING
){
if
(
READ
(
Y_MIN_PIN
)
^
Y_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP Y CHIUSO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP Y:
"
);
#elif defined(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1
#elif defined(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1
if
(
READ
(
Y_MAX_PIN
)
^
Y_MAX_ENDSTOP_INVERTING
){
if
(
READ
(
Y_MAX_PIN
)
^
Y_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP Y CHIUSO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP Y:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_HIT
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"Endstop Y ERR! Controllare cavi e connessioni"
);
SERIAL_ECHO
(
"Y "
);
SERIAL_ECHOLN
(
MSG_FWTEST_ENDSTOP_ERR
);
return
;
return
;
}
}
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
"***** ENDSTOP Z *****"
);
SERIAL_ECHOLN
(
"***** ENDSTOP Z *****"
);
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1
if
(
!
READ
(
Z_MIN_PIN
)
^
Z_MIN_ENDSTOP_INVERTING
){
if
(
!
READ
(
Z_MIN_PIN
)
^
Z_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP Z APERTO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP Z:
"
);
#elif defined(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1
#elif defined(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1
if
(
!
READ
(
Z_MAX_PIN
)
^
Z_MAX_ENDSTOP_INVERTING
){
if
(
!
READ
(
Z_MAX_PIN
)
^
Z_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP Z APERTO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP Z:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_OPEN
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"
Endstop Z ER
R"
);
SERIAL_ECHOLN
(
"
Z ENDSTOP ERRO
R"
);
#if Z_HOME_DIR == -1
#if Z_HOME_DIR == -1
SERIAL_ECHOLN
(
"Invertire valore in #define Z_MIN_ENDSTOP_INVERTING"
);
SERIAL_ECHOLN
(
"Invertire valore in #define Z_MIN_ENDSTOP_INVERTING"
);
#else
#else
...
@@ -6040,27 +6048,29 @@ void FirmwareTest(){
...
@@ -6040,27 +6048,29 @@ void FirmwareTest(){
return
;
return
;
}
}
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop Z."
);
SERIAL_ECHOLN
(
"Premere e tenere premuto l'endstop Z."
);
SERIAL_ECHOLN
(
"Dare il comando Y per andare avanti"
);
SERIAL_ECHOLN
(
MSG_FWTEST_YES
);
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
while
(
serial_char
!=
'Y'
){
while
(
serial_char
!=
'Y'
){
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
}
}
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1
if
(
READ
(
Z_MIN_PIN
)
^
Z_MIN_ENDSTOP_INVERTING
){
if
(
READ
(
Z_MIN_PIN
)
^
Z_MIN_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MIN ENDSTOP Z CHIUSO
"
);
SERIAL_ECHO
(
"MIN ENDSTOP Z:
"
);
#elif defined(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1
#elif defined(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1
if
(
READ
(
Z_MAX_PIN
)
^
Z_MAX_ENDSTOP_INVERTING
){
if
(
READ
(
Z_MAX_PIN
)
^
Z_MAX_ENDSTOP_INVERTING
){
SERIAL_ECHO
LN
(
"MAX ENDSTOP Z CHIUSO
"
);
SERIAL_ECHO
(
"MAX ENDSTOP Z:
"
);
#endif
#endif
SERIAL_ECHOLN
(
MSG_ENDSTOP_HIT
);
}
}
else
else
{
{
SERIAL_ECHOLN
(
"Endstop Z ERR! Controllare cavi e connessioni"
);
SERIAL_ECHO
(
"Z "
);
SERIAL_ECHOLN
(
MSG_FWTEST_ENDSTOP_ERR
);
return
;
return
;
}
}
SERIAL_ECHOLN
(
"ENDSTOP OK"
);
SERIAL_ECHOLN
(
"ENDSTOP OK"
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
" "
);
SERIAL_ECHOLN
(
"TEST MOTOR
I
SOON"
);
SERIAL_ECHOLN
(
"TEST MOTOR SOON"
);
serial_char
=
MYSERIAL
.
read
();
serial_char
=
MYSERIAL
.
read
();
}
}
#endif //FIRMWARE_TEST
#endif //FIRMWARE_TEST
...
...
MarlinKimbra/language.h
View file @
91ba54ae
...
@@ -113,13 +113,11 @@
...
@@ -113,13 +113,11 @@
#define MSG_Y_MAX "y_max: "
#define MSG_Y_MAX "y_max: "
#define MSG_Z_MIN "z_min: "
#define MSG_Z_MIN "z_min: "
#define MSG_Z_MAX "z_max: "
#define MSG_Z_MAX "z_max: "
#ifdef NPR2
#define MSG_E_MIN "e_min: "
#define MSG_E_MIN "e_min: "
#endif // MPR2
#define MSG_M119_REPORT "Reporting endstop status"
#define MSG_M119_REPORT "Reporting endstop status"
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_HIT "TRIGGERED"
#define MSG_ENDSTOP_OPEN "
open
"
#define MSG_ENDSTOP_OPEN "
OPEN
"
#define MSG_HOTEND_OFFSET "Hotend offsets:"
#define MSG_HOTEND_OFFSET "Hotend offsets:"
#define MSG_EMPTY_PLANE "Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
#define MSG_EMPTY_PLANE "Autolevel can only be execute on an actual plane, make sure width and height are not 0!"
...
@@ -286,6 +284,14 @@
...
@@ -286,6 +284,14 @@
#define MSG_CONFIG "Configuration"
#define MSG_CONFIG "Configuration"
#define MSG_BAUDRATE "Baudrate"
#define MSG_BAUDRATE "Baudrate"
#ifdef FIRMWARE_TEST
#define MSG_FWTEST_YES "Put the Y command to go forward"
#define MSG_FWTEST_NO "Put the N command to go forward"
#define MSG_FWTEST_ENDSTOP_ERR "ENDSTOP ERROR! Check wire and connection"
#define MSG_FWTEST_01 "Manually move the axes X, Y and Z away from the endstop"
#define MSG_FWTEST_02 "Start check ENDSTOP"
#endif
#endif
#endif
...
@@ -1093,6 +1099,14 @@
...
@@ -1093,6 +1099,14 @@
#define MSG_CONFIG "Configuration"
#define MSG_CONFIG "Configuration"
#define MSG_BAUDRATE "Baudrate"
#define MSG_BAUDRATE "Baudrate"
#ifdef FIRMWARE_TEST
#define MSG_FWTEST_YES "Dai il comando Y per andare avanti"
#define MSG_FWTEST_NO "Dai il comando N per andare avanti"
#define MSG_FWTEST_ENDSTOP_ERR "ENDSTOP ERROR! Controllare cavi e connessioni"
#define MSG_FWTEST_01 "Muovi manualmente gli assi X, Y e Z lontano dagli endstop"
#define MSG_FWTEST_02 "Inizio controllo ENDSTOP"
#endif // FIRMWARE_TEST
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment