Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
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
Printrun
Commits
82aa15be
Commit
82aa15be
authored
Nov 20, 2011
by
Kliment Yanev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:kliment/Printrun
parents
db0b48ce
42c00fca
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
649 additions
and
605 deletions
+649
-605
blupload.py
blupload.py
+0
-41
fr.po
locale/fr/LC_MESSAGES/fr.po
+235
-305
pronterface.mo
locale/fr/LC_MESSAGES/pronterface.mo
+0
-0
pronterface.pot
locale/pronterface.pot
+210
-229
pronsole.py
pronsole.py
+3
-3
pronterface.py
pronterface.py
+201
-27
No files found.
blupload.py
deleted
100644 → 0
View file @
db0b48ce
import
printcore
,
time
,
sys
,
os
def
dosify
(
name
):
return
os
.
path
.
split
(
name
)[
1
]
.
split
(
"."
)[
0
][:
8
]
+
".g"
def
blupload
(
printer
,
filename
,
path
):
printer
.
send_now
(
"M28 "
+
dosify
(
filename
))
printer
.
startprint
([
i
.
replace
(
"
\n
"
,
""
)
for
i
in
open
(
path
)])
try
:
sys
.
stdout
.
write
(
"Progress: 00.0
%
"
)
sys
.
stdout
.
flush
()
while
(
printer
.
printing
):
time
.
sleep
(
1
)
sys
.
stdout
.
write
(
"
\b\b\b\b
%02.1
f
%%
"
%
(
100
*
float
(
printer
.
queueindex
)
/
len
(
printer
.
mainqueue
),)
)
sys
.
stdout
.
flush
()
printer
.
send_now
(
"M29 "
+
dosify
(
filename
))
print
"Done uploading, disconnecting with a 5 second timeout in case the printer has something important to say."
printer
.
disconnect
()
time
.
sleep
(
5
)
print
"Upload complete. Goodbye!"
except
:
print
"Abort, disconnecting with a 5 second timeout in case the printer has something important to say."
printer
.
disconnect
()
if
__name__
==
'__main__'
:
#print "Usage: python blupload.py filename.gcode"
filename
=
"../prusamendel/sellsx_export.gcode"
tfilename
=
filename
if
len
(
sys
.
argv
)
>
1
:
filename
=
sys
.
argv
[
1
]
tfilename
=
os
.
path
.
basename
(
sys
.
argv
[
1
])
print
"Uploading: "
+
filename
,
" as "
+
dosify
(
tfilename
)
p
=
printcore
.
printcore
(
'/dev/ttyUSB0'
,
115200
)
p
.
loud
=
False
time
.
sleep
(
2
)
blupload
(
p
,
tfilename
,
filename
)
else
:
print
"Usage: python blupload.py filename.gcode"
locale/fr/LC_MESSAGES/fr.po
View file @
82aa15be
...
...
@@ -5,339 +5,237 @@
msgid ""
msgstr ""
"Project-Id-Version: Pronterface jm1\n"
"POT-Creation-Date: 2011-0
9-06 16:31+0100
\n"
"PO-Revision-Date: 2011-
09-06 16:32
+0100\n"
"POT-Creation-Date: 2011-0
8-06 13:27+PDT
\n"
"PO-Revision-Date: 2011-
11-16 16:53
+0100\n"
"Last-Translator: Cyril Laguilhon-Debat <c.laguilhon.debat@gmail.com>\n"
"Language-Team: FR <c.laguilhon.debat@gmail.com>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=
utf
-8\n"
"Content-Type: text/plain; charset=
UTF
-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:1
0
#: pronterface.py:1
5
msgid "WX is not installed. This program requires WX to run."
msgstr "wxWidgets n'est pas installé. Ce programme nécessite la librairie wxWidgets pour fonctionner."
#: pronterface.py:6
0
#: pronterface.py:6
7
msgid "Printer Interface"
msgstr "Interface imprimante"
#: pronterface.py:72
msgid "X+100"
msgstr ""
#: pronterface.py:73
msgid "X+10"
msgstr ""
#: pronterface.py:74
msgid "X+1"
msgstr ""
#: pronterface.py:75
msgid "X+0.1"
msgstr ""
#: pronterface.py:76
msgid "HomeX"
msgstr "Origine X"
#: pronterface.py:77
msgid "X-0.1"
msgstr ""
#: pronterface.py:78
msgid "X-1"
msgstr ""
#: pronterface.py:79
msgid "X-10"
msgstr ""
#: pronterface.py:80
msgid "X-100"
msgstr ""
#: pronterface.py:81
msgid "Y+100"
msgstr ""
#: pronterface.py:82
msgid "Y+10"
msgstr ""
#: pronterface.py:83
msgid "Y+1"
msgstr ""
#: pronterface.py:84
msgid "Y+0.1"
msgstr ""
#: pronterface.py:85
msgid "HomeY"
msgstr "Origine Y"
#: pronterface.py:86
msgid "Y-0.1"
msgstr ""
#: pronterface.py:87
msgid "Y-1"
msgstr ""
#: pronterface.py:88
msgid "Y-10"
msgstr ""
#: pronterface.py:89
msgid "Y-100"
msgstr ""
#: pronterface.py:90
msgid "Motors off"
msgstr "Arrêter les moteurs"
#: pronterface.py:91
msgid "Z+10"
msgstr ""
#: pronterface.py:92
msgid "Z+1"
msgstr ""
#: pronterface.py:93
msgid "Z+0.1"
msgstr ""
#: pronterface.py:94
msgid "HomeZ"
msgstr "Origine Z"
#: pronterface.py:95
msgid "Z-0.1"
msgstr ""
#: pronterface.py:96
msgid "Z-1"
msgstr ""
#: pronterface.py:97
msgid "Z-10"
msgstr ""
#: pronterface.py:98
msgid "Home"
msgstr "Origine"
#: pronterface.py:99
#: pronterface.py:81
msgid "Check temp"
msgstr "Lire les températures"
#: pronterface.py:
100
#: pronterface.py:
82
msgid "Extrude"
msgstr "Extruder"
#: pronterface.py:
101
#: pronterface.py:
83
msgid "Reverse"
msgstr "Inverser"
#: pronterface.py:
117
#: pronterface.py:
99
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
#: pronterface.py:1
22
#: pronterface.py:1
04
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr "Remarque! Vous avez spécifié des boutons personnalisés dans custombtn.txt et aussi dans .pronsolerc"
#: pronterface.py:1
23
#: pronterface.py:1
05
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr "Ignorant custombtn.txt. Retirez tous les boutons en cours pour revenir à custombtn.txt"
#: pronterface.py:1
46
#: pronterface.py:4
34
#: pronterface.py:
971
#: pronterface.py:1
020
#: pronterface.py:1
134
#: pronterface.py:1
161
#: pronterface.py:1
175
#: pronterface.py:1
30
#: pronterface.py:4
76
#: pronterface.py:
1228
#: pronterface.py:1
279
#: pronterface.py:1
396
#: pronterface.py:1
428
#: pronterface.py:1
443
msgid "Print"
msgstr "Imprimer"
#: pronterface.py:1
50
msgid "Printer is now online"
#: pronterface.py:1
34
msgid "Printer is now online
.
"
msgstr "L'imprimante est connectée"
#: pronterface.py:1
99
#: pronterface.py:1
88
msgid "Setting hotend temperature to "
msgstr "Réglage de la température de la buse à"
#: pronterface.py:1
99
#: pronterface.py:22
0
#: pronterface.py:1
88
#: pronterface.py:22
4
msgid " degrees Celsius."
msgstr " degrés Celsius."
#: pronterface.py:20
3
#: pronterface.py:2
24
#: pronterface.py:20
7
#: pronterface.py:2
42
msgid "Printer is not online."
msgstr "L'imprimante est déconnectée"
#: pronterface.py:20
5
#: pronterface.py:20
9
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr "Vous ne pouvez pas régler une température négative.Pour éteindre le chauffage de la buse, réglez sa température à 0°c."
#: pronterface.py:207
#: pronterface.py:228
msgid "You must enter a temperature."
msgstr "Vous devez saisir une température."
#: pronterface.py:220
#: pronterface.py:224
msgid "Setting bed temperature to "
msgstr "Réglage de la température du plateau à "
#: pronterface.py:2
26
#: pronterface.py:2
44
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr "Vous ne pouvez pas régler une température négative. Pour désactiver votre plateau chauffant, réglez sa température à 0°c."
#: pronterface.py:243
#: pronterface.py:246
msgid "You must enter a temperature."
msgstr "Vous devez saisir une température."
#: pronterface.py:261
msgid "Do you want to erase the macro?"
msgstr "Voulez-vous effacer la macro ?"
#: pronterface.py:2
47
#: pronterface.py:2
65
msgid "Cancelled."
msgstr "Annulé"
#: pronterface.py:277
#: pronterface.py:295
msgid " Opens file"
msgstr " Ouvrir un fichier"
#: pronterface.py:295
msgid "&Open..."
msgstr "&Ouvrir..."
#: pronterface.py:2
77
msgid "
Opens
file"
msgstr "
Ouvrir un fichier
"
#: pronterface.py:2
96
msgid "
Edit open
file"
msgstr "
Éditer le fichier ouvert
"
#: pronterface.py:2
78
#: pronterface.py:2
96
msgid "&Edit..."
msgstr "&Éditer..."
#: pronterface.py:2
78
msgid "
Edit open fi
le"
msgstr "
Éditer le fichier ouvert
"
#: pronterface.py:2
97
msgid "
Clear output conso
le"
msgstr "
Effacer le contenu de la console de sortie
"
#: pronterface.py:2
79
msgid "
E&xit
"
msgstr "
&Quitter
"
#: pronterface.py:2
97
msgid "
Clear console
"
msgstr "
Effacer la console
"
#: pronterface.py:2
79
#: pronterface.py:2
98
msgid " Closes the Window"
msgstr " Quitter le programme"
#: pronterface.py:280
#: pronterface.py:298
msgid "E&xit"
msgstr "&Quitter"
#: pronterface.py:299
msgid "&File"
msgstr "&Fichier"
#: pronterface.py:284
msgid "Clear console"
msgstr "Effacer la console"
#: pronterface.py:284
msgid " Clear output console"
msgstr "Effacer le contenu de la console de sortie"
#: pronterface.py:285
#: pronterface.py:304
msgid "&Macros"
msgstr "&Macros"
#: pronterface.py:
286
#: pronterface.py:
305
msgid "<&New...>"
msgstr "<&Nouvelle...>"
#: pronterface.py:287
msgid "&Options"
msgstr "&Options"
#: pronterface.py:287
#: pronterface.py:306
msgid " Options dialog"
msgstr " Fenêtre des options"
#: pronterface.py:
289
msgid "
SFACT Setting
s"
msgstr "
Paramètres &SFACT...
"
#: pronterface.py:
306
msgid "
&Option
s"
msgstr "
&Options
"
#: pronterface.py:
289
#: pronterface.py:
308
msgid " Adjust SFACT settings"
msgstr " Régler les paramètres SFACT"
#: pronterface.py:
292
msgid "SFACT
Quick
Settings"
msgstr "
Réglages rapides SFACT
"
#: pronterface.py:
308
msgid "SFACT Settings"
msgstr "
Paramètres &SFACT...
"
#: pronterface.py:
292
#: pronterface.py:
311
msgid " Quickly adjust SFACT settings for active profile"
msgstr " Réglages rapides des paramètres SFACT pour le profil actif."
#: pronterface.py:295
#: pronterface.py:311
msgid "SFACT Quick Settings"
msgstr "Réglages rapides SFACT"
#: pronterface.py:315
msgid "&Settings"
msgstr "&Paramètres"
#: pronterface.py:3
1
1
#: pronterface.py:3
3
1
msgid "Enter macro name"
msgstr "Saisissez le nom de la macro"
#: pronterface.py:3
1
4
#: pronterface.py:3
3
4
msgid "Macro name:"
msgstr "Nom :"
#: pronterface.py:3
1
7
#: pronterface.py:3
3
7
msgid "Ok"
msgstr "Valider"
#: pronterface.py:3
2
1
#: pronterface.py:1
197
#: pronterface.py:3
4
1
#: pronterface.py:1
465
msgid "Cancel"
msgstr "Annuler"
#: pronterface.py:339
msgid "Name '"
msgstr "Le nom '"
#: pronterface.py:339
#: pronterface.py:359
msgid "' is being used by built-in command"
msgstr "' est utilisé par des commandes internes."
#: pronterface.py:342
#: pronterface.py:359
msgid "Name '"
msgstr "Le nom '"
#: pronterface.py:362
msgid "Macro name may contain only alphanumeric symbols and underscores"
msgstr "Un nom de macro ne peut contenir que des caractères alphanumérique et des underscore (_)"
#: pronterface.py:
375
msgid "Port
:
"
#: pronterface.py:
411
msgid "Port"
msgstr "Port :"
#: pronterface.py:
397
#: pronterface.py:
430
msgid "Connect"
msgstr "Connecter"
#: pronterface.py:
399
#: pronterface.py:
432
msgid "Connect to the printer"
msgstr "Connecter l'imprimante"
#: pronterface.py:4
01
#: pronterface.py:4
34
msgid "Disconnect"
msgstr "Déconnecter"
#: pronterface.py:4
05
#: pronterface.py:4
38
msgid "Reset"
msgstr "Réinitialiser"
#: pronterface.py:4
08
#: pronterface.py:
592
#: pronterface.py:4
41
#: pronterface.py:
687
msgid "Mini mode"
msgstr "Mode réduit"
#: pronterface.py:4
14
#: pronterface.py:4
55
msgid ""
"Monitor\n"
"printer"
...
...
@@ -345,181 +243,189 @@ msgstr ""
"Surveiller\n"
"l'imprimante"
#: pronterface.py:4
23
#: pronterface.py:4
65
msgid "Load file"
msgstr "Charger un fichier"
#: pronterface.py:4
26
#: pronterface.py:4
68
msgid "SD Upload"
msgstr "Copier sur SD"
#: pronterface.py:4
30
#: pronterface.py:4
72
msgid "SD Print"
msgstr "Imprimer depuis SD"
#: pronterface.py:4
38
#: pronterface.py:1
021
#: pronterface.py:1
06
1
#: pronterface.py:1
109
#: pronterface.py:1
133
#: pronterface.py:1
160
#: pronterface.py:1
174
#: pronterface.py:4
80
#: pronterface.py:1
280
#: pronterface.py:1
32
1
#: pronterface.py:1
370
#: pronterface.py:1
395
#: pronterface.py:1
427
#: pronterface.py:1
442
msgid "Pause"
msgstr "Pause"
#: pronterface.py:4
58
#: pronterface.py:4
94
msgid "Send"
msgstr "Envoyer"
#: pronterface.py:
460
#: pronterface.py:
518
#: pronterface.py:
502
#: pronterface.py:
603
msgid "mm/min"
msgstr "mm/min"
#: pronterface.py:
462
#: pronterface.py:
504
msgid "XY:"
msgstr ""
msgstr "
XY:
"
#: pronterface.py:
464
#: pronterface.py:
506
msgid "Z:"
msgstr ""
msgstr "
Z:
"
#: pronterface.py:
481
#: pronterface.py:
529
msgid "Heater:"
msgstr "Buse :"
#: pronterface.py:489
#: pronterface.py:501
#: pronterface.py:532
#: pronterface.py:552
msgid "Off"
msgstr "Off"
#: pronterface.py:544
#: pronterface.py:564
msgid "Set"
msgstr "Régler"
#: pronterface.py:
493
#: pronterface.py:
549
msgid "Bed:"
msgstr "Plateau :"
#: pronterface.py:5
12
#: pronterface.py:5
97
msgid "mm"
msgstr "mm"
#: pronterface.py:
551
#: pronterface.py:
846
#: pronterface.py:1
05
5
#: pronterface.py:
636
#: pronterface.py:
1099
#: pronterface.py:1
31
5
msgid "Not connected to printer."
msgstr "Imprimante non connectée"
#: pronterface.py:
599
#: pronterface.py:
694
msgid "Full mode"
msgstr "Mode complet"
#: pronterface.py:637
#: pronterface.py:719
msgid "Execute command: "
msgstr "Exécuter la commande :"
#: pronterface.py:730
msgid "click to add new custom button"
msgstr "Ajouter un bouton personnalisé"
#: pronterface.py:751
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr "Définit des boutons personnalidés. Utilisation : <numero> \"Libelle\" [/c \"couleur\"] commande"
#: pronterface.py:
659
#: pronterface.py:
773
msgid "Custom button number should be between 0 and 63"
msgstr "Les numéros des boutons personnalisés doivent être compris entre 0 et 63."
#: pronterface.py:749
#, python-format
#: pronterface.py:865
msgid "Edit custom button '%s'"
msgstr "Editer le bouton personnalisé n°'%s'"
#: pronterface.py:
751
#: pronterface.py:
867
msgid "Move left <<"
msgstr "Déplacer vers la gauche <<"
#: pronterface.py:
754
#: pronterface.py:
870
msgid "Move right >>"
msgstr "Déplacer vers la droite >>"
#: pronterface.py:758
#, python-format
#: pronterface.py:874
msgid "Remove custom button '%s'"
msgstr "Supprimer le bouton personnalisé n°'%s'"
#: pronterface.py:
761
#: pronterface.py:
877
msgid "Add custom button"
msgstr "Ajouter un bouton personnalisé"
#: pronterface.py:
776
#: pronterface.py:
1022
msgid "event object missing"
msgstr "evennement d'objet manquant"
#: pronterface.py:
804
#: pronterface.py:
1050
msgid "Invalid period given."
msgstr "La période donnée est invalide"
#: pronterface.py:
807
#: pronterface.py:
1053
msgid "Monitoring printer."
msgstr "Surveillance de l'imprimante"
#: pronterface.py:
809
#: pronterface.py:
1055
msgid "Done monitoring."
msgstr "Surveillance de l'imprimante effectuée."
#: pronterface.py:
828
#: pronterface.py:
1077
msgid "Printer is online. "
msgstr "L'imprimante est connectée"
#: pronterface.py:
830
#: pronterface.py:
969
#: pronterface.py:1
019
#: pronterface.py:
1079
#: pronterface.py:
1226
#: pronterface.py:1
278
msgid "Loaded "
msgstr "Chargé "
#: pronterface.py:833
msgid "Hotend"
msgstr "Buse"
#: pronterface.py:833
#: pronterface.py:1082
msgid "Bed"
msgstr "Plateau"
#: pronterface.py:836
#, python-format
#: pronterface.py:1082
msgid "Hotend"
msgstr "Buse"
#: pronterface.py:1089
msgid " SD printing:%04.2f %%"
msgstr "Impression SD : %04.2f %%"
#: pronterface.py:838
#, python-format
#: pronterface.py:1091
msgid " Printing:%04.2f %%"
msgstr "Impression : %04.2f %%"
#: pronterface.py:
892
#: pronterface.py:
1149
msgid "Opening file failed."
msgstr "L'ouverture du fichier a échoué"
#: pronterface.py:
898
#: pronterface.py:
1155
msgid "Starting print"
msgstr "Début de l'impression..."
#: pronterface.py:921
msgid "Select the file to print"
msgstr "Sélectionnez le fichier à imprimer :"
#: pronterface.py:921
#: pronterface.py:1178
msgid "Pick SD file"
msgstr "Choisir un fichier sur la carte SD"
#: pronterface.py:949
#: pronterface.py:1178
msgid "Select the file to print"
msgstr "Sélectionnez le fichier à imprimer :"
#: pronterface.py:1206
msgid "Skeinforge execution failed."
msgstr "Exécution de Skeinforge échoué"
#: pronterface.py:
956
#: pronterface.py:
1213
msgid "Skeining..."
msgstr "Skeining..."
#: pronterface.py:969
#: pronterface.py:1019
#, python-format
#: pronterface.py:1226
#: pronterface.py:1278
msgid ", %d lines"
msgstr ", %d lignes"
#: pronterface.py:
978
#: pronterface.py:
1235
msgid "Skeining "
msgstr "Skeining "
#: pronterface.py:
980
#: pronterface.py:
1237
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
...
...
@@ -527,116 +433,140 @@ msgstr ""
"Skeinforge non trouvé. \n"
"Veuillez copier Skeinforge dans un répertoire nommé \"skeinforge\" placé dans le repertoire du programme."
#: pronterface.py:
999
#: pronterface.py:
1256
msgid "Open file to print"
msgstr "Ouvrir un fichier à imprimer"
#: pronterface.py:1
000
msgid "
STL and GCODE files (;*.gcode;*.g;*.stl;*.STL
;)"
msgstr "Fichiers
STL et GCODE (;*.gcode;*.g;*.stl;*.STL
;)"
#: pronterface.py:1
257
msgid "
OBJ, STL, and GCODE files (;*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ
;)"
msgstr "Fichiers
OBJ, STL et GCODE (;*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ
;)"
#: pronterface.py:1
007
#: pronterface.py:1
264
msgid "File not found!"
msgstr "Fichier non trouvé"
#: pronterface.py:1
029
#: pronterface.py:1
288
msgid "mm of filament used in this print\n"
msgstr "mm de filament utilisés pour cette impression\n"
#: pronterface.py:1030
#: pronterface.py:1031
#: pronterface.py:1032
msgid "the print goes from"
msgstr ""
#: pronterface.py:1030
#: pronterface.py:1031
#: pronterface.py:1032
msgid "mm to"
msgstr "mm à"
#: pronterface.py:1030
#: pronterface.py:1289
msgid ""
"mm in X\n"
"and is"
msgstr ""
"mm en X\n"
"et mesure"
#: pronterface.py:1
030
#: pronterface.py:1
031
#: pronterface.py:1
289
#: pronterface.py:1
290
msgid "mm wide\n"
msgstr ""
msgstr "
mm de large\n
"
#: pronterface.py:1031
#: pronterface.py:1289
#: pronterface.py:1290
#: pronterface.py:1291
msgid "mm to"
msgstr "mm à"
#: pronterface.py:1289
#: pronterface.py:1290
#: pronterface.py:1291
msgid "the print goes from"
msgstr "L'impression va de"
#: pronterface.py:1290
msgid ""
"mm in Y\n"
"and is"
msgstr ""
"mm en Y\n"
"et mesure"
#: pronterface.py:1291
msgid "mm high\n"
msgstr "mm de haut\n"
#: pronterface.py:1
032
#: pronterface.py:1
291
msgid ""
"mm in Z\n"
"and is"
msgstr ""
"mm en Z\n"
"et mesure"
#: pronterface.py:1
03
2
msgid "
mm high\n
"
msgstr ""
#: pronterface.py:1
29
2
msgid "
Estimated duration (pessimistic):
"
msgstr "
Durée estimée (pessimiste)
"
#: pronterface.py:1
05
2
#: pronterface.py:1
31
2
msgid "No file loaded. Please use load first."
msgstr "Aucun fichier chargé. Veuillez charger un fichier avant."
#: pronterface.py:1
06
3
#: pronterface.py:1
32
3
msgid "Restart"
msgstr "Recommencer"
#: pronterface.py:1
06
7
#: pronterface.py:1
32
7
msgid "File upload complete"
msgstr "Envoi du fichier terminé"
#: pronterface.py:1
08
6
#: pronterface.py:1
34
6
msgid "Pick SD filename"
msgstr "Lister les fichiers sur la carte SD"
#: pronterface.py:1102
#: pronterface.py:1353
msgid "Paused."
msgstr "En pause"
#: pronterface.py:1363
msgid "Resume"
msgstr "Reprendre"
#: pronterface.py:1168
#: pronterface.py:1379
msgid "Connecting..."
msgstr "Connection en cours..."
#: pronterface.py:1410
msgid "Disconnected."
msgstr "Déconnecté"
#: pronterface.py:1435
msgid "Reset."
msgstr "Réinitialiser"
#: pronterface.py:1436
msgid "Are you sure you want to reset the printer?"
msgstr "Etes-vous sûr de vouloir réinitialiser l'imprimante?"
#: pronterface.py:1
168
#: pronterface.py:1
436
msgid "Reset?"
msgstr "Réinitialiser ?"
#: pronterface.py:1
193
#: pronterface.py:1
461
msgid "Save"
msgstr "Enregistrer"
#: pronterface.py:1
248
#: pronterface.py:1
519
msgid "Edit settings"
msgstr "Modifier les paramètres"
#: pronterface.py:1
250
#: pronterface.py:1
521
msgid "Defaults"
msgstr "Paramètres par défaut"
#: pronterface.py:1
272
#: pronterface.py:1
543
msgid "Custom button"
msgstr "Commande personnalisée"
#: pronterface.py:1
280
#: pronterface.py:1
551
msgid "Button title"
msgstr "Titre du bouton"
#: pronterface.py:1
283
#: pronterface.py:1
554
msgid "Command"
msgstr "Commande"
#: pronterface.py:1
292
#: pronterface.py:1
563
msgid "Color"
msgstr "Couleur"
#~ msgid "&Print"
#~ msgstr "&Imprimer"
locale/fr/LC_MESSAGES/pronterface.mo
View file @
82aa15be
No preview for this file type
locale/pronterface.pot
View file @
82aa15be
...
...
@@ -15,542 +15,523 @@ msgstr ""
"Generated-By: pygettext.py 1.5\n"
#: pronterface.py:1
0
#: pronterface.py:1
5
msgid "WX is not installed. This program requires WX to run."
msgstr ""
#: pronterface.py:55
msgid "Printer Interface"
msgstr ""
#: pronterface.py:67
msgid "X+100"
msgstr ""
#: pronterface.py:68
msgid "X+10"
msgstr ""
#: pronterface.py:69
msgid "X+1"
msgstr ""
#: pronterface.py:70
msgid "X+0.1"
msgstr ""
#: pronterface.py:71
msgid "HomeX"
msgstr ""
#: pronterface.py:72
msgid "X-0.1"
msgstr ""
#: pronterface.py:73
msgid "X-1"
msgstr ""
#: pronterface.py:74
msgid "X-10"
msgstr ""
#: pronterface.py:75
msgid "X-100"
msgstr ""
#: pronterface.py:76
msgid "Y+100"
msgstr ""
#: pronterface.py:77
msgid "Y+10"
msgstr ""
#: pronterface.py:78
msgid "Y+1"
msgstr ""
#: pronterface.py:79
msgid "Y+0.1"
msgid "Printer Interface"
msgstr ""
#: pronterface.py:80
msgid "HomeY"
msgstr ""
#: pronterface.py:81
msgid "Y-0.1"
msgstr ""
#: pronterface.py:82
msgid "Y-1"
msgstr ""
#: pronterface.py:83
msgid "Y-10"
msgstr ""
#: pronterface.py:84
msgid "Y-100"
msgstr ""
#: pronterface.py:85
msgid "Motors off"
msgstr ""
#: pronterface.py:86
msgid "Z+10"
msgstr ""
#: pronterface.py:87
msgid "Z+1"
msgstr ""
#: pronterface.py:88
msgid "Z+0.1"
msgstr ""
#: pronterface.py:89
msgid "HomeZ"
msgstr ""
#: pronterface.py:90
msgid "Z-0.1"
msgstr ""
#: pronterface.py:91
msgid "Z-1"
msgstr ""
#: pronterface.py:92
msgid "Z-10"
msgstr ""
#: pronterface.py:93
msgid "Home"
msgstr ""
#: pronterface.py:94
#: pronterface.py:81
msgid "Check temp"
msgstr ""
#: pronterface.py:
95
#: pronterface.py:
82
msgid "Extrude"
msgstr ""
#: pronterface.py:
96
#: pronterface.py:
83
msgid "Reverse"
msgstr ""
#: pronterface.py:
112
#: pronterface.py:
99
msgid ""
"# I moved all your custom buttons into .pronsolerc.\n"
"# Please don't add them here any more.\n"
"# Backup of your old buttons is in custombtn.old\n"
msgstr ""
#: pronterface.py:1
17
#: pronterface.py:1
04
msgid "Note!!! You have specified custom buttons in both custombtn.txt and .pronsolerc"
msgstr ""
#: pronterface.py:1
18
#: pronterface.py:1
05
msgid "Ignoring custombtn.txt. Remove all current buttons to revert to custombtn.txt"
msgstr ""
#: pronterface.py:1
41 pronterface.py:427 pronterface.py:956
#: pronterface.py:1
003 pronterface.py:1113 pronterface.py:1140
#: pronterface.py:1
154
#: pronterface.py:1
30 pronterface.py:476 pronterface.py:1228
#: pronterface.py:1
279 pronterface.py:1396 pronterface.py:1428
#: pronterface.py:1
443
msgid "Print"
msgstr ""
#: pronterface.py:1
45
msgid "Printer is now online"
#: pronterface.py:1
34
msgid "Printer is now online
.
"
msgstr ""
#: pronterface.py:1
94
#: pronterface.py:1
88
msgid "Setting hotend temperature to "
msgstr ""
#: pronterface.py:1
94 pronterface.py:215
#: pronterface.py:1
88 pronterface.py:224
msgid " degrees Celsius."
msgstr ""
#: pronterface.py:
198 pronterface.py:219
#: pronterface.py:
207 pronterface.py:242
msgid "Printer is not online."
msgstr ""
#: pronterface.py:20
0
#: pronterface.py:20
9
msgid "You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
msgstr ""
#: pronterface.py:202 pronterface.py:223
msgid "You must enter a temperature."
msgstr ""
#: pronterface.py:215
#: pronterface.py:224
msgid "Setting bed temperature to "
msgstr ""
#: pronterface.py:2
21
#: pronterface.py:2
44
msgid "You cannot set negative temperatures. To turn the bed off entirely, set its temperature to 0."
msgstr ""
#: pronterface.py:238
#: pronterface.py:246
msgid "You must enter a temperature."
msgstr ""
#: pronterface.py:261
msgid "Do you want to erase the macro?"
msgstr ""
#: pronterface.py:2
42
#: pronterface.py:2
65
msgid "Cancelled."
msgstr ""
#: pronterface.py:2
71
#: pronterface.py:2
95
msgid " Opens file"
msgstr ""
#: pronterface.py:2
71
#: pronterface.py:2
95
msgid "&Open..."
msgstr ""
#: pronterface.py:2
72
#: pronterface.py:2
96
msgid " Edit open file"
msgstr ""
#: pronterface.py:2
72
#: pronterface.py:2
96
msgid "&Edit..."
msgstr ""
#: pronterface.py:274
msgid " Adjust SFACT settings"
msgstr ""
#: pronterface.py:274
msgid "SFACT Settings"
#: pronterface.py:297
msgid " Clear output console"
msgstr ""
#: pronterface.py:277
msgid " Quickly adjust SFACT settings for active profile"
msgstr ""
#: pronterface.py:277
msgid "SFACT Quick Settings"
#: pronterface.py:297
msgid "Clear console"
msgstr ""
#: pronterface.py:2
81
#: pronterface.py:2
98
msgid " Closes the Window"
msgstr ""
#: pronterface.py:2
81
#: pronterface.py:2
98
msgid "E&xit"
msgstr ""
#: pronterface.py:2
82
msgid "&
Print
"
#: pronterface.py:2
99
msgid "&
File
"
msgstr ""
#: pronterface.py:
285
#: pronterface.py:
304
msgid "&Macros"
msgstr ""
#: pronterface.py:
286
#: pronterface.py:
305
msgid "<&New...>"
msgstr ""
#: pronterface.py:
287
#: pronterface.py:
306
msgid " Options dialog"
msgstr ""
#: pronterface.py:
287
#: pronterface.py:
306
msgid "&Options"
msgstr ""
#: pronterface.py:288
#: pronterface.py:308
msgid " Adjust SFACT settings"
msgstr ""
#: pronterface.py:308
msgid "SFACT Settings"
msgstr ""
#: pronterface.py:311
msgid " Quickly adjust SFACT settings for active profile"
msgstr ""
#: pronterface.py:311
msgid "SFACT Quick Settings"
msgstr ""
#: pronterface.py:315
msgid "&Settings"
msgstr ""
#: pronterface.py:3
04
#: pronterface.py:3
31
msgid "Enter macro name"
msgstr ""
#: pronterface.py:3
07
#: pronterface.py:3
34
msgid "Macro name:"
msgstr ""
#: pronterface.py:3
10
#: pronterface.py:3
37
msgid "Ok"
msgstr ""
#: pronterface.py:3
14
#: pronterface.py:3
41 pronterface.py:1465
msgid "Cancel"
msgstr ""
#: pronterface.py:3
32
#: pronterface.py:3
59
msgid "' is being used by built-in command"
msgstr ""
#: pronterface.py:3
32
#: pronterface.py:3
59
msgid "Name '"
msgstr ""
#: pronterface.py:368
msgid "Port:"
#: pronterface.py:362
msgid "Macro name may contain only alphanumeric symbols and underscores"
msgstr ""
#: pronterface.py:411
msgid "Port"
msgstr ""
#: pronterface.py:
39
0
#: pronterface.py:
43
0
msgid "Connect"
msgstr ""
#: pronterface.py:
39
2
#: pronterface.py:
43
2
msgid "Connect to the printer"
msgstr ""
#: pronterface.py:
39
4
#: pronterface.py:
43
4
msgid "Disconnect"
msgstr ""
#: pronterface.py:
39
8
#: pronterface.py:
43
8
msgid "Reset"
msgstr ""
#: pronterface.py:4
01 pronterface.py:579
#: pronterface.py:4
41 pronterface.py:687
msgid "Mini mode"
msgstr ""
#: pronterface.py:4
07
#: pronterface.py:4
55
msgid ""
"Monitor\n"
"printer"
msgstr ""
#: pronterface.py:4
16
#: pronterface.py:4
65
msgid "Load file"
msgstr ""
#: pronterface.py:4
19
#: pronterface.py:4
68
msgid "SD Upload"
msgstr ""
#: pronterface.py:4
23
#: pronterface.py:4
72
msgid "SD Print"
msgstr ""
#: pronterface.py:4
31 pronterface.py:1004 pronterface.py:1040
#: pronterface.py:1
088 pronterface.py:1112 pronterface.py:1139
#: pronterface.py:1
153
#: pronterface.py:4
80 pronterface.py:1280 pronterface.py:1321
#: pronterface.py:1
370 pronterface.py:1395 pronterface.py:1427
#: pronterface.py:1
442
msgid "Pause"
msgstr ""
#: pronterface.py:4
45
#: pronterface.py:4
94
msgid "Send"
msgstr ""
#: pronterface.py:
453 pronterface.py:511
#: pronterface.py:
502 pronterface.py:603
msgid "mm/min"
msgstr ""
#: pronterface.py:
455
#: pronterface.py:
504
msgid "XY:"
msgstr ""
#: pronterface.py:
457
#: pronterface.py:
506
msgid "Z:"
msgstr ""
#: pronterface.py:
474
#: pronterface.py:
529
msgid "Heater:"
msgstr ""
#: pronterface.py:482 pronterface.py:494
#: pronterface.py:532 pronterface.py:552
msgid "Off"
msgstr ""
#: pronterface.py:544 pronterface.py:564
msgid "Set"
msgstr ""
#: pronterface.py:
486
#: pronterface.py:
549
msgid "Bed:"
msgstr ""
#: pronterface.py:5
05
#: pronterface.py:5
97
msgid "mm"
msgstr ""
#: pronterface.py:
538 pronterface.py:833 pronterface.py:1034
#: pronterface.py:
636 pronterface.py:1099 pronterface.py:1315
msgid "Not connected to printer."
msgstr ""
#: pronterface.py:
586
#: pronterface.py:
694
msgid "Full mode"
msgstr ""
#: pronterface.py:624
#: pronterface.py:719
msgid "Execute command: "
msgstr ""
#: pronterface.py:730
msgid "click to add new custom button"
msgstr ""
#: pronterface.py:751
msgid "Defines custom button. Usage: button <num> \"title\" [/c \"colour\"] command"
msgstr ""
#: pronterface.py:
646
#: pronterface.py:
773
msgid "Custom button number should be between 0 and 63"
msgstr ""
#: pronterface.py:
736
#: pronterface.py:
865
msgid "Edit custom button '%s'"
msgstr ""
#: pronterface.py:
738
#: pronterface.py:
867
msgid "Move left <<"
msgstr ""
#: pronterface.py:
741
#: pronterface.py:
870
msgid "Move right >>"
msgstr ""
#: pronterface.py:
745
#: pronterface.py:
874
msgid "Remove custom button '%s'"
msgstr ""
#: pronterface.py:
748
#: pronterface.py:
877
msgid "Add custom button"
msgstr ""
#: pronterface.py:
763
#: pronterface.py:
1022
msgid "event object missing"
msgstr ""
#: pronterface.py:
791
#: pronterface.py:
1050
msgid "Invalid period given."
msgstr ""
#: pronterface.py:
794
#: pronterface.py:
1053
msgid "Monitoring printer."
msgstr ""
#: pronterface.py:
796
#: pronterface.py:
1055
msgid "Done monitoring."
msgstr ""
#: pronterface.py:
815
#: pronterface.py:
1077
msgid "Printer is online. "
msgstr ""
#: pronterface.py:
817 pronterface.py:954 pronterface.py:1002
#: pronterface.py:
1079 pronterface.py:1226 pronterface.py:1278
msgid "Loaded "
msgstr ""
#: pronterface.py:
820
#: pronterface.py:
1082
msgid "Bed"
msgstr ""
#: pronterface.py:
820
#: pronterface.py:
1082
msgid "Hotend"
msgstr ""
#: pronterface.py:
823
#: pronterface.py:
1089
msgid " SD printing:%04.2f %%"
msgstr ""
#: pronterface.py:
825
#: pronterface.py:
1091
msgid " Printing:%04.2f %%"
msgstr ""
#: pronterface.py:
87
9
#: pronterface.py:
114
9
msgid "Opening file failed."
msgstr ""
#: pronterface.py:
88
5
#: pronterface.py:
115
5
msgid "Starting print"
msgstr ""
#: pronterface.py:
90
8
#: pronterface.py:
117
8
msgid "Pick SD file"
msgstr ""
#: pronterface.py:
90
8
#: pronterface.py:
117
8
msgid "Select the file to print"
msgstr ""
#: pronterface.py:
93
6
#: pronterface.py:
120
6
msgid "Skeinforge execution failed."
msgstr ""
#: pronterface.py:
94
3
#: pronterface.py:
121
3
msgid "Skeining..."
msgstr ""
#: pronterface.py:
954 pronterface.py:1002
#: pronterface.py:
1226 pronterface.py:1278
msgid ", %d lines"
msgstr ""
#: pronterface.py:
963
#: pronterface.py:
1235
msgid "Skeining "
msgstr ""
#: pronterface.py:
965
#: pronterface.py:
1237
msgid ""
"Skeinforge not found. \n"
"Please copy Skeinforge into a directory named \"skeinforge\" in the same directory as this file."
msgstr ""
#: pronterface.py:
984
#: pronterface.py:
1256
msgid "Open file to print"
msgstr ""
#: pronterface.py:
985
msgid "
STL and GCODE files (;*.gcode;*.g;*.stl;*.STL
;)"
#: pronterface.py:
1257
msgid "
OBJ, STL, and GCODE files (;*.gcode;*.gco;*.g;*.stl;*.STL;*.obj;*.OBJ
;)"
msgstr ""
#: pronterface.py:
992
#: pronterface.py:
1264
msgid "File not found!"
msgstr ""
#: pronterface.py:1011
msgid "mm of filament used in this print"
#: pronterface.py:1288
msgid ""
"mm of filament used in this print\n"
msgstr ""
#: pronterface.py:1289
msgid ""
"mm in X\n"
"and is"
msgstr ""
#: pronterface.py:1289 pronterface.py:1290
msgid ""
"mm wide\n"
msgstr ""
#: pronterface.py:1289 pronterface.py:1290 pronterface.py:1291
msgid "mm to"
msgstr ""
#: pronterface.py:1289 pronterface.py:1290 pronterface.py:1291
msgid "the print goes from"
msgstr ""
#: pronterface.py:1290
msgid ""
"mm in Y\n"
"and is"
msgstr ""
#: pronterface.py:1291
msgid ""
"mm high\n"
msgstr ""
#: pronterface.py:1291
msgid ""
"mm in Z\n"
"and is"
msgstr ""
#: pronterface.py:1031
#: pronterface.py:1292
msgid "Estimated duration (pessimistic): "
msgstr ""
#: pronterface.py:1312
msgid "No file loaded. Please use load first."
msgstr ""
#: pronterface.py:1
042
#: pronterface.py:1
323
msgid "Restart"
msgstr ""
#: pronterface.py:1
046
#: pronterface.py:1
327
msgid "File upload complete"
msgstr ""
#: pronterface.py:1
065
#: pronterface.py:1
346
msgid "Pick SD filename"
msgstr ""
#: pronterface.py:1081
#: pronterface.py:1353
msgid "Paused."
msgstr ""
#: pronterface.py:1363
msgid "Resume"
msgstr ""
#: pronterface.py:1147
#: pronterface.py:1379
msgid "Connecting..."
msgstr ""
#: pronterface.py:1410
msgid "Disconnected."
msgstr ""
#: pronterface.py:1435
msgid "Reset."
msgstr ""
#: pronterface.py:1436
msgid "Are you sure you want to reset the printer?"
msgstr ""
#: pronterface.py:1
147
#: pronterface.py:1
436
msgid "Reset?"
msgstr ""
#: pronterface.py:1226
#: pronterface.py:1461
msgid "Save"
msgstr ""
#: pronterface.py:1519
msgid "Edit settings"
msgstr ""
#: pronterface.py:1
228
#: pronterface.py:1
521
msgid "Defaults"
msgstr ""
#: pronterface.py:1
250
#: pronterface.py:1
543
msgid "Custom button"
msgstr ""
#: pronterface.py:1
258
#: pronterface.py:1
551
msgid "Button title"
msgstr ""
#: pronterface.py:1
261
#: pronterface.py:1
554
msgid "Command"
msgstr ""
#: pronterface.py:1
270
#: pronterface.py:1
563
msgid "Color"
msgstr ""
pronsole.py
View file @
82aa15be
...
...
@@ -147,9 +147,9 @@ class Settings:
self
.
port
=
""
self
.
baudrate
=
115200
self
.
temperature_pla
=
185
self
.
temperature_abs
=
230
.0
self
.
bedtemp_pla
=
60
.0
self
.
bedtemp_abs
=
110
.0
self
.
temperature_abs
=
230
self
.
bedtemp_pla
=
60
self
.
bedtemp_abs
=
110
self
.
xy_feedrate
=
3000
self
.
z_feedrate
=
200
self
.
e_feedrate
=
300
...
...
pronterface.py
View file @
82aa15be
...
...
@@ -117,6 +117,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
starttime
=
0
self
.
curlayer
=
0
self
.
cur_button
=
None
self
.
hsetpoint
=
0.0
self
.
bsetpoint
=
0.0
def
startcb
(
self
):
self
.
starttime
=
time
.
time
()
...
...
@@ -184,14 +186,29 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
p
.
online
:
self
.
p
.
send_now
(
"M104 S"
+
l
)
print
_
(
"Setting hotend temperature to "
),
f
,
_
(
" degrees Celsius."
)
self
.
htemp
.
SetValue
(
l
)
self
.
set
(
"last_temperature"
,
str
(
f
))
self
.
hsetpoint
=
f
#self.tgauge.SetTarget(int(f))
if
f
>
0
:
self
.
htemp
.
SetValue
(
l
)
self
.
set
(
"last_temperature"
,
str
(
f
))
self
.
settoff
.
SetBackgroundColour
(
""
)
self
.
settoff
.
SetForegroundColour
(
""
)
self
.
settbtn
.
SetBackgroundColour
(
"#FFAA66"
)
self
.
settbtn
.
SetForegroundColour
(
"#660000"
)
self
.
htemp
.
SetBackgroundColour
(
"#FFDABB"
)
else
:
self
.
settoff
.
SetBackgroundColour
(
"#0044CC"
)
self
.
settoff
.
SetForegroundColour
(
"white"
)
self
.
settbtn
.
SetBackgroundColour
(
""
)
self
.
settbtn
.
SetForegroundColour
(
""
)
self
.
htemp
.
SetBackgroundColour
(
"white"
)
self
.
htemp
.
Refresh
()
else
:
print
_
(
"Printer is not online."
)
else
:
print
_
(
"You cannot set negative temperatures. To turn the hotend off entirely, set its temperature to 0."
)
except
:
print
_
(
"You must enter a temperature.
"
)
except
Exception
,
x
:
print
_
(
"You must enter a temperature.
(
%
s)"
%
(
repr
(
x
),)
)
def
do_bedtemp
(
self
,
l
=
""
):
try
:
...
...
@@ -205,8 +222,22 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
self
.
p
.
online
:
self
.
p
.
send_now
(
"M140 S"
+
l
)
print
_
(
"Setting bed temperature to "
),
f
,
_
(
" degrees Celsius."
)
self
.
btemp
.
SetValue
(
l
)
self
.
set
(
"last_bed_temperature"
,
str
(
f
))
self
.
bsetpoint
=
f
if
f
>
0
:
self
.
btemp
.
SetValue
(
l
)
self
.
set
(
"last_bed_temperature"
,
str
(
f
))
self
.
setboff
.
SetBackgroundColour
(
""
)
self
.
setboff
.
SetForegroundColour
(
""
)
self
.
setbbtn
.
SetBackgroundColour
(
"#FFAA66"
)
self
.
setbbtn
.
SetForegroundColour
(
"#660000"
)
self
.
btemp
.
SetBackgroundColour
(
"#FFDABB"
)
else
:
self
.
setboff
.
SetBackgroundColour
(
"#0044CC"
)
self
.
setboff
.
SetForegroundColour
(
"white"
)
self
.
setbbtn
.
SetBackgroundColour
(
""
)
self
.
setbbtn
.
SetForegroundColour
(
""
)
self
.
btemp
.
SetBackgroundColour
(
"white"
)
self
.
btemp
.
Refresh
()
else
:
print
_
(
"Printer is not online."
)
else
:
...
...
@@ -409,6 +440,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
uts
.
Add
(
self
.
resetbtn
)
self
.
minibtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Mini mode"
),
pos
=
(
690
,
0
))
self
.
minibtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
toggleview
)
#self.tgauge=TempGauge(self.panel,size=(300,24))
#def scroll_setpoint(e):
# if e.GetWheelRotation()>0:
# self.do_settemp(str(self.hsetpoint+1))
# elif e.GetWheelRotation()<0:
# self.do_settemp(str(max(0,self.hsetpoint-1)))
#self.tgauge.Bind(wx.EVT_MOUSEWHEEL,scroll_setpoint)
uts
.
Add
((
10
,
-
1
))
self
.
monitorbox
=
wx
.
CheckBox
(
self
.
panel
,
-
1
,
""
,
pos
=
(
450
,
37
))
uts
.
Add
((
15
,
-
1
))
...
...
@@ -418,6 +457,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
uts
.
Add
((
15
,
-
1
),
flag
=
wx
.
EXPAND
)
uts
.
Add
(
self
.
minibtn
)
#uts.Add(self.tgauge)
#SECOND ROW
ubs
=
self
.
upperbottomsizer
=
wx
.
BoxSizer
(
wx
.
HORIZONTAL
)
...
...
@@ -489,31 +529,50 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
lls
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
_
(
"Heater:"
),
pos
=
(
0
,
343
)),
pos
=
(
3
,
0
),
span
=
(
1
,
1
),
flag
=
wx
.
ALIGN_CENTER
)
htemp_choices
=
[
self
.
temps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
temps
.
keys
(),
key
=
lambda
x
:
self
.
temps
[
x
])]
self
.
settoff
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Off"
),
size
=
(
36
,
-
1
),
pos
=
(
45
,
335
))
self
.
settoff
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
do_settemp
(
"off"
))
self
.
printerControls
.
append
(
self
.
settoff
)
lls
.
Add
(
self
.
settoff
,
pos
=
(
3
,
1
),
span
=
(
1
,
1
))
if
self
.
settings
.
last_temperature
not
in
map
(
float
,
self
.
temps
.
values
()):
htemp_choices
=
[
str
(
self
.
settings
.
last_temperature
)]
+
htemp_choices
self
.
htemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
htemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
90
,
25
),
pos
=
(
45
,
337
))
choices
=
htemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
80
,
25
),
pos
=
(
45
,
337
))
self
.
htemp
.
Bind
(
wx
.
EVT_COMBOBOX
,
self
.
htemp_change
)
lls
.
Add
(
self
.
htemp
,
pos
=
(
3
,
1
),
span
=
(
1
,
3
))
self
.
settbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
335
))
lls
.
Add
(
self
.
htemp
,
pos
=
(
3
,
2
),
span
=
(
1
,
2
))
self
.
settbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
36
,
-
1
),
pos
=
(
125
,
335
))
self
.
settbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
do_settemp
)
self
.
printerControls
.
append
(
self
.
settbtn
)
lls
.
Add
(
self
.
settbtn
,
pos
=
(
3
,
4
),
span
=
(
1
,
1
))
lls
.
Add
(
wx
.
StaticText
(
self
.
panel
,
-
1
,
_
(
"Bed:"
),
pos
=
(
0
,
343
)),
pos
=
(
4
,
0
),
span
=
(
1
,
1
),
flag
=
wx
.
ALIGN_CENTER
)
btemp_choices
=
[
self
.
bedtemps
[
i
]
+
" ("
+
i
+
")"
for
i
in
sorted
(
self
.
bedtemps
.
keys
(),
key
=
lambda
x
:
self
.
temps
[
x
])]
self
.
setboff
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Off"
),
size
=
(
36
,
-
1
),
pos
=
(
135
,
335
))
self
.
setboff
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
self
.
do_bedtemp
(
"off"
))
self
.
printerControls
.
append
(
self
.
setboff
)
lls
.
Add
(
self
.
setboff
,
pos
=
(
4
,
1
),
span
=
(
1
,
1
))
if
self
.
settings
.
last_bed_temperature
not
in
map
(
float
,
self
.
bedtemps
.
values
()):
btemp_choices
=
[
str
(
self
.
settings
.
last_bed_temperature
)]
+
btemp_choices
self
.
btemp
=
wx
.
ComboBox
(
self
.
panel
,
-
1
,
choices
=
btemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
90
,
25
),
pos
=
(
45
,
367
))
choices
=
btemp_choices
,
style
=
wx
.
CB_DROPDOWN
,
size
=
(
80
,
25
),
pos
=
(
135
,
367
))
self
.
btemp
.
Bind
(
wx
.
EVT_COMBOBOX
,
self
.
btemp_change
)
lls
.
Add
(
self
.
btemp
,
pos
=
(
4
,
2
),
span
=
(
1
,
2
))
self
.
setbbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
365
))
self
.
setbbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
do_bedtemp
)
self
.
printerControls
.
append
(
self
.
setbbtn
)
lls
.
Add
(
self
.
setbbtn
,
pos
=
(
4
,
4
),
span
=
(
1
,
2
))
self
.
btemp
.
SetValue
(
str
(
self
.
settings
.
last_bed_temperature
))
self
.
htemp
.
SetValue
(
str
(
self
.
settings
.
last_temperature
))
## added for an error where only the bed would get (pla) or (abs).
#This ensures, if last temp is a default pla or abs, it will be marked so.
# if it is not, then a (user) remark is added. This denotes a manual entry
for
i
in
btemp_choices
:
if
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_bed_temperature
)
.
split
(
'.'
)[
0
]
or
i
.
split
()[
0
]
==
str
(
self
.
settings
.
last_bed_temperature
):
self
.
btemp
.
SetValue
(
i
)
...
...
@@ -526,12 +585,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
(
'('
not
in
self
.
htemp
.
Value
):
self
.
htemp
.
SetValue
(
self
.
htemp
.
Value
+
' (user)'
)
lls
.
Add
(
self
.
btemp
,
pos
=
(
4
,
1
),
span
=
(
1
,
3
))
self
.
setbbtn
=
wx
.
Button
(
self
.
panel
,
-
1
,
_
(
"Set"
),
size
=
(
38
,
-
1
),
pos
=
(
135
,
365
))
self
.
setbbtn
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
do_bedtemp
)
self
.
printerControls
.
append
(
self
.
setbbtn
)
lls
.
Add
(
self
.
setbbtn
,
pos
=
(
4
,
4
),
span
=
(
1
,
2
))
#lls.Add(self.btemp,pos=(4,1),span=(1,3))
#lls.Add(self.setbbtn,pos=(4,4),span=(1,2))
self
.
tempdisp
=
wx
.
StaticText
(
self
.
panel
,
-
1
,
""
)
lls
.
Add
(
self
.
tempdisp
,
pos
=
(
4
,
6
),
span
=
(
1
,
3
))
...
...
@@ -593,6 +648,16 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#uts.Layout()
self
.
cbuttons_reload
()
def
htemp_change
(
self
,
event
):
if
self
.
hsetpoint
>
0
:
self
.
do_settemp
(
""
)
wx
.
CallAfter
(
self
.
htemp
.
SetInsertionPoint
,
0
)
def
btemp_change
(
self
,
event
):
if
self
.
bsetpoint
>
0
:
self
.
do_bedtemp
(
""
)
wx
.
CallAfter
(
self
.
btemp
.
SetInsertionPoint
,
0
)
def
showwin
(
self
,
event
):
if
(
self
.
f
is
not
None
):
self
.
gwindow
.
Show
()
...
...
@@ -642,28 +707,39 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
#sizer.Remove(button)
button
.
Destroy
()
self
.
custombuttonbuttons
=
[]
newbuttonbuttonindex
=
len
(
self
.
custombuttons
)
while
newbuttonbuttonindex
>
0
and
self
.
custombuttons
[
newbuttonbuttonindex
-
1
]
is
None
:
newbuttonbuttonindex
-=
1
while
len
(
self
.
custombuttons
)
<
13
:
self
.
custombuttons
.
append
(
None
)
for
i
in
xrange
(
len
(
self
.
custombuttons
)):
btndef
=
self
.
custombuttons
[
i
]
try
:
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
btndef
[
0
])
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"Execute command: "
)
+
btndef
[
1
]))
if
len
(
btndef
)
>
2
:
b
.
SetBackgroundColour
(
btndef
[
2
])
rr
,
gg
,
bb
=
b
.
GetBackgroundColour
()
.
Get
()
if
0.3
*
rr
+
0.59
*
gg
+
0.11
*
bb
<
60
:
b
.
SetForegroundColour
(
"#ffffff"
)
except
:
b
=
wx
.
StaticText
(
self
.
panel
,
-
1
,
""
,
size
=
(
72
,
20
),
style
=
wx
.
ALIGN_CENTRE
+
wx
.
ST_NO_AUTORESIZE
)
#+wx.SIMPLE_BORDER
#b.Freeze()
b
.
Disable
()
if
i
==
newbuttonbuttonindex
:
self
.
newbuttonbutton
=
b
=
wx
.
Button
(
self
.
panel
,
-
1
,
"+"
,
size
=
(
19
,
18
))
#b.SetFont(wx.Font(12,wx.FONTFAMILY_SWISS,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD))
b
.
SetForegroundColour
(
"#4444ff"
)
b
.
SetToolTip
(
wx
.
ToolTip
(
_
(
"click to add new custom button"
)))
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
cbutton_edit
)
else
:
b
=
wx
.
StaticText
(
self
.
panel
,
-
1
,
""
,
size
=
(
72
,
22
),
style
=
wx
.
ALIGN_CENTRE
+
wx
.
ST_NO_AUTORESIZE
)
#+wx.SIMPLE_BORDER
#b.Freeze()
b
.
Disable
()
b
.
custombutton
=
i
b
.
properties
=
btndef
if
btndef
is
not
None
:
b
.
Bind
(
wx
.
EVT_BUTTON
,
self
.
procbutton
)
b
.
Bind
(
wx
.
EVT_MOUSE_EVENTS
,
self
.
editbutton
)
else
:
b
.
Bind
(
wx
.
EVT_BUTTON
,
lambda
e
:
e
.
Skip
())
#
else:
#
b.Bind(wx.EVT_BUTTON,lambda e:e.Skip())
self
.
custombuttonbuttons
.
append
(
b
)
if
i
<
4
:
ubs
.
Add
(
b
)
...
...
@@ -761,7 +837,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
self
.
cbutton_save
(
n
,
None
)
#while len(self.custombuttons) and self.custombuttons[-1] is None:
# del self.custombuttons[-1]
self
.
cbuttons_reload
(
)
wx
.
CallAfter
(
self
.
cbuttons_reload
)
def
cbutton_order
(
self
,
e
,
button
,
dir
):
n
=
button
.
custombutton
...
...
@@ -815,7 +891,14 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
if
not
hasattr
(
self
,
"dragging"
):
# init dragging of the custom button
if
hasattr
(
obj
,
"custombutton"
):
if
hasattr
(
obj
,
"custombutton"
)
and
obj
.
properties
is
not
None
:
self
.
newbuttonbutton
.
SetLabel
(
""
)
self
.
newbuttonbutton
.
SetFont
(
wx
.
Font
(
10
,
wx
.
FONTFAMILY_DEFAULT
,
wx
.
FONTSTYLE_NORMAL
,
wx
.
FONTWEIGHT_NORMAL
))
self
.
newbuttonbutton
.
SetForegroundColour
(
"black"
)
self
.
newbuttonbutton
.
SetSize
(
obj
.
GetSize
())
if
self
.
upperbottomsizer
.
GetItem
(
self
.
newbuttonbutton
)
is
not
None
:
self
.
upperbottomsizer
.
SetItemMinSize
(
self
.
newbuttonbutton
,
obj
.
GetSize
())
self
.
topsizer
.
Layout
()
self
.
dragging
=
wx
.
Button
(
self
.
panel
,
-
1
,
obj
.
GetLabel
())
self
.
dragging
.
SetBackgroundColour
(
obj
.
GetBackgroundColour
())
self
.
dragging
.
SetForegroundColour
(
obj
.
GetForegroundColour
())
...
...
@@ -998,6 +1081,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
pass
string
+=
(
self
.
tempreport
.
replace
(
"
\r
"
,
""
)
.
replace
(
"T"
,
_
(
"Hotend"
))
.
replace
(
"B"
,
_
(
"Bed"
))
.
replace
(
"
\n
"
,
""
)
.
replace
(
"ok "
,
""
))
+
" "
wx
.
CallAfter
(
self
.
tempdisp
.
SetLabel
,
self
.
tempreport
.
strip
()
.
replace
(
"ok "
,
""
))
#try:
# self.tgauge.SetValue(int(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1]))
#except:
# pass
if
self
.
sdprinting
:
string
+=
_
(
" SD printing:
%04.2
f
%%
"
)
%
(
self
.
percentdone
,)
if
self
.
p
.
printing
:
...
...
@@ -1035,6 +1122,10 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
if
"T:"
in
l
:
self
.
tempreport
=
l
wx
.
CallAfter
(
self
.
tempdisp
.
SetLabel
,
self
.
tempreport
.
strip
()
.
replace
(
"ok "
,
""
))
#try:
# self.tgauge.SetValue(int(filter(lambda x:x.startswith("T:"),self.tempreport.split())[0].split(":")[1]))
#except:
# pass
tstring
=
l
.
rstrip
()
#print tstring
if
(
tstring
!=
"ok"
):
...
...
@@ -1497,6 +1588,89 @@ class ButtonEdit(wx.Dialog):
if
self
.
name
.
GetValue
()
==
""
:
self
.
name
.
SetValue
(
macro
)
class
TempGauge
(
wx
.
Panel
):
def
__init__
(
self
,
parent
,
size
=
(
200
,
22
)):
wx
.
Panel
.
__init__
(
self
,
parent
,
-
1
,
size
=
size
)
self
.
Bind
(
wx
.
EVT_PAINT
,
self
.
paint
)
self
.
SetBackgroundStyle
(
wx
.
BG_STYLE_CUSTOM
)
self
.
width
,
self
.
height
=
size
self
.
value
=
0
self
.
setpoint
=
0
self
.
recalc
()
def
recalc
(
self
):
self
.
max
=
max
(
int
(
self
.
setpoint
*
1.05
),
240
)
self
.
scale
=
float
(
self
.
width
-
2
)
/
float
(
self
.
max
)
self
.
ypt
=
int
(
self
.
scale
*
max
(
self
.
setpoint
,
40
))
def
SetValue
(
self
,
value
):
self
.
value
=
value
wx
.
CallAfter
(
self
.
Refresh
)
def
SetTarget
(
self
,
value
):
self
.
setpoint
=
value
self
.
recalc
()
wx
.
CallAfter
(
self
.
Refresh
)
def
paint
(
self
,
ev
):
x0
,
y0
,
x1
,
y1
,
xE
,
yE
=
1
,
1
,
self
.
ypt
+
1
,
1
,
self
.
width
+
1
-
2
,
20
dc
=
wx
.
PaintDC
(
self
)
dc
.
SetBackground
(
wx
.
Brush
((
255
,
255
,
255
)))
dc
.
Clear
()
cold
,
medium
,
hot
=
wx
.
Colour
(
0
,
167
,
223
),
wx
.
Colour
(
239
,
233
,
119
),
wx
.
Colour
(
210
,
50.100
)
gauge1
,
gauge2
=
wx
.
Colour
(
255
,
255
,
210
),
wx
.
Colour
(
234
,
82
,
0
)
shadow1
,
shadow2
=
wx
.
Colour
(
110
,
110
,
110
),
wx
.
Colour
(
255
,
255
,
255
)
gc
=
wx
.
GraphicsContext
.
Create
(
dc
)
# draw shadow first
# corners
gc
.
SetBrush
(
gc
.
CreateRadialGradientBrush
(
xE
-
7
,
9
,
xE
-
7
,
9
,
8
,
shadow1
,
shadow2
))
gc
.
DrawRectangle
(
xE
-
7
,
1
,
8
,
8
)
gc
.
SetBrush
(
gc
.
CreateRadialGradientBrush
(
xE
-
7
,
17
,
xE
-
7
,
17
,
8
,
shadow1
,
shadow2
))
gc
.
DrawRectangle
(
xE
-
7
,
17
,
8
,
8
)
gc
.
SetBrush
(
gc
.
CreateRadialGradientBrush
(
x0
+
6
,
17
,
x0
+
6
,
17
,
8
,
shadow1
,
shadow2
))
gc
.
DrawRectangle
(
0
,
17
,
x0
+
6
,
8
)
# edges
gc
.
SetBrush
(
gc
.
CreateLinearGradientBrush
(
xE
-
13
,
0
,
xE
-
6
,
0
,
shadow1
,
shadow2
))
gc
.
DrawRectangle
(
xE
-
6
,
9
,
10
,
8
)
gc
.
SetBrush
(
gc
.
CreateLinearGradientBrush
(
x0
,
yE
-
2
,
x0
,
yE
+
5
,
shadow1
,
shadow2
))
gc
.
DrawRectangle
(
x0
+
6
,
yE
-
2
,
xE
-
12
,
7
)
# draw gauge background
gc
.
SetBrush
(
gc
.
CreateLinearGradientBrush
(
x0
,
y0
,
x1
+
1
,
y1
,
cold
,
medium
))
gc
.
DrawRoundedRectangle
(
x0
,
y0
,
x1
+
4
,
yE
,
6
)
gc
.
SetBrush
(
gc
.
CreateLinearGradientBrush
(
x1
-
2
,
y1
,
xE
,
y1
,
medium
,
hot
))
gc
.
DrawRoundedRectangle
(
x1
-
2
,
y1
,
xE
-
x1
,
yE
,
6
)
# draw gauge
gc
.
SetBrush
(
gc
.
CreateLinearGradientBrush
(
x0
,
y0
+
3
,
x0
,
y0
+
15
,
gauge1
,
gauge2
))
#gc.SetBrush(gc.CreateLinearGradientBrush(0,3,0,15,wx.Colour(255,255,255),wx.Colour(255,90,32)))
width
=
12
w1
=
y0
+
9
-
width
/
2
w2
=
w1
+
width
value
=
x0
+
max
(
10
,
min
(
self
.
width
+
1
-
2
,
int
(
self
.
value
*
self
.
scale
)))
val_path
=
gc
.
CreatePath
()
val_path
.
MoveToPoint
(
x0
,
w1
)
val_path
.
AddLineToPoint
(
value
,
w1
)
val_path
.
AddLineToPoint
(
value
+
2
,
w1
+
width
/
4
)
val_path
.
AddLineToPoint
(
value
+
2
,
w2
-
width
/
4
)
val_path
.
AddLineToPoint
(
value
,
w2
)
#val_path.AddLineToPoint(value-4,10)
val_path
.
AddLineToPoint
(
x0
,
w2
)
gc
.
DrawPath
(
val_path
)
# draw setpoint markers
setpoint
=
x0
+
max
(
10
,
int
(
self
.
setpoint
*
self
.
scale
))
gc
.
SetBrush
(
gc
.
CreateBrush
(
wx
.
Brush
(
wx
.
Colour
(
0
,
0
,
0
))))
setp_path
=
gc
.
CreatePath
()
setp_path
.
MoveToPoint
(
setpoint
-
4
,
y0
)
setp_path
.
AddLineToPoint
(
setpoint
+
4
,
y0
)
setp_path
.
AddLineToPoint
(
setpoint
,
y0
+
5
)
setp_path
.
MoveToPoint
(
setpoint
-
4
,
yE
)
setp_path
.
AddLineToPoint
(
setpoint
+
4
,
yE
)
setp_path
.
AddLineToPoint
(
setpoint
,
yE
-
5
)
gc
.
DrawPath
(
setp_path
)
# draw readout
text
=
u"T
\u00B0
%
u/
%
u"
%
(
self
.
value
,
self
.
setpoint
)
#gc.SetFont(gc.CreateFont(wx.Font(12,wx.FONTFAMILY_DEFAULT,wx.FONTSTYLE_NORMAL,wx.FONTWEIGHT_BOLD),wx.WHITE))
#gc.DrawText(text,29,-2)
gc
.
SetFont
(
gc
.
CreateFont
(
wx
.
Font
(
10
,
wx
.
FONTFAMILY_DEFAULT
,
wx
.
FONTSTYLE_NORMAL
,
wx
.
FONTWEIGHT_BOLD
),
wx
.
WHITE
))
gc
.
DrawText
(
text
,
x0
+
31
,
y0
+
1
)
gc
.
SetFont
(
gc
.
CreateFont
(
wx
.
Font
(
10
,
wx
.
FONTFAMILY_DEFAULT
,
wx
.
FONTSTYLE_NORMAL
,
wx
.
FONTWEIGHT_BOLD
)))
gc
.
DrawText
(
text
,
x0
+
30
,
y0
+
0
)
if
__name__
==
'__main__'
:
app
=
wx
.
App
(
False
)
main
=
PronterWindow
()
...
...
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