Commit message

This commit is contained in:
support.sampyo 2024-03-26 11:09:36 +00:00
parent 0cbfb8de48
commit 1b38b348b5
2 changed files with 8 additions and 3 deletions

View File

@ -7,5 +7,5 @@ spec:
virtualEnv: base # 사용할 가상환경 이름입니다.
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
stackbase:
tagName: v0.0.10 # Stackbase(gitea)에 릴리즈 태그명 입니다.
tagName: v0.0.11 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.

View File

@ -63,7 +63,12 @@ def Measure_Weight(client):
def Calculate_Concentration(weight):
global data, volume_water
data['data']['weight'] = weight
result = (float(weight) * volume_water * 128.5) - 126.11 # 1000 / 531 = 1.883239171
# result = (float(weight) * volume_water * 128.5) - 126.11 # 1000 / 531 = 1.883239171
tmp1 = weight * volume_water
tmp2 = tmp1 * 128.5
tmp3 = tmp2 - 126.11
print(f'volume_water: {
data['data']['concentration'] = result
# print(f'{weight}, {result}')
@ -316,7 +321,7 @@ if __name__ == "__main__":
with open('./config.json', encoding='UTF-8') as f:
jsonData = json.load(f)
volume_water = float(jsonData['volume-water']) / 1000.0
volume_water = 1000.0 / float(jsonData['volume-water'])
modbus_addr = jsonData['modbus-server']['address']
modbus_port = jsonData['modbus-server']['port']