Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Mar 14, 2016
1 parent 71e51ec commit 5c824ba
Show file tree
Hide file tree
Showing 43 changed files with 28,938 additions and 28,845 deletions.
2 changes: 1 addition & 1 deletion src/artisanlib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.9.9'
#__revision__ = ''.join(list(filter(str.isdigit, "$Revision$")))
__revision__ = '0'
__revision__ = '1'
29 changes: 19 additions & 10 deletions src/artisanlib/hottop.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
SP = None

# safety cut-off BT temperature
BTcutoff = 220 # 220C = 428F
BTcutoff = 220 # 220C = 428F (was 212C/413F before)
BTleaveControl = 180 # 180C = 350F; the BT below which the control can be released; above the control cannot be released to avoid sudden stop at high temperatures

xCONTROL = None # False: just logging; True: logging+control
xBT = None
Expand Down Expand Up @@ -90,7 +91,7 @@ def gettemperatures(p,retry=True):
if retry: # we retry once
return gettemperatures(p,retry=False)
else:
#VERSION = hex2int(r[4])
#VERSION = hex2int(r[4]) # => 1 (first released version)
HEATER = hex2int(r[10]) # 0-100
FAN = hex2int(r[11])
MAIN_FAN = hex2int(r[12]) # 0-10
Expand All @@ -109,12 +110,20 @@ def doWork(interval, comport, baudrate, bytesize, parity, stopbits, timeout,
aSET_HEATER, aSET_FAN, aSET_MAIN_FAN, aSET_SOLENOID, aSET_DRUM_MOTOR, aSET_COOLING_MOTOR, aCONTROL):
SP = serial.Serial()
# configure serial port
SP.setPort(comport)
SP.setBaudrate(baudrate)
SP.setByteSize(bytesize)
SP.setParity(parity)
SP.setStopbits(stopbits)
SP.setTimeout(timeout)
if serial.VERSION.split(".")[0].strip() == "2":
SP.setPort(comport)
SP.setBaudrate(baudrate)
SP.setByteSize(bytesize)
SP.setParity(parity)
SP.setStopbits(stopbits)
SP.setTimeout(timeout)
else:
SP.port = comport
SP.baudrate = baudrate
SP.bytesize = bytesize
SP.parity = parity
SP.stopbits = stopbits
SP.timeout = timeout
while True:
# logging part
BT, ET, HEATER, FAN, MAIN_FAN, SOLENOID, DRUM_MOTOR, COOLING_MOTOR, CHAFF_TRAY = gettemperatures(SP)
Expand Down Expand Up @@ -147,7 +156,7 @@ def doWork(interval, comport, baudrate, bytesize, parity, stopbits, timeout,

# control part
if aCONTROL.value:
# safety cut at BT=212C (413F)
# safety cut at BT=220C/428F (was 212C/413F before)
if BT >= BTcutoff:
# set main fan to maximum (set to 10), turn off heater (set to 0), open solenoid for eject, turn on drum and stirrer (all set to 1)
aSET_HEATER.value = 0
Expand Down Expand Up @@ -222,7 +231,7 @@ def takeHottopControl():
return False

def releaseHottopControl():
if xCONTROL and xBT.value < BTcutoff:
if xCONTROL and xBT.value < BTleaveControl:
xCONTROL.value = False
return True
else:
Expand Down
373 changes: 202 additions & 171 deletions src/artisanlib/main.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/includes/ranking-template.htm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ranking Report</title>
<title>$title</title>
<meta name="description" content="Artisan ranking report">
<meta name="author" content="Artisan Roaster Scope">
<script src="${resources}sorttable.js" type="text/javascript"></script>
Expand Down Expand Up @@ -80,7 +80,7 @@
</style>
</head>
<body>
<h1>Roast Ranking</h1>
<h1>$title</h1>
<table class="sortable">
<colgroup>
<col class="grey" />
Expand Down
2 changes: 1 addition & 1 deletion src/includes/report-template.htm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
width: 100%;
}
h1 {
color: #505050;
color: #808080;
}
th, td {
text-align: left;
Expand Down
2 changes: 1 addition & 1 deletion src/setup-install.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RequestExecutionLevel admin
; HM NIS Edit Wizard helper defines
!define py2exeOutputDir 'dist'
!define PRODUCT_NAME "Artisan"
!define PRODUCT_VERSION "0.9.9.0"
!define PRODUCT_VERSION "0.9.9.1"
!define PRODUCT_PUBLISHER "The Artisan Team"
!define PRODUCT_WEB_SITE "http://code.google.com/p/artisan/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\artisan.exe"
Expand Down
2 changes: 1 addition & 1 deletion src/setup-install3.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RequestExecutionLevel admin
; HM NIS Edit Wizard helper defines
!define py2exeOutputDir 'dist'
!define PRODUCT_NAME "Artisan"
!define PRODUCT_VERSION "0.9.9.0"
!define PRODUCT_VERSION "0.9.9.1"
!define PRODUCT_PUBLISHER "The Artisan Team"
!define PRODUCT_WEB_SITE "http://code.google.com/p/artisan/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\artisan.exe"
Expand Down
Binary file modified src/translations/artisan_ar.qm
Binary file not shown.
Loading

0 comments on commit 5c824ba

Please sign in to comment.