Skip to content

Commit

Permalink
pepare 1.4.1 and cleanup log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
elschnorro77 committed Jan 9, 2024
1 parent b6e1af2 commit 221710f
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ def maintenance(maintenance_stop, measurement_stop):
else:
logger.warning('HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + ' weight before: ' + str(weight_sensor["weightbefore"]) + 'g - weight after: ' + str(weight) + 'g , a difference of ' + str(float("{0:.1f}".format(weightdifference))) + 'g when maintenance mode was ended, not updateing offset2 to: ' + str(newoffset2) + 'g but keeping new value: ' + str(offset2) + 'g that was changed in maintenance mode from: '+ str(startoffset2))
else:
logger.warning('reference_unit changed from' + str(weight_sensor["reference_unit"]) + ' to: ' + str(sensor["reference_unit"]) + ', offset changed from: ' + str(weight_sensor["offset"]) + ' to: ' + str(sensor["offset"]))
logger.warning('Calibration during maintenance for HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + ', not calculation a new offset')
logger.warning('HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + 'calibration during maintenance, reference_unit changed from' + str(weight_sensor["reference_unit"]) + ' to: ' + str(sensor["reference_unit"]) + ', offset changed from: ' + str(weight_sensor["offset"]) + ' to: ' + str(sensor["offset"]))
logger.warning('HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + ' weight before: ' + str(weight_sensor["weightbefore"]) + 'g - weight after: ' + str(weight) + 'g , a difference of ' + str(float("{0:.1f}".format(weightdifference))) + 'g when maintenance mode was ended, due to calibration during maintenance not saving a new offset')
#eventuell aus weight_sensor die differenz berechnen
break
else:
logger.debug("Another sensor")
continue
logger.warning('Sensor HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + 'did not exist at start of Maintenance!')
logger.warning('HX711 DT: ' + str(pin_dt) + ' SCK: ' + str(pin_sck) + ' Channel: ' + channel + 'Sensor did not exist at start of Maintenance!')
stop_single()

logger.info('Maintenance mode ended at: ' + timeMaintenanceStarted.strftime('%Y-%m-%d %H:%M'))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion v1.4/post-upgrade.sh → v1.4.1/post-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$(id -u)" != 0 ]; then
exit 1
fi

VERSION="v1.4"
VERSION="v1.4.1"

echo '>>> Running post-upgrade script...'

Expand Down

0 comments on commit 221710f

Please sign in to comment.