Skip to content

Commit

Permalink
Merge pull request #36 from Tritol-travis/cw1s
Browse files Browse the repository at this point in the history
CW1S support
  • Loading branch information
Tritol-travis authored Jul 2, 2021
2 parents cac54b8 + de28d5e commit 97327eb
Show file tree
Hide file tree
Showing 23 changed files with 478 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deploy:
token: $ACCESS_TOKEN
file_glob: true
file:
- build/Prusa-CW1-Firmware-*.hex
- build/Prusa-CW1*-Firmware-*.hex
skip_cleanup: true
draft: true
prerelease: true
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PROJECT = Prusa-CW1-Firmware
PROJECT_CW1S = Prusa-CW1S-Firmware
DIRS = lib src
I18N = i18n
LANG = en
Expand All @@ -16,7 +17,7 @@ CPPTUNING = -fno-exceptions -fno-threadsafe-statics
OPT = -g -Os -ffunction-sections -fdata-sections -flto -fno-fat-lto-objects -funsigned-char -funsigned-bitfields -fshort-enums -fno-inline-small-functions -mcall-prologues -fno-split-wide-types
MCU = -mmcu=atmega32u4

DEFS = -DF_CPU=16000000 -DARDUINO=10805 -DUSB_VID=0x2c99 -DUSB_PID=0x0008 -DUSB_MANUFACTURER='"Prusa Research prusa3d.com"' -DUSB_PRODUCT='"Original Prusa CW1"'
DEFS = -DF_CPU=16000000 -DARDUINO=10805 -DUSB_VID=0x2c99 -DUSB_MANUFACTURER='"Prusa Research prusa3d.com"'
INCLUDE = $(foreach dir, ${DIRS}, -I${dir}) -I${BUILD_DIR}

CFLAGS = ${OPT} ${WARN} ${CSTANDARD} ${MCU} ${INCLUDE} ${DEFS}
Expand All @@ -31,11 +32,18 @@ VERSION = $(shell git describe --abbrev=0 --tags)
VERSION_FILE = ${BUILD_DIR}/version.h
LANG_TEMPLATE = ${I18N}/${PROJECT}-${VERSION}.pot

default: DEFS += -DSERIAL_COM_DEBUG
default: DEFS += -DUSB_PRODUCT='"Original Prusa CW1"' -DUSB_PID=0x0008 -DSERIAL_COM_DEBUG
default: DEVICE = cw1
default: $(addprefix $(BUILD_DIR)/, ${PROJECT}-${LANG}-devel.hex)

dist: DEFS += -DUSB_PRODUCT='"Original Prusa CW1"' -DUSB_PID=0x0008
dist: DEVICE = cw1
dist: $(addprefix $(BUILD_DIR)/, ${PROJECT}-${LANG}-${VERSION}.hex)

cw1s: DEFS += -DCW1S -DUSB_PRODUCT='"Original Prusa CW1S"' -DUSB_PID=0x000F
cw1s: DEVICE = cw1s
cw1s: $(addprefix $(BUILD_DIR)/, ${PROJECT_CW1S}-${LANG}-${VERSION}.hex)

.PHONY: clean distclean lang_extract default dist ${VERSION_FILE}.tmp doc

.SECONDARY:
Expand All @@ -50,7 +58,7 @@ $(BUILD_DIR)%/.:

$(BUILD_DIR)/%.hex: ${BUILD_DIR}/%.elf
${OBJCOPY} -O ihex -R .eeprom $< $@.tmp
@echo "; device = cw1" > $@
@echo "; device = ${DEVICE}" > $@
@echo >> $@
cat $@.tmp >> $@
rm $@.tmp
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Original Prusa Curing and Washing machine firmware
* [Manually with installed tools](#manually-with-installed-tools)
* [Flashing](#flashing)
* [Building documentation](#building-documentation)

<!--te-->

## Building with make
### Automatic, remote, using travis-ci

Create new github user, eg. your_user_name-your_repository_name-travis. This step is not mandatory, only recomended to limit access rights for travis to single repository. Grant this user access to your repository. Register this user on https://travis-ci.org/. Create API key for this user. In Github click on this user, settings, Developer settings, Personal access tokens, Generate new token, select public_repo, click on Generate token and copy this token.
Create new github user, eg. your_user_name-your_repository_name-travis. This step is not mandatory, only recomended to limit access rights for travis to single repository. Grant this user access to your repository. Register this user on https://www.travis-ci.com/. Create API key for this user. In Github click on this user, settings, Developer settings, Personal access tokens, Generate new token, select public_repo, click on Generate token and copy this token.

Login into https://travis-ci.org/ enable build of your repository, click on repository setting, add environment variable `ACCESS_TOKEN` and paste your token.
Login into https://www.travis-ci.com/ enable build of your repository, click on repository setting, add environment variable `ACCESS_TOKEN` and paste your token.

Each commit is build, but only for tagged commits `Prusa-CW1-Firmware-LANG-GIT_TAG.hex` files are attached to your release by travis.

Expand Down Expand Up @@ -78,6 +78,9 @@ There is known issue with `ModemManager`: you either need to deinstall it, or bl
# Original Prusa CW1
ATTRS{idVendor}=="2c99", ATTRS{idProduct}=="0007", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="2c99", ATTRS{idProduct}=="0008", ENV{ID_MM_DEVICE_IGNORE}="1"
# Original Prusa CW1S
ATTRS{idVendor}=="2c99", ATTRS{idProduct}=="000E", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="2c99", ATTRS{idProduct}=="000F", ENV{ID_MM_DEVICE_IGNORE}="1"
~~~
* Then reload udev rules :
~~~
Expand Down
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ export PATH=$SCRIPT_PATH/$ENV_DIR/avr/bin:$PATH
for LG in "en" "cs" "de" "es" "fr" "it" "pl" ; do
make clean || exit 4
make "LANG=$LG" dist || exit 5

make clean || exit 4
make "LANG=$LG" cw1s || exit 5
done
65 changes: 36 additions & 29 deletions i18n/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"X-Generator: PhraseApp (phraseapp.com)\n"

#: i18n/en.h:142
msgid " F2:"
Expand Down Expand Up @@ -35,10 +34,6 @@ msgstr "Zavrete viko"
msgid "Continue"
msgstr "Pokracovat"

#: i18n/en.h:40
msgid "continuous"
msgstr "nepretrzite"

#: i18n/en.h:37
msgid "Control echo"
msgstr "Odezva ovl."
Expand Down Expand Up @@ -87,6 +82,14 @@ msgstr "V1:"
msgid "F3:"
msgstr "V3:"

#: i18n/en.h:68
msgid "FW: "
msgstr "FW: "

#: i18n/en.h:95
msgid "Fan1 RPM: "
msgstr "V1 ot/min: "

#: i18n/en.h:45
msgid "Fan1 curing speed"
msgstr "Rychlost V1 tvrz."
Expand All @@ -103,14 +106,14 @@ msgstr "Ventilator1 selhal"
msgid "Fan1 menu speed"
msgstr "Rychl. V1 (menu)"

#: i18n/en.h:95
msgid "Fan1 RPM: "
msgstr "V1 ot/min: "

#: i18n/en.h:55
msgid "Fan1 washing speed"
msgstr "Rychlost V1 myti"

#: i18n/en.h:96
msgid "Fan2 RPM: "
msgstr "V2 ot/min: "

#: i18n/en.h:46
msgid "Fan2 curing speed"
msgstr "Rychlost V2 tvrz."
Expand All @@ -127,10 +130,6 @@ msgstr "Ventilator2 selhal"
msgid "Fan2 menu speed"
msgstr "Rychlost V2 menu"

#: i18n/en.h:96
msgid "Fan2 RPM: "
msgstr "V2 ot/min: "

#: i18n/en.h:56
msgid "Fan2 washing speed"
msgstr "Rychl. V2 (myti)"
Expand Down Expand Up @@ -171,10 +170,6 @@ msgstr "Koncovy pip"
msgid "Finished"
msgstr "Hotovo"

#: i18n/en.h:68
msgid "FW: "
msgstr "FW: "

#: i18n/en.h:137
msgid "Heater failure"
msgstr "Chyba nahrivani"
Expand All @@ -191,6 +186,18 @@ msgstr "Test nahrivani"
msgid "Heating"
msgstr "Nahrivani"

#: i18n/en.h:152
msgid "Hold the platform"
msgstr "Podrzet platformu"

#: i18n/en.h:149
msgid "IPA tank test"
msgstr "Test IPA nadoby"

#: i18n/en.h:153
msgid "Incorrect firmware!"
msgstr "Nespravny firmware!"

#: i18n/en.h:67
msgid "Information"
msgstr "Informace"
Expand All @@ -199,10 +206,6 @@ msgstr "Informace"
msgid "Insert IPA tank"
msgstr "Vlozte IPA nadobu"

#: i18n/en.h:149
msgid "IPA tank test"
msgstr "Test IPA nadoby"

#: i18n/en.h:83
msgid "LCD brightness"
msgstr "Jas LCD"
Expand All @@ -211,18 +214,10 @@ msgstr "Jas LCD"
msgid "No/low power"
msgstr "Zadny/maly vykon"

#: i18n/en.h:38
msgid "none"
msgstr "zadny"

#: i18n/en.h:147
msgid "Not/bad spinning"
msgstr "Problem otaceni"

#: i18n/en.h:39
msgid "once"
msgstr "jednou"

#: i18n/en.h:151
msgid "Open the cover"
msgstr "Otevrete viko"
Expand Down Expand Up @@ -354,3 +349,15 @@ msgstr "[vyp]"
#: i18n/en.h:3
msgid "[on]"
msgstr "[zap]"

#: i18n/en.h:40
msgid "continuous"
msgstr "nepretrzite"

#: i18n/en.h:38
msgid "none"
msgstr "zadny"

#: i18n/en.h:39
msgid "once"
msgstr "jednou"
70 changes: 36 additions & 34 deletions i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"

#: i18n/en.h:142
msgid " F2:"
Expand Down Expand Up @@ -40,10 +34,6 @@ msgstr "Abdeckung zumachen"
msgid "Continue"
msgstr "Fortfahren"

#: i18n/en.h:40
msgid "continuous"
msgstr "fortlaufend"

#: i18n/en.h:37
msgid "Control echo"
msgstr "Steuerung Echo"
Expand Down Expand Up @@ -92,6 +82,14 @@ msgstr "F1:"
msgid "F3:"
msgstr "F3:"

#: i18n/en.h:68
msgid "FW: "
msgstr "FW: "

#: i18n/en.h:95
msgid "Fan1 RPM: "
msgstr "Lufter1 UPM: "

#: i18n/en.h:45
msgid "Fan1 curing speed"
msgstr "Lufter1 Hartetempo"
Expand All @@ -108,14 +106,14 @@ msgstr "Lufter1 Fehler"
msgid "Fan1 menu speed"
msgstr "Lufter1 Menutempo"

#: i18n/en.h:95
msgid "Fan1 RPM: "
msgstr "Lufter1 UPM: "

#: i18n/en.h:55
msgid "Fan1 washing speed"
msgstr "Lufter1 Waschtempo"

#: i18n/en.h:96
msgid "Fan2 RPM: "
msgstr "Lufter2 UPM: "

#: i18n/en.h:46
msgid "Fan2 curing speed"
msgstr "Lufter2 Hartetempo"
Expand All @@ -132,10 +130,6 @@ msgstr "Lufter2 Fehler"
msgid "Fan2 menu speed"
msgstr "Lufter2 Menutempo"

#: i18n/en.h:96
msgid "Fan2 RPM: "
msgstr "Lufter2 UPM: "

#: i18n/en.h:56
msgid "Fan2 washing speed"
msgstr "Lufter2 Waschtempo"
Expand Down Expand Up @@ -176,10 +170,6 @@ msgstr "Endeton"
msgid "Finished"
msgstr "Beended"

#: i18n/en.h:68
msgid "FW: "
msgstr "FW: "

#: i18n/en.h:137
msgid "Heater failure"
msgstr "Heizfehler"
Expand All @@ -196,6 +186,18 @@ msgstr "Heiztest"
msgid "Heating"
msgstr "Heize"

#: i18n/en.h:152
msgid "Hold the platform"
msgstr "Plattform halten"

#: i18n/en.h:149
msgid "IPA tank test"
msgstr "IPA Tanktest"

#: i18n/en.h:153
msgid "Incorrect firmware!"
msgstr "Falsche Firmware!"

#: i18n/en.h:67
msgid "Information"
msgstr "Informationen"
Expand All @@ -204,10 +206,6 @@ msgstr "Informationen"
msgid "Insert IPA tank"
msgstr "IPA Tank einsetzen"

#: i18n/en.h:149
msgid "IPA tank test"
msgstr "IPA Tanktest"

#: i18n/en.h:83
msgid "LCD brightness"
msgstr "LCD Helligkeit"
Expand All @@ -216,18 +214,10 @@ msgstr "LCD Helligkeit"
msgid "No/low power"
msgstr "Keine/gering Power"

#: i18n/en.h:38
msgid "none"
msgstr "kein"

#: i18n/en.h:147
msgid "Not/bad spinning"
msgstr "Kein/unzur. Ruhren"

#: i18n/en.h:39
msgid "once"
msgstr "einmal"

#: i18n/en.h:151
msgid "Open the cover"
msgstr "Abdeckung offnen"
Expand Down Expand Up @@ -359,3 +349,15 @@ msgstr "[aus]"
#: i18n/en.h:3
msgid "[on]"
msgstr "[an]"

#: i18n/en.h:40
msgid "continuous"
msgstr "fortlaufend"

#: i18n/en.h:38
msgid "none"
msgstr "kein"

#: i18n/en.h:39
msgid "once"
msgstr "einmal"
2 changes: 2 additions & 0 deletions i18n/en.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,5 @@ static const char pgmstr_rotation_test[] PROGMEM = _("Rotation test");
static const char pgmstr_ipatank_test[] PROGMEM = _("IPA tank test");
static const char pgmstr_cover_test[] PROGMEM = _("Cover test");
static const char pgmstr_open_cover[] PROGMEM = _("Open the cover");
static const char pgmstr_hold_platform[] PROGMEM = _("Hold the platform");
static const char pgmstr_wrong_model[] PROGMEM = _("Incorrect firmware!");
Loading

0 comments on commit 97327eb

Please sign in to comment.