first commit
This commit is contained in:
commit
9e0e90960d
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"amqp_url": "127.0.0.1",
|
||||
"amqp_port": 5672,
|
||||
"amqp_vhost": "/",
|
||||
"amqp_id": "username",
|
||||
"amqp_pw": "password",
|
||||
"amqp_queue": "gseps-mq",
|
||||
"amqp_ReadyQ": "gseps-ready",
|
||||
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
|
||||
"SecretKey": "UgPHCIka1igcHSlnXsCnnhWAy3R4LChFGIH5ZlIZ",
|
||||
"Boto3SignatureVersion": "s3v4",
|
||||
"Boto3RegionName": "ap-northeast-2",
|
||||
"gseps_stage_bucket":"stage-gs-eps-frontend",
|
||||
"BucketKey": "sdt/mv_bottom_ash_particle_size",
|
||||
"S3BucketName": "gseps-data",
|
||||
"image_save_path": "/home/sdt/Workspace/gseps-test/image_bucket",
|
||||
"laser_save_path": "/home/sdt/Workspace/gseps_test/laser_value",
|
||||
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
|
||||
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
|
||||
"capture_single_time_interval": 1,
|
||||
"capture_batch_time_interval": 120,
|
||||
"laser_device_path": "/dev/ttyS0"
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"amqp_url": "25.5.252.53",
|
||||
"amqp_port": 5672,
|
||||
"amqp_vhost": "/",
|
||||
"amqp_id": "sdt",
|
||||
"amqp_pw": "251327",
|
||||
"amqp_queue": "gseps-mq",
|
||||
"amqp_ReadyQ": "gseps-ready",
|
||||
"Minio_url": "http://25.5.252.53:9000",
|
||||
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
|
||||
"SecretKey": "UgPHCIka1igcHSlnXsCnnhWAy3R4LChFGIH5ZlIZ",
|
||||
"Boto3SignatureVersion": "s3v4",
|
||||
"Boto3RegionName": "ap-northeast-2",
|
||||
"gseps_stage_bucket":"stage-gs-eps-frontend",
|
||||
"BucketKey": "sdt/mv_bottom_ash_particle_size",
|
||||
"S3BucketName": "gseps-data",
|
||||
"image_save_path": "/home/sdt/Workspace/gseps-test/image_bucket/",
|
||||
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
|
||||
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
|
||||
"capture_single_time_interval": 1,
|
||||
"capture_batch_time_interval": 120,
|
||||
"cam2_device_path": "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:2:1.0-video-index0",
|
||||
"laser_device_path": "/dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.0-port0"
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"amqp_url": "25.10.82.120",
|
||||
"amqp_port": 5672,
|
||||
"amqp_vhost": "/",
|
||||
"amqp_id": "sdt",
|
||||
"amqp_pw": "251327",
|
||||
"amqp_queue": "gseps-mq",
|
||||
"amqp_ReadyQ": "gseps-ready",
|
||||
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
|
||||
"SecretKey": "UgPHCIka1igcHSlnXsCnnhWAy3R4LChFGIH5ZlIZ",
|
||||
"Boto3SignatureVersion": "s3v4",
|
||||
"Boto3RegionName": "ap-northeast-2",
|
||||
"gseps_stage_bucket":"stage-gs-eps-frontend",
|
||||
"BucketKey": "sdt/mv_bottom_ash_particle_size",
|
||||
"S3BucketName": "gseps-data",
|
||||
"image_save_path": "/home/sdt/Workspace/gseps_edge/image_acquisition/capture/",
|
||||
"laser_save_path": "/home/sdt/Workspace/gseps_edge/laser/laser_value",
|
||||
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
|
||||
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
|
||||
"capture_single_time_interval": 1,
|
||||
"capture_batch_time_interval": 120,
|
||||
"laser_device_path": "/dev/ttyS0"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"appId": "2674b0bc-77c3-4342-b111-ec9d7515b438",
|
||||
"topic": "performance",
|
||||
"host": {
|
||||
"address": "192.168.100.200",
|
||||
"hostname": "sdt"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=gseps-image-acquisition
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/sdt/miniconda3/bin/python main.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
WorkingDirectory=/home/sdt/Workspace/gseps-test
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
sudo sed -i "s/appName/$1_$2/g" /usr/local/sdt/app/$1_$2/gseps-image-acquisition.service
|
||||
sudo sed -i "s/appIDvalue/$2/g" /usr/local/sdt/app/$1_$2/config.json
|
||||
sudo cp /usr/local/sdt/app/$1_$2/gseps-image-acquisition.service /etc/systemd/system/$1.service
|
||||
sudo systemctl start $1
|
||||
sudo systemctl enable $1
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
import time
|
||||
import serial
|
||||
|
||||
|
||||
def hex_to_int(data):
|
||||
data_length = data[2]
|
||||
hex_distance = data[3:3+data_length]
|
||||
|
||||
return int.from_bytes(hex_distance, byteorder='big')
|
||||
|
||||
for i in range(1000):
|
||||
ser = serial.Serial(
|
||||
port="/dev/ttyS0",
|
||||
baudrate=19200,
|
||||
timeout=1,
|
||||
bytesize=serial.EIGHTBITS,
|
||||
parity=serial.PARITY_NONE,
|
||||
stopbits=serial.STOPBITS_ONE
|
||||
)
|
||||
|
||||
req = b'\x01\x04\x00\x00\x00\x01\x31\xca'
|
||||
time.sleep(0.3)
|
||||
ser.write(req)
|
||||
result = ser.read(6)
|
||||
|
||||
distance = hex_to_int(result)
|
||||
print(f'Laser Distance: {distance}mm')
|
||||
|
||||
ser.close()
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue